Quickstart
Create an APISea API key and send your first chat, image and video requests in five minutes with cURL, Python or Node.js.
← მთელი დოკუმენტაციაAPISea gives you one API key and one base URL for every model in the model directory. If you have used the OpenAI API before, you already know how to use APISea: change the base URL, use your APISea key, and pick a model id.
1. Create an account and a key
- Sign in with Google or a one-time email code. Your account is created automatically.
- Open the console and top up your balance. The minimum top-up is $50 and the balance does not expire.
- Click Create key, give it a name such as
development, and copy the key. It starts withsk-sea-and is shown in full only once.
Tip
Store the key in an environment variable such as
APISEA_API_KEYinstead of hard-coding it. Never ship it in browser or mobile app code.
2. Send your first chat request
The base URL is https://api.apisea.ai/v1. Every chat model uses the OpenAI-compatible POST /v1/chat/completions endpoint.
curl https://api.apisea.ai/v1/chat/completions \
-H "Authorization: Bearer $APISEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Explain what an API gateway does in two sentences."}
]
}'from openai import OpenAI
client = OpenAI(api_key="sk-sea-...", base_url="https://api.apisea.ai/v1")
resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Explain what an API gateway does in two sentences."}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.APISEA_API_KEY, baseURL: "https://api.apisea.ai/v1" });
const resp = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Explain what an API gateway does in two sentences." }],
});
console.log(resp.choices[0].message.content);To switch to Claude, Gemini or DeepSeek, change only the model field — for example claude-sonnet-4-6, gemini-3.5-flash or deepseek-v4-pro.
3. Stream tokens
Add "stream": true to receive server-sent events as the model writes. The final chunk includes token usage, which is what you are billed for.
stream = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Write a haiku about the sea."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)4. Generate an image (async)
Image and video models are asynchronous. The generation endpoint returns a task_id; you then poll the task until it is completed.
curl https://api.apisea.ai/v1/images/generations \
-H "Authorization: Bearer $APISEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-image-2", "prompt": "A lighthouse on a cliff at dawn, film photo", "size": "16:9", "resolution": "1k"}'
# => {"code":200,"data":[{"status":"submitted","task_id":"task_01..."}]}
curl https://api.apisea.ai/v1/tasks/task_01... \
-H "Authorization: Bearer $APISEA_API_KEY"When status is completed, the response contains the image URLs. Result URLs are temporary, so download anything you want to keep.
5. Generate a video (async)
import time, requests
API = "https://api.apisea.ai/v1"
H = {"Authorization": "Bearer sk-sea-..."}
task = requests.post(f"{API}/videos/generations", headers=H, json={
"model": "seedance-2.0",
"prompt": "A paper boat drifting down a rainy street, cinematic, slow push-in",
"duration": 5,
"resolution": "720p",
}).json()["data"][0]["task_id"]
while True:
r = requests.get(f"{API}/tasks/{task}", headers=H).json()["data"]
if r["status"] in ("completed", "failed"):
print(r)
break
time.sleep(5)Video models are usually billed per second of output, so this 5-second 720p clip costs five times the per-second 720p rate shown on the Seedance 2.0 page.
Next steps
- Authentication — header formats for OpenAI, Anthropic and Gemini clients.
- SDKs & base URLs — configuration for popular SDKs and tools.
- Errors & billing — error codes, retries and how each request is priced.
- API reference — endpoint-by-endpoint documentation for every model family.
დოკუმენტაციაში შეცდომა შენიშნეთ? მოგვწერეთ ელფოსტაზე support@apisea.ai.