GET

/v1/schemas/gemini/chat/v1beta/tunedModels/{tunedModelsId}:generateText

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

Request body

8 properties · 0 required · 2 $defs
propertytypedescriptionconstraints
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. Defaults to 40. Note: The default value varies by model, see the `Model.top_…format: int32
safetySettingsSafetySetting[]Optional. A list of unique `SafetySetting` instances for blocking unsafe content. that will be enforced on the `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API…
stopSequencesstring[]The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response.
maxOutputTokensintegerOptional. The maximum number of tokens to include in a candidate. If unset, this will default to output_token_limit specified in the `Model` specification.format: int32
topPnumberOptional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling dir…format: float
promptTextPromptText given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.
temperaturenumberOptional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned the `getModel` function. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce resp…format: float
candidateCountintegerOptional. Number of generated responses to return. This value must be between [1, 8], inclusive. If unset, this will default to 1.format: int32

Types

2 $defs

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

TextPromptobject

Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.

textstringRequired. The prompt text.

Validate a payload

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