Skip to content
XPNCORE

OpenAI · Anthropic · Gemini compatible

XPNCORE API documentation

All you need is a base URL, an API key and a model ID. OpenAI, Anthropic and Gemini SDKs all work.

Base URL

https://api.xpncore.com/v1

Add the endpoint path after it, for example /chat/completions.

At a glance

Don't hard-code model IDs. Call GET /v1/models with your API key to get the models you can use.

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

Send your API key as a Bearer token on every request.
HTTP header
Authorization: Bearer YOUR_API_KEY

Endpoints

Every endpoint XPNCORE supports.
  • POST
    /v1/chat/completions

    Create an OpenAI-compatible chat completion.

  • POST
    /v1/combo

    Quote, fan out, and synthesize one request across multiple models.

  • GET
    /v1/models

    List models available to the current API key.

  • GET
    /v1/models/*model

    Retrieve one model available to the current API key.

  • POST
    /v1/embeddings

    Create vector embeddings for text input.

  • POST
    /v1/messages

    Create a message using the Anthropic-compatible contract.

  • POST
    /v1/messages/count_tokens

    Estimate the input tokens of an Anthropic Messages request without sending it or billing it.

  • POST
    /v1/completions

    Create a legacy text completion.

  • POST
    /v1/images/generations

    Generate images from a text prompt.

  • POST
    /v1/images/edits

    Edit an image from an image and prompt.

  • POST
    /v1/images/variations

    Create variations of an uploaded image.

  • POST
    /v1/audio/speech

    Generate speech audio from text.

  • POST
    /v1/audio/transcriptions

    Transcribe audio into text.

  • POST
    /v1/audio/translations

    Translate audio into English text.

  • GET
    /v1/realtime

    docs.endpoint.realtime.summary

  • POST
    /v1/rerank

    Rerank documents against a query.

  • POST
    /v1/moderations

    Classify potentially unsafe input.

  • POST
    /v1/search

    Search the web for a query through a search-capable model.

  • POST
    /v1/web/fetch

    Read a web page's content from its URL through a fetch-capable model.

  • GET
    /v1beta/models

    List models through the Gemini-compatible contract.

  • POST
    /v1beta/models/*path

    Generate content through the Gemini-compatible contract.

  • POST
    /v1/responses

    Create a response with the OpenAI Responses contract.

  • POST
    /v1/responses/compact

    Compact a Responses conversation context.

  • POST
    /v1/videos

    Make a video from a prompt or images, then poll and download it.

Code examples

Pick an endpoint and a language; every example reads the API key from an environment variable.
POST /v1/chat/completions
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

Requests go straight from your browser; the API key stays only in this tab.
208 / 32,768 bytes

Response

The response will appear here.

Headers

No headers yet.

Responses and errors

What you receive, with and without streaming.

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.

200 · application/json
{
  "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 }
}
200 · text/event-stream
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

Limits that apply to every request.
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

Ready to send a request?

The setup wizard helps you create an API key; the Playground lets you try requests right in the browser.