openai-compat

Chat Completions

Changed on

Serve an OpenAI-compatible chat completion.

post/v1/chat/completions

Request

Request body

extra_bodyobject nullable
extra_headersobject nullable
frequency_penaltynumber nullable
include_confidenceboolean
include_spansboolean
logit_biasobject nullable
max_tokensinteger nullable
metadataobject nullable
modelstring required
ninteger nullable
presence_penaltynumber nullable
reasoningobject nullable

Opt-in reasoning / extended-thinking controls. Accepts Fastino's normalized shape with keys enabled (bool), max_tokens (int, Anthropic-style budget), effort (one of minimal/low/medium/high/xhigh/max/none, OpenAI-style tier), and exclude (bool, hide reasoning tokens from the response). effort and max_tokens are mutually exclusive. Fastino extensions for Claude routes (Anthropic direct + Bedrock): mode (manual/adaptive — adaptive lets the model pick thinking depth per request, required on Opus 4.7+) and display (summarized/omitted — controls whether thinking text streams back; omitted preserves only the signature for multi-turn). On Chat Completions, provider reasoning text is hidden by default and is returned on message.reasoning_content / delta.reasoning_content only when the caller explicitly requests visible reasoning with exclude=false or display=summarized. Fastino canonicalizes this into InferenceRequest.reasoning at the adapter boundary and each provider renders it to its native wire field (Anthropic thinking, OpenAI reasoning_effort, Vercel AI Gateway reasoning). Fastino does not enable reasoning by default.

response_formatobject nullable
seedinteger nullable
storeboolean
streamboolean
task_typestring nullable

Deprecated. Legacy task hint (extract_entities / classify_text / extract_json / ner / schema). The unified schema disambiguates the task automatically so this field is no longer required. Submitting it emits Deprecation: true and Sunset: <RFC 7231 date> headers on the response.

temperaturenumber nullable

Sampling temperature

thresholdnumber

Confidence threshold for encoder (GLiNER) predictions.

top_pnumber nullable
truncate_overflow_textboolean

Encoder (GLiNER) models only. When the text is longer than the model's max_input_tokens, cut it to fit instead of rejecting the request with input_too_long. Off by default. A response whose input was cut reports x_fastino.truncated: true; entities past the cut are not returned. Token usage still counts the full submitted text. Texts over 50,000 characters are rejected before truncation applies. Not supported for full fine-tuned encoder models, which still reject.

userstring nullable

Response

Chat completion. Returns application/json (ChatCompletionResponse) by default, or text/event-stream of ChatCompletionStreamChunk events terminated by data: [DONE] when stream=true.

createdinteger
idstring
modelstring required
objectstring

Changes

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property // to the response with the status (media type: application/json)

    • info

      added the optional property // to the response with the status (media type: text/event-stream)

    • info

      added the optional property // to the response with the status (media type: application/json)

    • info

      added the optional property // to the response with the status (media type: text/event-stream)

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: text/event-stream)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/event-stream)