Create an OpenAI-compatible Chat Completion

Existing Chat Completions clients retain this endpoint and response shape. Parameter support varies by model. Native Claude fields are accepted as extensions for Opus 5.5, Fable 5 and Fable 5.1; explicit native options take precedence over compatibility mappings. No automatic retries.

post/chat/completions

Request

  • Base URL: https://reapi.ai/api/v1
  • URL: https://reapi.ai/api/v1/chat/completions
  • Auth: HTTP bearer

Headers

anthropic-versionstring

Anthropic protocol version; reAPI supplies this default when omitted for native Claude.

anthropic-betastring

Optional beta feature flags. A flag does not guarantee that the selected model route supports the feature.

Request body

model'gemini-4-argon' | 'gemini-3.6-flash' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6-sol' | 'gpt-6-luna' | 'claude-haiku-5-5' | 'claude-sonnet-5-5' | 'claude-opus-5-5' | 'claude-fable-5-1' | 'claude-fable-5' | 'claude-opus-4-8' | 'kimi-k3' | 'deepseek-v4-flash' | 'deepseek-v4-pro' | 'deepseek-v4.1-flash' required
streamboolean
max_tokensinteger

Optional model-specific output cap. Zero is forwarded for native Claude cache warmup. When both cap fields are supplied, the smaller value is used.

max_completion_tokensinteger
reasoning_effortstring

Model-specific effort. Maps to output_config.effort for native Claude models unless the native field is explicitly supplied.

toolsobject[]
parallel_tool_callsboolean
response_formatobject

Native Claude maps json_schema to output_config.format without rewriting the schema. Its legacy json_object option remains accepted but does not enforce a JSON schema.

temperaturenumber
top_pnumber
ninteger
stream_optionsobject
output_configobject

Native effort and structured output. output_config.format.schema is preserved unchanged. Supported effort values depend on the model; see its API documentation.

thinkingobject

Official thinking options. Thinking modes depend on the model. Haiku 5.5 supports disabled thinking; Sonnet 5.5 supports between_tools at low, medium or high effort. Beta options pass through.

stop_sequencesstring[]
cache_controlobject nullable
top_kinteger
metadataobject
diagnosticsobject nullable

Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.

service_tierstring

Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.

inference_geostring nullable

Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.

context_managementobject nullable
mcp_serversobject[]
speedstring nullable

Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.

compactionobject nullable
output_formatobject nullable

Response

Chat Completion or SSE chunks

idstring
object'chat.completion'
modelstring
choicesobject[]
usageobject

Changes