SpyBara
Go Premium

rest-api-reference/inference.md 2026-10-07 23:59 UTC to 2026-10-08 23:58 UTC

This page contains 0 additions and 4 deletions.

2026
Thu 8 23:58

API Reference

Overview

The xAI REST API is compatible with the OpenAI REST API. This reference is generated from the OpenAPI specification and organised by resource.

Base URLs and authentication

API Base URL Authenticate with
Inference (responses, chat completions, images, videos, voice, files, batches, models) https://api.x.ai Authorization: Bearer <xAI API key>
Collections management https://management-api.x.ai Authorization: Bearer <xAI Management API key>
Collections search https://api.x.ai Authorization: Bearer <xAI API key>
Management (API keys, teams, billing, audit) https://management-api.x.ai Authorization: Bearer <xAI Management API key>

API keys are created on the API Keys page of the xAI Console. Management keys are created on the Management Keys page; see Using Management API.

Inference API

Management-key APIs

For status codes and their likely causes, see Debugging Errors.