Five minutes
to connect.
J AI speaks an OpenAI-compatible API. Video is asynchronous: submit a task, then poll. Examples use the Beta domain.
Basics
Base URL: https://api.j-ai.app/v1
Auth: add Authorization: Bearer YOUR_KEY to every request. Create keys in the console and set a limit, an expiry date, a model allow-list and IP restrictions.
All amounts are in HKD and deducted from actual usage. Failed calls are not charged; video tasks are pre-authorised, settled on completion, and refunded if they fail or time out.
Text: chat completions
curl https://api.j-ai.app/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-flash",
"messages": [{"role": "user", "content": "Summarise this in three sentences..."}],
"stream": true
}'
Python (the official OpenAI SDK works as-is):
from openai import OpenAI
client = OpenAI(
base_url="https://api.j-ai.app/v1",
api_key="YOUR_KEY",
)
reply = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)
Streaming, tool calls and JSON mode are supported. Models: deepseek-flash, deepseek-v4-pro, MiniMax-M3, MiniMax-M3.1-Flash.
Image: generations
curl https://api.j-ai.app/v1/images/generations \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-5-261028",
"prompt": "A red apple on a wooden table, soft daylight",
"size": "1024x1024"
}'
The returned data[].url can be downloaded directly. Image URLs may expire; save them promptly.
Voice: text to speech
curl https://api.j-ai.app/v1/audio/speech \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "speech-2.8-hd",
"input": "Hello, this is a J AI voice test.",
"voice": "male-qn-qingse"
}' --output speech.mp3
Video: submit and poll
Submit a task to get a task_id:
curl https://api.j-ai.app/v1/video/generations \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-5-260628",
"prompt": "Waves hitting rocks at dusk, cinematic",
"duration": 5,
"size": "1280x720"
}'
Poll every 5–10 seconds until completed or failed:
curl https://api.j-ai.app/v1/video/generations/TASK_ID \
-H "Authorization: Bearer YOUR_KEY"
Status values: queued, in_progress, completed, failed. A completed task includes a url; a failed task refunds the pre-authorised amount. J AI does not send webhooks — poll from your client.
Models
curl https://api.j-ai.app/v1/models \
-H "Authorization: Bearer YOUR_KEY"
Prices and units are on the pricing page.
Errors
401: invalid or expired key.402: insufficient balance.429: too many requests; back off and retry.5xx: upstream or platform issue; failed requests are not charged. If it persists, email hello@j-ai.app.
Beta limits
- Each user is capped at HK$500; invite only.
- Video tasks run 5–10 seconds, depending on the model.
- Never put a key in browser-side code or a public repo; revoke it in the console if it leaks.
- Prohibited uses are listed in the acceptable use policy.