GET

/v1/schemas/gemini/chat/v1beta/models/{modelsId}:generateMessage

kind inputactivity chathash bae87dde…extracted Jul 6, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.
Source trace
f697c69526f2d0f93e6e022d34a6a98146776f0f982cc56727132c048329221c
{
  "fetchedAt": 1783328683,
  "extractorVersion": "1",
  "verifiedAt": null
}

Request body

5 properties · 0 required · 5 $defs
propertytypedescriptionconstraints
temperaturenumberOptional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model.format: float
promptMessagePromptAll of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different wa…
topPnumberOptional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`.format: float
topKintegerOptional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens.format: int32
candidateCountintegerOptional. The number of generated response messages to return. This value must be between `[1, 8]`, inclusive. If unset, this will default to `1`.format: int32

Types

5 $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
licensestringOptional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations.
endIndexintegerOptional. End of the attributed segment, exclusive.format: int32
uristringOptional. URI that is attributed as a source for a portion of the text.

Exampleobject

An input/output example used to instruct the Model. It demonstrates how the model should respond or format its response.

outputMessageThe 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.
inputMessageThe 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.

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.

contentstringRequired. The text content of the structured `Message`.
authorstringOptional. 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.
citationMetadataCitationMetadataA collection of source attributions for a piece of content.

MessagePromptobject

All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different wa…

messagesMessage[]Required. A snapshot of the recent conversation history sorted chronologically. Turns alternate between two authors. If the total input size exceeds the model's `input_token_limit` the input will be truncated: The oldest items will be dropped from `messages`.
contextstringOptional. Text that should be provided to the model first to ground the response. If not empty, this `context` will be given to the model first before the `examples` and `messages`. When using a `context` be sure to provide it with every request to maintain co…
examplesExample[]Optional. Examples of what the model should generate. This includes both user input and the response that the model should emulate. These `examples` are treated identically to conversation messages except that they take precedence over the history in `messages…

Validate a payload

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