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.
Overview
xAI is an OpenAI-compatible provider powering the Grok family of models. Bifrost delegates to the OpenAI implementation with standard parameter filtering. Key features:- Full OpenAI compatibility - Chat, text completion, and responses
- Vision support - Image URLs and base64 encoding for multimodal models
- Streaming support - Server-Sent Events with delta-based updates
- Reasoning support - Extended thinking for Grok reasoning models
- Tool calling - Complete function definition and execution
- Parameter filtering - Removes unsupported OpenAI-specific fields
Supported Operations
| Operation | Non-Streaming | Streaming | Endpoint |
|---|---|---|---|
| Chat Completions | ✅ | ✅ | /v1/chat/completions |
| Responses API | ✅ | ✅ | /v1/responses |
| Text Completions | ✅ | ✅ | /v1/completions |
| Image Generation | ✅ | - | /v1/images/generations |
| List Models | ✅ | - | /v1/models |
| Embeddings | ❌ | ❌ | - |
| Speech (TTS) | ❌ | ❌ | - |
| Transcriptions (STT) | ❌ | ❌ | - |
| Files | ❌ | ❌ | - |
| Batch | ❌ | ❌ | - |
Unsupported Operations (❌): Embeddings, Speech, Transcriptions, Files, and Batch are not supported by the upstream xAI API. These return
UnsupportedOperationError.1. Chat Completions
Request Parameters
xAI supports all standard OpenAI chat completion parameters. For full parameter reference and behavior, see OpenAI Chat Completions.Filtered Parameters
Removed for xAI compatibility:prompt_cache_key- Not supportedverbosity- Anthropic-specificstore- Not supportedservice_tier- Not supported
Reasoning Support
xAI’sgrok-3-mini model supports extended reasoning via the standard reasoning_effort field:
Reasoning structure to xAI’s reasoning_effort string format.
Vision Support
xAI vision models support both image URLs and base64-encoded images:- ✅ Image URLs
- ✅ Base64-encoded images
- ✅ Multiple images per message
2. Responses API
xAI’s Responses API is forwarded directly to/v1/responses:
3. Text Completions
xAI supports legacy text completion format:| Parameter | Mapping |
|---|---|
prompt | Direct pass-through |
max_tokens | max_tokens |
temperature, top_p | Direct pass-through |
stop | Stop sequences |
frequency_penalty, presence_penalty | Penalty parameters |
stream: true.
4. Image Generation
xAI’s image generation uses the OpenAI-compatible format. Request Conversion xAI uses the same conversion as OpenAI (see OpenAI Image Generation):- Model & Prompt:
bifrostReq.Model→req.Model,bifrostReq.Prompt→req.Prompt - Parameters: All fields from
bifrostReq(ImageGenerationParameters) are embedded directly into the request struct via struct embedding - Endpoint:
/v1/images/generations
Note :
quality, size and style parameters are not supported by xAI’s API at the moment.BifrostImageGenerationResponse.
Streaming: Image generation streaming is not supported by xAI.
5. List Models
Lists available xAI models with their capabilities and context lengths.Unsupported Features
| Feature | Reason |
|---|---|
| Embedding | Not offered by xAI API |
| Speech/TTS | Not offered by xAI API |
| Transcription/STT | Not offered by xAI API |
| Batch Operations | Not offered by xAI API |
| File Management | Not offered by xAI API |

