cheapinference.dev
API REFERENCE

Request parameters

Sampling, output limits, model options, and validation.

Shared parameters

ParameterAccepted valuesNotes
modelSupported IDBare OpenAI IDs and openai/ prefixed IDs
temperature0–2Omitted values use upstream defaults; reasoning models may reject it
top_p0–1Tune this or temperature, usually not both
streamtrue / falseSSE is available on text endpoints
storefalse / omittedNo server-side response retention; true returns 400
service_tierdefault / autoExplicit flex, priority, and other requested tiers are rejected
parallel_tool_callsbooleanModel-dependent; relevant when using tools
metadatastring-keyed objectUpstream metadata; not a substitute for local access control
userstringApplication-level end-user identifier; do not include secrets

Only specified sampling settings are forwarded. Valid ranges do not guarantee that every model supports every option. Model-specific validation errors come back in the provider’s error envelope.

Chat Completions parameters

ParameterValues / shapeNotes
messagesNon-empty arrayFull conversation including tool results
max_completion_tokens / max_tokensPositive integerUp to the model’s output limit, with an absolute 200,000 ceiling
response_formattext / json_object / json_schemaSchema is nested under json_schema
reasoning_effortModel-specific effort stringExamples: low, medium, high; availability varies
frequency_penalty / presence_penalty−2 to 2May not be supported by reasoning models
seedIntegerBest-effort reproducibility, not a guarantee
logprobs / top_logprobsBoolean / integer 0–20top_logprobs requires logprobs on compatible models
logit_biasToken-ID → bias mapNative OpenAI behavior; typical bias range −100 to 100
stopString or arrayModel-dependent stop sequences
predictiontype=content, content=text or text partsSee Predicted Outputs
n1 onlyMultiple candidate completions are not supported

Responses parameters

ParameterValues / shapeNotes
inputString or non-empty arrayRequired even with instructions
instructionsStringRe-send on each independent request
max_output_tokensPositive integerIncludes reasoning and visible output
reasoningObjecteffort, summary and compatible model-specific options
text.formattext / json_object / json_schemaname, schema and strict sit directly in format
text.verbosityModel-specific verbosityUsually low, medium, or high
includeAllowed string arrayreasoning.encrypted_content, message.output_text.logprobs
truncationdisabled / autoUpstream context handling
toolsClient-executed definitionsNo hosted provider execution
tool_choicenone / auto / required / specific toolShape depends on the tool type

Explicitly unsupported options

provider, models, route, plugins, transforms, and upstream-body debug are router-specific and return 400. Non-OpenAI sampling options such as top_k, min_p, top_a, and repetition_penalty are also rejected.

Stored response/item references, provider file IDs, hosted tools, and background generation are unavailable. Do not send them as a fallback: a supported schema with an unsupported feature is still an error. See the compatibility table.