GET
/v1/schemas/ollama/chat/api/generate
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source traced8e08be41dd858c933c32bef5ee8d0c5faf7d7462069a49b368731cfbceaab03{
"fetchedAt": 1794288644,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
13 properties · 1 required · 2 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | Model name | |
| prompt | string | Text for the model to generate a response from | |
| suffix | string | Used for fill-in-the-middle models, text that appears after the user prompt and before the model response | |
| images | string[] | ||
| format | string | object | Structured output format for the model to generate a response from. Supports either the string `"json"` or a JSON schema object. | |
| system | string | System prompt for the model to generate a response from | |
| stream | boolean | When true, returns a stream of partial responses | default: true |
| think | boolean | string | Controls a model's thinking output. Use `/api/show` to discover the supported values and default for the selected model. `true` requests thinking, `false` requests no thinking output, and `null` uses the model default. String values are model-defined; supporte… | nullable |
| raw | boolean | When true, returns the raw response from the model without any prompt templating | |
| keep_alive | string | number | Model keep-alive duration (for example `5m` or `0` to unload immediately) | |
| options | ModelOptions | Runtime options that control text generation | |
| logprobs | boolean | Whether to return log probabilities of the output tokens | |
| top_logprobs | integer | Number of most likely tokens to return at each token position when logprobs are enabled |
Types
2 $defsModelOptionsobject
Runtime options that control text generation
| seed | integer | Random seed used for reproducible outputs | |
| temperature | number | Controls randomness in generation (higher = more random) | format: float |
| top_k | integer | Limits next token selection to the K most likely | |
| top_p | number | Cumulative probability threshold for nucleus sampling | format: float |
| min_p | number | Minimum probability threshold for token selection | format: float |
| stop | string | string[] | Stop sequences that will halt generation | |
| num_ctx | integer | Context length size (number of tokens) | |
| num_predict | integer | Maximum number of tokens to generate |
ThinkValueboolean | string
Controls a model's thinking output. Use `/api/show` to discover the supported values and default for the selected model. `true` requests thinking, `false` requests no thinking output, and `null` uses the model default. String values are model-defined; supporte…
nullable
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"ollama","endpointId":"api/generate","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}