1#### Inference API1#### API Reference
2 2
3# Inference REST API Overview3# Overview
4 4
5The xAI Inference REST API is a robust, high-performance RESTful interface designed for seamless integration into existing systems.5The xAI REST API is compatible with the OpenAI REST API. This reference is generated from the OpenAPI specification and organised by resource.
6It offers advanced AI capabilities with full compatibility with the OpenAI REST API.
7 6
8The base for all routes is at `https://api.x.ai`. For all routes, you have to authenticate with the header `Authorization: Bearer <your xAI API key>`.7## Base URLs and authentication
9 8
10* [Chat](/developers/rest-api-reference/inference/chat)9| API | Base URL | Authenticate with |
10| --- | --- | --- |
11| Inference (responses, chat completions, embeddings, images, videos, voice, files, batches, models) | `https://api.x.ai` | `Authorization: Bearer <xAI API key>` |
12| Collections management | `https://management-api.x.ai` | `Authorization: Bearer <xAI Management API key>` |
13| Collections search | `https://api.x.ai` | `Authorization: Bearer <xAI API key>` |
14| Management (API keys, teams, billing, audit) | `https://management-api.x.ai` | `Authorization: Bearer <xAI Management API key>` |
15
16API keys are created on the [API Keys page](https://console.x.ai/team/default/api-keys?utm_source=docs\&utm_medium=referral\&utm_campaign=developers-rest-api-reference-inference\&utm_content=api-keys) of the xAI Console. Management keys are created on the [Management Keys page](https://console.x.ai/team/default/management-keys?utm_source=docs\&utm_medium=referral\&utm_campaign=developers-rest-api-reference-inference\&utm_content=management-keys); see [Using Management API](/developers/management-api-guide).
17
18## Inference API
19
20* [Responses](/developers/rest-api-reference/inference/responses)
21* [Chat Completions](/developers/rest-api-reference/inference/chat-completions)
22* [Embeddings](/developers/rest-api-reference/inference/embeddings)
11* [Images](/developers/rest-api-reference/inference/images)23* [Images](/developers/rest-api-reference/inference/images)
12* [Videos](/developers/rest-api-reference/inference/videos)24* [Videos](/developers/rest-api-reference/inference/videos)
13* [Voice](/developers/rest-api-reference/inference/voice)25* [Voice](/developers/rest-api-reference/inference/voice)
14* [Models](/developers/rest-api-reference/inference/models)
15* [Files](/developers/rest-api-reference/files)26* [Files](/developers/rest-api-reference/files)
16* [Batches](/developers/rest-api-reference/inference/batches)27* [Batches](/developers/rest-api-reference/inference/batches)
17* [Other](/developers/rest-api-reference/inference/other)28* [Models](/developers/rest-api-reference/inference/models)
29* [Account](/developers/rest-api-reference/inference/other)
18* [Legacy & Deprecated](/developers/rest-api-reference/inference/legacy)30* [Legacy & Deprecated](/developers/rest-api-reference/inference/legacy)
31
32## Management-key APIs
33
34* [Collections API](/developers/rest-api-reference/collections)
35* [Management API](/developers/rest-api-reference/management)
36
37## Other protocols
38
39* [gRPC API](/developers/grpc-api-reference)
40
41For status codes and their likely causes, see [Debugging Errors](/developers/debugging).