How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

xAI Messages API

The Messages API from xAI — 1 operation(s) for messages.

xAI Messages API is one of 17 APIs that xAI publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Message. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, and an AsyncAPI specification.

This API exposes 1 operation across 1 path, and defines 16 schemas. It is described by OpenAPI 3.2.0, at version 1.0.0.

Requests are made against the base URL https://api.x.ai/v1.

1 operations 1 paths 16 schemas 1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0.0
Base URL
https://api.x.ai/v1
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

xAI Messages API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth).

Paths & Operations 1

Across 1 path, the API surfaces 1 operation — 1 POST. Each is listed below with its method, path, parameters, and response codes.

Messages 1
POST
/v1/messages
Create a messages response. This endpoint is compatible with the Anthropic API
handle_generic_messages_request body → 200400422

Schemas 16

The contract defines 16 schemas that model the data the API accepts and returns. The most detailed are MessageRequest (12 properties), MessageResponse (8 properties), MessageUsage (4 properties), MessageTools (4 properties). Each schema is shown below with its type and property counts.

MessageTools
object
4 properties 3 required
MessageBody
object
Anthropic compatible message body
2 properties 2 required
ToolResultContentBlock
A single content block within a toolresult's array content.
SystemMessageContent
MessageUsage
object
4 properties 4 required
MessageResponseContent
MessageResponse
object
Response message for /v1/messages
8 properties 6 required
MessageContentPart
ToolResultContent
Content of a toolresult block. The Anthropic SDK may send this as either a plain string or an array of typed content blocks (e.g. [{"type": "text", "text": "..…
MessageImageContent
MessageMetadata
object
1 property
MessageToolInputSchema
object
3 properties 2 required
SystemMessagePart
object
3 properties 2 required
MessageContent
MessageToolChoice
Tool choice option.
MessageRequest
object
Request message for /v1/messages
12 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

xai-messages-api-openapi.yml Raw ↑

Other APIs xAI publishes across the network.

xAI Api Key API
xAI Chat API
xAI Complete API
xAI Completions API
xAI Documents API
xAI Embedding Models API
xAI Embeddings API
xAI Files API
xAI Image Generation Models API
xAI Images API
xAI Language Models API
xAI Models API
Where this information came from

This is an independent, third-party profile of xAI Messages API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.