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.

Body

application/json
model
string
required

Model identifier (e.g., gpt-4, gpt-3.5-turbo)

Example:

"gpt-4"

messages
object[]
required

List of messages in the conversation

stream
boolean

Whether to stream the response

max_tokens
integer

Maximum tokens to generate (legacy, use max_completion_tokens)

max_completion_tokens
integer

Maximum tokens to generate

temperature
number
Required range: 0 <= x <= 2
top_p
number
frequency_penalty
number
Required range: -2 <= x <= 2
presence_penalty
number
Required range: -2 <= x <= 2
logit_bias
object
logprobs
boolean
top_logprobs
integer
n
integer
stop
seed
integer
user
string
tools
object[]
tool_choice
Available options:
none,
auto,
required
parallel_tool_calls
boolean
response_format
object

Format for the response

reasoning_effort
enum<string>

OpenAI reasoning effort level

Available options:
none,
minimal,
low,
medium,
high,
xhigh
service_tier
string
stream_options
object
fallbacks
string[]

Fallback models

Response

Successful response

id
string
choices
object[]
created
integer
model
string
object
string
service_tier
string
system_fingerprint
string
usage
object

Token usage information

extra_fields
object

Additional fields included in responses

search_results
object[]
videos
object[]
citations
string[]