APIPool Quickstart
Create an API key, add credit, and send your first request.
Base URL
https://app.apipool.devThe base URL contains no /v1 and no protocol path. Choose the protocol by model
and group. A key can access enabled models in its group; this does not mean
every model supports every endpoint.
- Text — use
/v1/responsesfor models that support Responses, or/v1/chat/completionsfor models that support Chat Completions. Follow the model guide. - Images — use the Images request format and asynchronous task polling; see Image models and protocols. Do not substitute image model IDs into the text examples below.
- Vendor-native formats — use only explicitly enabled endpoints, such as
Anthropic
/v1/messages. Native Gemini image-generation endpoints are not currently enabled.
Some SDKs and tools append /v1 themselves. Follow their documentation or the
examples below when configuring them.
Choose a model and protocol
| Model family | Group | Endpoint and guide |
|---|---|---|
| GPT text models | Discount | /v1/responses; Codex |
| Claude | Discount, Discount 2 | Use Claude Code, which calls /v1/messages |
| Qwen, GLM, Kimi text models | Official | /v1/chat/completions; Qwen, GLM, Kimi |
| Image models | Depends on model | Images and async tasks |
This protocol table does not guarantee continuous model availability. Check the catalog status and your key's group before following the matching guide.
Authentication
Send your key in the Authorization header:
Authorization: Bearer $APIPOOL_API_KEYCreate a key in the console and save its full value. You can copy it again when the list shows a Copy button. If the key is masked and cannot be copied, create a replacement and update your application. Disabled or deleted keys can no longer be copied.
Get started
- Sign up and open the console.
- Add credit on the balance page. Usage is billed at the published rate for the model and group you pick; your balance never expires.
- Create an API key and copy the full value from the creation result or the key list.
- Pick a model from the model list and call it with the examples below.
curl
APIPOOL_ENDPOINT="https://app.apipool.dev"
curl "$APIPOOL_ENDPOINT/v1/responses" \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-luna","input":"Hello from APIPool"}'OpenAI SDK (JavaScript)
import OpenAI from 'openai';
const APIPOOL_ENDPOINT = 'https://app.apipool.dev';
const client = new OpenAI({
baseURL: `${APIPOOL_ENDPOINT}/v1`,
apiKey: process.env.APIPOOL_API_KEY,
});
const response = await client.responses.create({
model: 'gpt-5.6-luna',
input: 'Hello from APIPool',
});
console.log(response.output_text);OpenAI SDK (Python)
import os
from openai import OpenAI
APIPOOL_ENDPOINT = "https://app.apipool.dev"
client = OpenAI(
base_url=f"{APIPOOL_ENDPOINT}/v1",
api_key=os.environ["APIPOOL_API_KEY"],
)
response = client.responses.create(
model="gpt-5.6-luna",
input="Hello from APIPool",
)
print(response.output_text)Plain HTTP (fetch)
const APIPOOL_ENDPOINT = 'https://app.apipool.dev';
const response = await fetch(`${APIPOOL_ENDPOINT}/v1/responses`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.APIPOOL_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'gpt-5.6-luna',
input: 'Hello from APIPool',
}),
});
console.log(await response.json());Chat Completions
Official Group Qwen, GLM, and available Kimi text models use this endpoint. Use an Official Group key and select an available text model from the model list. This example does not apply to image models.
APIPOOL_ENDPOINT="https://app.apipool.dev"
curl "$APIPOOL_ENDPOINT/v1/chat/completions" \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"qwen3.8-flash","messages":[{"role":"user","content":"Reply only: APIPOOL-OK"}],"stream":false}'Read a non-streaming answer from choices[0].message.content. For streaming,
usage, and family-specific limits, see Qwen,
GLM, and Kimi.
Claude and Anthropic Messages
Claude models in the Discount Group and Discount Group 2 currently require
Claude Code. They use POST /v1/messages, but ordinary curl requests or
Anthropic SDK clients do not gain access merely by using that endpoint.
Follow the Claude Code guide to configure the endpoint and key. Choose a complete model ID available in your key's group. Do not reuse an old model ID or substitute Claude into a Responses example for another model.
Image generation and editing
The listed image families use JSON /v1/images/generations. Models that support
file uploads also accept /v1/images/edits (multipart/form-data). Wan edits use
image_urls on the generation endpoint; Z-Image supports text-to-image only.
See Image models and protocols for exact model coverage.
These image requests are asynchronous: submission returns 202 Accepted, then
poll the task ID with the same key. The request format resembles Images, but the
response is a task, not the synchronous OpenAI Images result. Do not read the
submission as data[].url. Image endpoints do not support stream: true.
For GPT Image 2 billing, see the Official Group guide
or Discount Group guide.
curl "$APIPOOL_ENDPOINT/v1/images/generations" \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A product photo on a white background","size":"1:1","resolution":"1k","n":1}'Submission and polling are documented in full under Asynchronous image tasks.
Streaming
The Responses, Chat Completions, and Messages endpoints accept "stream": true
and return an SSE stream. The image endpoints do not support streaming.
Error reference
| Status | Meaning | What to do |
|---|---|---|
401 | Key missing, invalid, disabled, or deleted | Check the header and key status in the console |
403 | Key has no access to the requested model | Review the key's model restrictions |
429 insufficient_quota | Balance is exhausted | Add credit in the console |
429 concurrency_limit_exceeded | Concurrency limit reached | Back off and retry using Retry-After |
404 model_not_found | Model ID not available | Pick a model from the model list |
Follow the steps below for these errors. Replacing your API key or adding credit is usually unnecessary:
| Status and code | Meaning and action |
|---|---|
400 model_not_supported_in_group | This model is not available in the selected group; check the model and group, and contact support if it persists |
429 rate_limit_exceeded | Request frequency is limited; reduce request frequency and follow Retry-After when present |
502 upstream_authentication_failed | Temporary service error; contact support with the request ID |
503 upstream_service_unavailable / upstream_capacity_exhausted | The service is temporarily unavailable or busy; try later or use another available model |
Keep the X-APIPool-Request-Id response header or error.request_id when reporting
an error. Once an image submission returns a task ID, query that same task.
A disconnected poll does not mean submission failed; do not immediately resubmit.
Billing
Top up in dollars on the balance page. Text model usage is charged at the token rates shown in the model list; per-call models such as images are charged at the tier rate multiplied by the number of units actually returned. Requests, tokens, per-model spend, and per-request charges appear on the usage and billing pages.