API access
AIAdapter is an OpenAI-compatible API. One account issues one API key. That same key authenticates every request—desktop clients and application code alike. Do not create a second key per model, vendor, or client.
Replace the origin below only if you are calling a non-production host. The path /v1 is required.
1. Credentials
Sign in, open Console → API Keys, and create the key once. The secret is shown at creation; store it immediately. Reuse it everywhere.
| Field | Value |
|---|---|
| Base URL | https://www.aiadapter.com/v1 |
| Authentication | Authorization: Bearer <API_KEY> |
| Model ID | The identifier listed on /models |
Official OpenAI client libraries append endpoint paths such as /chat/completions to the base URL. Point the client at …/v1, not at the site root.
Treat the key as a secret. Do not commit it, paste it into tickets, or embed it in browser JavaScript, mobile apps, or other clients that end users can inspect. Load it from an environment variable or a secret manager. If it is exposed, delete it and create a single replacement.
2. Direct client access
Use this path when you want to call models from an existing OpenAI-compatible application and do not want to write integration code. Typical clients include Cursor, Claude Desktop, Cherry Studio, Continue, and LibreChat.
Configure three fields only. The key is the same credential issued in the console.
Cursor
- Open Settings → Models.
- Paste the API key into the OpenAI API Key field.
- Enable Override OpenAI Base URL and set https://www.aiadapter.com/v1 (lowercase v1).
- Add the model identifier from the marketplace under Custom Models. Prefer an ID that does not collide with a built-in Cursor model name.
Cursor Tab and some built-in Cursor models do not use a custom OpenAI base URL. Chat against a marketplace model ID after the override is set. If a field will not accept focus, update Cursor to 3.15.20 or later.
Other OpenAI-compatible clients
In Claude Desktop, Cherry Studio, Continue, LibreChat, or any client that accepts an OpenAI-compatible provider:
- Provider / API type: OpenAI compatible
- Base URL: https://www.aiadapter.com/v1
- API key: the single AIAdapter key
- Model: the marketplace identifier
Do not mint a second key for a second client. Two clients with the same key is the intended configuration.
3. Application integration
Use this path when you are writing software. The contract is the same: one key, one base URL, Bearer authentication. The examples below use the official OpenAI libraries as a drop-in client.
Set AIADAPTER_API_KEY in the process environment. Do not hard-code the secret. Replace MODEL_ID with the exact identifier from /models, including the seller prefix.
HTTP
curl https://www.aiadapter.com/v1/chat/completions \
-H "Authorization: Bearer $AIADAPTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "Reply with one word: ok"}]
}'
Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AIADAPTER_API_KEY"],
base_url="https://www.aiadapter.com/v1",
)
response = client.chat.completions.create(
model="MODEL_ID",
messages=[{"role": "user", "content": "Reply with one word: ok"}],
)
print(response.choices[0].message.content)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AIADAPTER_API_KEY,
baseURL: "https://www.aiadapter.com/v1",
});
const response = await client.chat.completions.create({
model: "MODEL_ID",
messages: [{ role: "user", content: "Reply with one word: ok" }],
});
console.log(response.choices[0].message.content);
4. Models and endpoints
List available models with GET /v1/models using the same Bearer key, or browse /models. Use the listed identifier as model. Identifiers include a seller prefix. Copy them exactly. Examples: pixverse/c1, byteplus-intl/dreamina-seedance-2-5-260628. Do not send a short name such as c1 or seedance-2.5.
Common OpenAI-compatible routes:
- POST /v1/chat/completions — chat and language models
- POST /v1/images/generations — image models
- POST /v1/video/generations then GET /v1/video/generations/{id} — video models
Images
Image generation is synchronous. Put the marketplace identifier in model.
curl https://www.aiadapter.com/v1/images/generations \
-H "Authorization: Bearer $AIADAPTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "byteplus-intl/dola-seedream-5-0-flash-260915",
"prompt": "A red paper lantern in rain"
}'
Video
Submit returns a job. Poll the same path with that job id until the task succeeds or fails. Do not wait on the submit request for the finished file.
curl https://www.aiadapter.com/v1/video/generations \
-H "Authorization: Bearer $AIADAPTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "pixverse/c1",
"prompt": "A cat walking across a sunlit kitchen",
"seconds": "5"
}'
curl https://www.aiadapter.com/v1/video/generations/JOB_ID \
-H "Authorization: Bearer $AIADAPTER_API_KEY"
Audio and other modalities follow the card on the marketplace for that model.
A 401 means the key is missing or invalid. A 429 means the request was rate-limited. Insufficient balance or quota is returned as an API error; add credit in the console before retrying.
5. Key handling
One key is sufficient for every integration on the account. Creating additional keys splits audit trails and increases the chance of leakage; it does not unlock extra models.
Questions: help@aiadapter.com