このページは英語のみです。

Calling

Calling is a base-URL change. The wire format is exactly OpenAI's on /v1/chat/completions and exactly Anthropic's on /v1/messages, so any SDK works without touching the rest of your code.

Terminalbash
1https://api.aile.sh/v1

What is different from a normal provider

The catalogue is live. GET /v1/models is an aggregation over the sharers who can serve right now, cached for 60 seconds. A model appears once a sharer's account has passed a test of it, and disappears when nobody is sharing it.

Caller format and provider format are independent. You can ask for a Claude model through the OpenAI endpoint, or a Codex model through the Anthropic endpoint. Aile translates between wire shapes; your SDK never has to know.

You can steer the routing. Cap the price, pin a provider, require an attested account, or name one machine, per request with headers, or pinned to the key itself. See Choosing a sharer.

You pay per token (per unit on most non-chat endpoints), from a balance you fund. No seats, no minimums. See Pricing & fees. Set max_tokens: a request that names no cap can bill up to what the provider was allowed to write. See Spend & limits.

The five-minute version

  1. Mint a key in the dashboard. It looks like sk-aile-….

  2. Fund your wallet with USDC on Solana (or USDT, SOL or $AILE, each swapped to USDC at no fee). Wallet & funding.

  3. Point your SDK at https://api.aile.sh/v1 and send. Your first request.

The endpoints

EndpointFormatNotes
POST /v1/chat/completionsOpenAI Chat CompletionsThe default for most SDKs.
POST /v1/messagesAnthropic MessagesSame catalogue, Anthropic's shape.
POST /v1/responsesOpenAI Responses
POST /v1/embeddingsOpenAI EmbeddingsPer token, at the sharer's quote. Embeddings
POST /v1/images/generations, /v1/images/edits, /v1/imagesOpenAI / OpenRouterPer image. Images
POST /v1/rerank, /v2/rerankCoherePer search. Rerank
POST /v1/moderationsOpenAIPer input. Moderations
POST /v1/ocrMistralPer page. OCR
POST /v1/searchAilePer query. Web search
POST /v1/scrapeAilePer page. Scrape
POST /v1/audio/speech, /transcriptions, /translationsOpenAIPer 1,000 characters (1,000 UTF-8 bytes on Fish Audio models) or per minute. ElevenLabs and Fish Audio take their own voice ids. Audio
POST /v1/videos, /v1/videos/generations, GET /v1/videos/{id}OpenAI / xAIPer second, as a job answered at once. Video
POST /v1/music/generationsAilePer track. Music
POST /v1/decisions, /v1/systemoneOpenRouterPer token, never above list. Decisions
POST /v1/messages/count_tokensAnthropicAdvisory estimate. It probes no sharer and bills nothing.
GET /v1/modelsOpenAIPublic. What can be served right now.
GET /v1/models/{id}OpenAIPublic. Ids contain /, and that is handled.

Every model is <provider>/<model>. The non-chat endpoints have no failover, and are buffered except image generations and edits on models that stream, and speech with stream_format: "audio". Where the deployment enables it, images, speech, transcription and translation, rerank, moderations, OCR, web search, scrape, one-shot music and video also take keyless x402. Video is charged when the render starts and refunded if it fails.

The full generated reference, runnable in the browser: API reference.

Where to go next

If you want to…Read
Send something nowYour first request
Understand cc/claude-sonnet-5Model names
Control who serves youChoosing a sharer
Stream tokensStreaming
Handle failures properlyErrors
Know what you have spentSpend & limits