GET

/v1/schemas/gemini/chat/v1beta/models/{modelsId}:generateText?kind=output

kind outputactivity chathash 1f892024…extracted Jul 9, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.
Source trace
a748582f6d8fbdd416a20a987ed1a5b0d8d74a4256cd1e170211e7e0db3f4592
{
  "fetchedAt": 1783573297,
  "extractorVersion": "1",
  "verifiedAt": null
}

Response body

3 properties · 0 required · 7 $defs
propertytypedescriptionconstraints
candidatesTextCompletion[]Candidate responses from the model.
safetyFeedbackSafetyFeedback[]Returns any safety feedback related to content filtering.
filtersContentFilter[]A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. This in…

Types

7 $defs

CitationMetadataobject

A collection of source attributions for a piece of content.

citationSourcesCitationSource[]Citations to sources for a specific response.

CitationSourceobject

A citation to a source for a portion of a specific response.

startIndexintegerOptional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.format: int32
endIndexintegerOptional. End of the attributed segment, exclusive.format: int32
uristringOptional. URI that is attributed as a source for a portion of the text.
licensestringOptional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations.

ContentFilterobject

Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.

messagestringA string that describes the filtering behavior in more detail.
reasonenumThe reason content was blocked during request processing.BLOCKED_REASON_UNSPECIFIED | SAFETY | OTHER

SafetyFeedbackobject

Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the reque…

ratingSafetyRatingSafety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm cl…
settingSafetySettingSafety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.

SafetyRatingobject

Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm cl…

categoryenumRequired. The category for this rating.HARM_CATEGORY_UNSPECIFIED | HARM_CATEGORY_DEROGATORY | HARM_CATEGORY_TOXICITY | HARM_CATEGORY_VIOLENCE | HARM_CATEGORY_SEXUAL | HARM_CATEGORY_MEDICAL · +7 more
probabilityenumRequired. The probability of harm for this content.HARM_PROBABILITY_UNSPECIFIED | NEGLIGIBLE | LOW | MEDIUM | HIGH
blockedbooleanWas this content blocked because of this rating?

SafetySettingobject

Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked.

thresholdenumRequired. Controls the probability threshold at which harm is blocked.HARM_BLOCK_THRESHOLD_UNSPECIFIE… | BLOCK_LOW_AND_ABOVE | BLOCK_MEDIUM_AND_ABOVE | BLOCK_ONLY_HIGH | BLOCK_NONE | OFF
categoryenumRequired. The category for this setting.HARM_CATEGORY_UNSPECIFIED | HARM_CATEGORY_DEROGATORY | HARM_CATEGORY_TOXICITY | HARM_CATEGORY_VIOLENCE | HARM_CATEGORY_SEXUAL | HARM_CATEGORY_MEDICAL · +7 more

TextCompletionobject

Output text returned from a model.

citationMetadataCitationMetadataA collection of source attributions for a piece of content.
outputstringOutput only. The generated text returned from the model.
safetyRatingsSafetyRating[]Ratings for the safety of a response. There is at most one rating per category.

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"gemini","endpointId":"v1beta/models/{modelsId}:generateText","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}