grpc-api-reference.md +0 −29 deleted
File Deleted View Diff
1#### gRPC API
2
3# Overview
4
5The xAI gRPC API exposes the same models and services as the REST API over gRPC. The base URL for all services is `api.x.ai`, and every call must carry the header `Authorization: Bearer <your xAI API key>`.
6
7The protobuf definitions are published in [xai-org/xai-proto](https://github.com/xai-org/xai-proto). The [xAI Python SDK](https://github.com/xai-org/xai-sdk-python) (`xai-sdk`) uses gRPC natively; install it with `pip install xai-sdk`.
8
9## Using buf curl
10
11Clone the proto definitions and use [buf curl](https://buf.build/docs/curl/usage) to call the API:
12
13```bash
14git clone https://github.com/xai-org/xai-proto.git
15cd xai-proto
16```
17
18All `buf curl` examples in this reference assume you run from inside the cloned `xai-proto` directory.
19
20## Services
21
22* [Chat](/developers/grpc-api-reference/chat) — `xai_api.Chat`
23* [Image](/developers/grpc-api-reference/image) — `xai_api.Image`
24* [Video](/developers/grpc-api-reference/video) — `xai_api.Video`
25* [Batch Management](/developers/grpc-api-reference/batches) — `xai_api.BatchMgmt`
26* [Models](/developers/grpc-api-reference/models) — `xai_api.Models`
27* [Auth](/developers/grpc-api-reference/auth) — `xai_api.Auth`
28* [Tokenize](/developers/grpc-api-reference/tokenize) — `xai_api.Tokenize`
29* [Raw Sampling](/developers/grpc-api-reference/sample) — `xai_api.Sample`