2 2
3# Overview3# Overview
4 4
5The xAI REST API is compatible with the OpenAI REST API. This reference is generated from the OpenAPI specification and organised by resource.5The SpaceXSI REST API is compatible with the OpenAI REST API. This reference is generated from the OpenAPI specification and organised by resource.
6 6
7## Base URLs and authentication7## Base URLs and authentication
8 8
9| API | Base URL | Authenticate with |9| API | Base URL | Authenticate with |
10| --- | --- | --- |10| --- | --- | --- |
11| Inference (responses, chat completions, images, videos, voice, files, batches, models) | `https://api.x.ai` | `Authorization: Bearer <xAI API key>` |11| Inference (responses, chat completions, images, videos, voice, files, batches, models) | `https://api.x.ai` | `Authorization: Bearer <API key>` |
12| Collections management | `https://management-api.x.ai` | `Authorization: Bearer <xAI Management API key>` |12| Collections management | `https://management-api.x.ai` | `Authorization: Bearer <Management API key>` |
13| Collections search | `https://api.x.ai` | `Authorization: Bearer <xAI API key>` |13| Collections search | `https://api.x.ai` | `Authorization: Bearer <API key>` |
14| Management (API keys, teams, billing, audit) | `https://management-api.x.ai` | `Authorization: Bearer <xAI Management API key>` |14| Management (API keys, teams, billing, audit) | `https://management-api.x.ai` | `Authorization: Bearer <Management API key>` |
15 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).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 SpaceXSI 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 17
18## Inference API18## Inference API
19 19