Skip to main content
POST
/
v1
/
responses
/
input_tokens
Error
A valid request URL is required to generate request examples
{
  "object": "<string>",
  "model": "<string>",
  "input_tokens": 123,
  "input_tokens_details": {
    "text_tokens": 123,
    "audio_tokens": 123,
    "image_tokens": 123,
    "cached_read_tokens": 123,
    "cached_write_tokens": 123
  },
  "tokens": [
    123
  ],
  "token_strings": [
    "<string>"
  ],
  "output_tokens": 123,
  "total_tokens": 123,
  "extra_fields": {
    "request_type": "<string>",
    "provider": "openai",
    "model_requested": "<string>",
    "model_deployment": "<string>",
    "latency": 123,
    "chunk_index": 123,
    "raw_request": {},
    "raw_response": {},
    "cache_debug": {
      "cache_hit": true,
      "cache_id": "<string>",
      "hit_type": "<string>",
      "requested_provider": "<string>",
      "requested_model": "<string>",
      "provider_used": "<string>",
      "model_used": "<string>",
      "input_tokens": 123,
      "threshold": 123,
      "similarity": 123
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.getbifrost.ai/llms.txt

Use this file to discover all available pages before exploring further.

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

messages
object[]
required
fallbacks
string[]
tools
object[]
instructions
string
text
string

Response

Successful response

object
string
model
string
input_tokens
integer
input_tokens_details
object
tokens
integer[]
token_strings
string[]
output_tokens
integer
total_tokens
integer
extra_fields
object

Additional fields included in responses