API Reference
AI Nexus model API reference, generated from OpenAPI, with an in-page playground.
Overview
The AI Nexus model API is compatible with the OpenAI and Anthropic formats. This reference covers four endpoints; each endpoint page has parameter docs, request samples in several languages and a playground.
| Item | Value |
|---|---|
| Base URL | https://ai.myaiexp.com |
| Authentication | Authorization: Bearer sk-xxxx (create keys on the API Keys page of the console); /v1/messages also accepts x-api-key |
| Format | Content-Type: application/json |
Playground
The playground on each endpoint page sends real requests: put your API key (starts with sk-) in Authorization, edit the body and click Send. Requests go straight from your browser to https://ai.myaiexp.com and are billed, so use a key with a small quota.
Endpoints and models
| Endpoint | Description |
|---|---|
POST /v1/chat/completions | OpenAI-compatible chat completions |
POST /v1/messages | Claude-native Messages |
POST /v1/responses | OpenAI Responses |
GET /v1/models | Models your key can use |
Endpoint support varies by model: /v1/chat/completions is the general OpenAI-compatible endpoint; /v1/messages works with models that support the Claude-native format; /v1/responses works with models that support the Responses API. The available models and the endpoints each one supports are listed on the model square.
Chat Completions
POST /v1/chat/completions — OpenAI-format chat with streaming, function calling and image input.
Responses
POST /v1/responses — OpenAI Responses format for models that support the Responses API; used by Codex CLI.
Messages
POST /v1/messages — Claude-native format used by the Anthropic SDK and Claude Code, for models that support the Claude-native format.
Models
GET /v1/models — list the models your API key can call.
Available models and prices are on the models & pricing page. Prices are synced daily from each vendor's official list price (USD per 1M tokens).
Not covered
This reference covers only the four endpoints above. Image, video and audio generation, embeddings and rerank are out of scope.
See Errors for error shapes and how to handle them.
This service is provided for learning and research purposes only. Please follow each model provider's usage policies.