Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Ageneral virtual key as sk-bf-… or worker-plane JWT where configured. Send as Authorization: Bearer <token>.

Body

application/json

Aligned with OpenAI Chat Completions. Optional fields such as tools, stream, and response_format follow the same JSON shape as OpenAI.

model
string
required

Model id in provider/model form.

Example:

"openai/gpt-4o-mini"

messages
object[]
required

Conversation messages.

stream
boolean

If true, the response uses SSE as text/event-stream.

temperature
number
max_tokens
integer
max_completion_tokens
integer
tools
object[]
tool_choice

Response

Success. JSON object, or text/event-stream when stream is true.

OpenAI-compatible chat completion object.