/v1/schemas/gemini/chat/v1beta/models/{modelsId}:generateText?kind=output
| field | recorded source |
|---|---|
| schema | Source linked above.Source tracea748582f6d8fbdd416a20a987ed1a5b0d8d74a4256cd1e170211e7e0db3f4592{
"fetchedAt": 1783573297,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
3 properties · 0 required · 7 $defs| property | type | description | constraints |
|---|---|---|---|
| candidates | TextCompletion[] | Candidate responses from the model. | |
| safetyFeedback | SafetyFeedback[] | Returns any safety feedback related to content filtering. | |
| filters | ContentFilter[] | 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 $defsCitationMetadataobject
A collection of source attributions for a piece of content.
| citationSources | CitationSource[] | Citations to sources for a specific response. |
CitationSourceobject
A citation to a source for a portion of a specific response.
| startIndex | integer | Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes. | format: int32 |
| endIndex | integer | Optional. End of the attributed segment, exclusive. | format: int32 |
| uri | string | Optional. URI that is attributed as a source for a portion of the text. | |
| license | string | Optional. 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.
| message | string | A string that describes the filtering behavior in more detail. | |
| reason | enum | The 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…
| rating | SafetyRating | 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… | |
| setting | SafetySetting | Safety 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…
| category | enum | Required. 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 |
| probability | enum | Required. The probability of harm for this content. | HARM_PROBABILITY_UNSPECIFIED | NEGLIGIBLE | LOW | MEDIUM | HIGH |
| blocked | boolean | Was 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.
| threshold | enum | Required. 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 |
| category | enum | Required. 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.
| citationMetadata | CitationMetadata | A collection of source attributions for a piece of content. | |
| output | string | Output only. The generated text returned from the model. | |
| safetyRatings | SafetyRating[] | Ratings for the safety of a response. There is at most one rating per category. |
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"gemini","endpointId":"v1beta/models/{modelsId}:generateText","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}