GET

/v1/schemas/openai/chat/completions

kind inputactivity chathash c2fadeb7extracted Jul 6, 2026version currentsource upstream spec ↗

Request body

18 properties · 2 required · 2 $defs
propertytypedescriptionconstraints
model*string | enumID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
prompt*string | string[] | integer[] | …The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.default: "<|endoftext|>"
best_ofintegerGenerates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.0 ≤ n ≤ 20 · default: 1
echobooleanEcho back the prompt in addition to the completiondefault: false
frequency_penaltynumberNumber between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.-2 ≤ n ≤ 2 · default: 0
logit_biasobjectModify the likelihood of specified tokens appearing in the completion.default: null
logprobsintegerInclude the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so the…0 ≤ n ≤ 5 · default: null
max_tokensintegerThe maximum number of [tokens](/tokenizer) that can be generated in the completion.n ≥ 0 · default: 16
nintegerHow many completions to generate for each prompt.1 ≤ n ≤ 128 · default: 1
presence_penaltynumberNumber between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.-2 ≤ n ≤ 2 · default: 0
seedintegerIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.format: int64
stopstring | string[]Not supported with latest reasoning models `o3` and `o4-mini`.default: null
streambooleanWhether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream t…default: false
stream_optionsobjectOptions for streaming response. Only set this when you set `stream: true`.default: null · nullable
suffixstringThe suffix that comes after a completion of inserted text.default: null
temperaturenumberWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.0 ≤ n ≤ 2 · default: 1
top_pnumberAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.0 ≤ n ≤ 1 · default: 1
userstringA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).

Validate a payload

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