chat

Create chat completion (OpenAI-compatible)

Creates a chat completion using an OpenAI-compatible request and response shape. Set stream=true to receive Server-Sent Events with chat.completion.chunk payloads. Use model="auto" to let beatra choose a capable model, or pass a specific model id returned by /v1/models.

post/v1/chat/completions

Request

  • Base URL
    https://api.beatra.ai (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Headers

x-request-id, string nullable
authorization, string nullable

Request body

ChatCompletionRequest required

Request body for POST /v1/chat/completions.

OpenAI-compatible request with an explicit, typed field surface. Raw upstream passthrough is intentionally forbidden because it can override the routed model, messages, streaming mode, or operator service tier.

model, string required

Model name (e.g. 'gpt-4o-mini', 'qwen-max', 'auto')

messages, union[] required
temperature, number nullable
top_p, number nullable
max_tokens, integer nullable

Legacy; reasoning models reject this. beatra maps to max_completion_tokens.

max_completion_tokens, integer nullable
n, integer nullable
seed, integer nullable
stop, union
stream, boolean
stream_options, StreamOptions nullable
frequency_penalty, number nullable
presence_penalty, number nullable
logit_bias, object nullable
logprobs, boolean nullable
top_logprobs, integer nullable
tools, Tool[] nullable
tool_choice, union
parallel_tool_calls, boolean nullable
response_format, union
reasoning, union
reasoning_effort, 'minimal' | 'low' | 'medium' | 'high' | 'max' | 'xhigh' nullable
audio, AudioOutputConfig nullable
modalities, string[] nullable
metadata, object nullable
store, boolean nullable
service_tier, string nullable
safety_identifier, string nullable
prompt_cache_key, string nullable
user, string nullable

Deprecated; use safety_identifier

Response

Sync completion or streaming chat completion chunks

ChatCompletionResponse required

Standard OpenAI ChatCompletion response plus usage.credits.

id, string required
object, 'chat.completion'
created, integer required
model, string required

Resolved model snapshot (OpenAI convention)

system_fingerprint, string nullable
service_tier, string nullable
choices, ChatChoice[] required
usage, ChatUsage required

Changes

No recorded changes to this operation across all 46 revisions of this API.