Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your provider API key or Bifrost authentication token. Virtual keys (prefixed with sk-bf-) can also be passed here.

Path Parameters

path
string
required

Extended path

Body

application/json
model
string
required

Model identifier (e.g., claude-3-opus-20240229)

Example:

"claude-3-opus-20240229"

max_tokens
integer
required

Maximum tokens to generate

messages
object[]
required

List of messages in the conversation

system

System prompt

cache_control
object

Automatic caching directives for the whole request

metadata
object
stream
boolean

Whether to stream the response

temperature
number
Required range: 0 <= x <= 1
top_p
number
top_k
integer
stop_sequences
string[]
tools
object[]
tool_choice
object
mcp_servers
object[]

MCP servers configuration (requires beta header)

thinking
object
output_format
object

Structured output format (requires beta header)

fallbacks
string[]

Response

Successful response

id
string
type
string
default:message
role
string
default:assistant
content
object[]
model
string
stop_reason
enum<string>
Available options:
end_turn,
max_tokens,
stop_sequence,
tool_use,
pause_turn,
refusal,
model_context_window_exceeded,
null
stop_sequence
string | null
usage
object