OpenAI · Anthropic · Gemini compatible
XPNCORE API documentation
Base URL
Add the endpoint path after it, for example /chat/completions.
At a glance
Bearer authentication
Just one Authorization header.
Clear limits
Limits per API key, plan and wallet balance.
Streaming (SSE)
Sent in parts, ending with [DONE].
Authentication
Authorization: Bearer YOUR_API_KEYEndpoints
- POST
/v1/chat/completionsCreate an OpenAI-compatible chat completion.
- POST
/v1/comboQuote, fan out, and synthesize one request across multiple models.
- GET
/v1/modelsList models available to the current API key.
- GET
/v1/models/*modelRetrieve one model available to the current API key.
- POST
/v1/embeddingsCreate vector embeddings for text input.
- POST
/v1/messagesCreate a message using the Anthropic-compatible contract.
- POST
/v1/messages/count_tokensEstimate the input tokens of an Anthropic Messages request without sending it or billing it.
- POST
/v1/completionsCreate a legacy text completion.
- POST
/v1/images/generationsGenerate images from a text prompt.
- POST
/v1/images/editsEdit an image from an image and prompt.
- POST
/v1/images/variationsCreate variations of an uploaded image.
- POST
/v1/audio/speechGenerate speech audio from text.
- POST
/v1/audio/transcriptionsTranscribe audio into text.
- POST
/v1/audio/translationsTranslate audio into English text.
- GET
/v1/realtimedocs.endpoint.realtime.summary
- POST
/v1/rerankRerank documents against a query.
- POST
/v1/moderationsClassify potentially unsafe input.
- POST
/v1/searchSearch the web for a query through a search-capable model.
- POST
/v1/web/fetchRead a web page's content from its URL through a fetch-capable model.
- GET
/v1beta/modelsList models through the Gemini-compatible contract.
- POST
/v1beta/models/*pathGenerate content through the Gemini-compatible contract.
- POST
/v1/responsesCreate a response with the OpenAI Responses contract.
- POST
/v1/responses/compactCompact a Responses conversation context.
- POST
/v1/videosMake a video from a prompt or images, then poll and download it.
Code examples
curl https://api.xpncore.com/v1/chat/completions \
-H "Authorization: Bearer $XPNCORE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'Try it live
Response
The response will appear here.Headers
No headers yet.
Responses and errors
200
OpenAI-compatible JSON with choices, usage, and model.
200 SSE
Each data event carries choices[].delta.content; [DONE] marks the end.
4xx / 5xx
Errors come with a clear message: authentication, permission, allowance, invalid input, or a model that is temporarily failing.
{
"id": "chatcmpl_...",
"object": "chat.completion",
"model": "provider/model",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "Hello" },
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 12, "completion_tokens": 4, "total_tokens": 16 }
}data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hel"}}]}
data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"lo"}}]}
data: [DONE]Limits
- Request size
- Up to 2 MiB (Anthropic Messages and Responses: 32 MiB)
- Timeout
- Depends on the model; use stream=true for long answers
- Streaming
- stream=false JSON · stream=true text/event-stream · [DONE]
- Finding models
- GET /v1/models per API key
- Rate limit
- Per API key and active plan