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 in provider/model format (e.g., openai/gpt-4)

Example:

"openai/gpt-4"

messages
object[]
required

List of messages in the conversation

fallbacks
string[]

Fallback models in provider/model format

stream
boolean

Whether to stream the response

frequency_penalty
number
Required range: -2 <= x <= 2
logit_bias
object
logprobs
boolean
max_completion_tokens
integer
metadata
object
modalities
string[]
parallel_tool_calls
boolean
presence_penalty
number
Required range: -2 <= x <= 2
prompt_cache_key
string
reasoning
object
response_format
object

Format for the response

safety_identifier
string
service_tier
string
stream_options
object
store
boolean
temperature
number
Required range: 0 <= x <= 2
tool_choice
Available options:
none,
auto,
required
tools
object[]
seed
integer

Deterministic sampling seed

top_p
number

Nucleus sampling parameter

Required range: 0 <= x <= 1
top_logprobs
integer

Number of most likely tokens to return at each position

Required range: 0 <= x <= 20
stop

Up to 4 sequences where the API will stop generating tokens

prediction
object

Predicted output content for the model to reference (OpenAI only). Can reduce latency.

prompt_cache_retention
enum<string>

Prompt cache retention policy

Available options:
in_memory,
24h
web_search_options
object

Web search options for chat completions (OpenAI only)

truncation
string
user
string
verbosity
enum<string>
Available options:
low,
medium,
high

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[]