GET
/v1/schemas/gemini/chat/v1beta/models/{modelsId}:generateMessage?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above.Source tracef697c69526f2d0f93e6e022d34a6a98146776f0f982cc56727132c048329221c{
"fetchedAt": 1783328683,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
3 properties · 0 required · 4 $defs| property | type | description | constraints |
|---|---|---|---|
| messages | Message[] | The conversation history used by the model. | |
| 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. | |
| candidates | Message[] | Candidate response messages from the model. |
Types
4 $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 |
| license | string | Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations. | |
| 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. |
ContentFilterobject
Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.
| reason | enum | The reason content was blocked during request processing. | BLOCKED_REASON_UNSPECIFIED | SAFETY | OTHER |
| message | string | A string that describes the filtering behavior in more detail. |
Messageobject
The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text.
| content | string | Required. The text content of the structured `Message`. | |
| author | string | Optional. The author of this Message. This serves as a key for tagging the content of this Message when it is fed to the model as text. The author can be any alphanumeric string. | |
| citationMetadata | CitationMetadata | A collection of source attributions for a piece of content. |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"gemini","endpointId":"v1beta/models/{modelsId}:generateMessage","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}