Skip to main content

Endpoint Overview

Bifrost HTTP transport provides:
  • Unified API endpoints for all providers
  • Drop-in compatible endpoints for existing SDKs
  • MCP tool execution endpoint
  • Prometheus metrics endpoint
Base URL: http://localhost:8080 (configurable)

Unified API Endpoints

All endpoints and request/response formats are OpenAI compatible.

POST /v1/chat/completions

Chat conversation endpoint supporting all providers. Request Body:
Response:
cURL Example:

Streaming Responses

To receive a stream of partial responses, set "stream": true in your request. The response will be a text/event-stream of Server-Sent Events (SSE). Request with Streaming:
SSE Event Stream: Each event in the stream is a JSON object prefixed with data: . The stream is terminated by a [DONE] message.

POST /v1/text/completions

Text completion endpoint for simple text generation. Request Body:
Response:

POST /v1/mcp/tool/execute

Direct MCP tool execution endpoint. Request Body:
Response:

Drop-in Compatible Endpoints

OpenAI Compatible

POST /openai/v1/chat/completions Drop-in replacement for OpenAI API:

Anthropic Compatible

POST /anthropic/v1/messages Drop-in replacement for Anthropic API:

Google GenAI Compatible

POST /genai/v1beta/models/:generateContent Drop-in replacement for Google GenAI API:

Monitoring Endpoints

GET /metrics

Prometheus metrics endpoint:
Sample Metrics:

Request Parameters

Common Parameters

Model Parameters

Chat Message Format

Multimodal Content:

Tool Calling

Automatic Tool Integration

MCP tools are automatically available in chat completions:
Response with Tool Calls:

Multi-turn Tool Conversations


Error Handling

Error Response Format

Common Error Codes

Error Response Examples

Missing Provider:
Rate Limit:

Language SDK Examples

Python (OpenAI SDK)

JavaScript (OpenAI SDK)

Go (Direct HTTP)

Architecture: For endpoint implementation details and performance, see Architecture Documentation.