Documentation Index
Fetch the complete documentation index at: https://docs.ninjachat.ai/llms.txt
Use this file to discover all available pages before exploring further.
TL;DR pricing
| What | Cost |
|---|
| Chat (budget models) | $0.003/request |
| Chat (standard models) | $0.006/request |
| Chat (premium models) | $0.015/request |
| Chat (ultra models) | $0.03/request |
| Images | 0.03–0.10/image |
| Video | 3.00–5.00/video |
| Search | $0.05/query |
No token counting. No complicated tiers. Every response includes the exact cost:
{ "cost": { "this_request": "$0.006" } }
Credits model
Buy credits upfront. 1 credit = $0.01. Credits never expire.
| Pack | Price | What you get |
|---|
| 1,000 credits | $10 | ~1,666 budget chats, or ~333 images, or 3 videos |
| 2,500 credits | $25 | ~4,166 budget chats, or ~833 images, or 8 videos |
| 10,000 credits | $100 | ~16,666 budget chats, or ~3,333 images, or 33 videos |
Add credits →
Example: building a chatbot
A chatbot handling 100 conversations/day with GPT-5 ($0.006/request):
- Daily cost: 100 × 0.006=∗∗0.60/day**
- Monthly cost: ~$18/month
- Recommended pack: $25 (covers ~6 weeks)
A high-volume classifier using DeepSeek V3 ($0.003/request):
- 10,000 requests/day: $30/day
- Recommended pack: $100 (covers ~3 days)
All model costs
Chat — POST /api/v1/chat
$0.03/req (ultra): claude-opus-4.6
$0.015/req (premium): claude-sonnet-4.6
$0.006/req (standard): gpt-5 o3-mini claude-sonnet-4.5 claude-haiku-4.5 gemini-2.5-pro gemini-3-pro gemini-3.1-pro grok-4 kimi-k2 mistral-large llama-4-maverick kimi-k2.5
$0.003/req (budget): gpt-5-mini gemini-2.5-flash gemini-3-flash llama-4-scout deepseek-v3 qwq-32b glm-5 minimax-m2.5 ninja-1 uncensored-ai
Images — POST /api/v1/images
| Model | Cost |
|---|
flux-kontext-max | $0.10/img |
flux-2-flex | $0.08/img |
flux-1-pro-ultra | $0.08/img |
recraft-v3 | $0.08/img |
google-imagen-4 | $0.08/img |
nano-banana-pro | $0.08/img |
seedream | $0.08/img |
flux-2-pro | $0.05/img |
flux-kontext-pro | $0.05/img |
nano-banana-2 | $0.05/img |
flux-1-fill | $0.05/img |
flux-2-klein | $0.03/img |
nano-banana | $0.03/img |
Generating n images = n × per-image cost.
Video — POST /api/v1/video
| Model | Cost |
|---|
runway-gen4.5 | $5.00/video |
runway-gen4-turbo | $3.00/video |
veo-3.1 | $5.00/video |
seedance-2 kling-video google-veo-2 veo-3.1-fast google-veo-3-fast | $3.00/video |
Failed generations are refunded automatically.
Search — POST /api/v1/search
$0.05/query.
When credits run out
You get a 402 error:
{ "error": "insufficient_credits", "message": "Insufficient credits." }
No request goes through. Add more credits and try again.
Check your balance
From code:
r = requests.get("https://ninjachat.ai/api/api-keys",
headers={"Authorization": f"Bearer {os.environ['NINJACHAT_API_KEY']}"})
print(r.json()["billing"]["balanceFormatted"]) # → "$42.50"
Or from your Developers dashboard.
Low-balance warnings
When your balance drops below $5.00, every API response includes a balance_warning field:
{
"message": { "role": "assistant", "content": "..." },
"cost": { "this_request": "$0.006" },
"balance": "$3.50",
"balance_warning": {
"warning": "low_balance",
"threshold": "Balance is $3.50. Consider adding credits soon."
}
}
At $1.00 or less, the warning becomes "critical_low_balance". Use this to trigger alerts in your app before hitting insufficient_credits.
Purchase history
View all past credit purchases:
r = requests.get("https://ninjachat.ai/api/api-keys/transactions",
headers={"Authorization": f"Bearer {os.environ['NINJACHAT_API_KEY']}"})
for t in r.json()["transactions"]:
print(f"{t['timestamp']} — {t['amount']} ({t['type']})")
Supports limit and offset query params for pagination.
Usage logs
Get per-request usage logs with filtering:
# Recent logs
r = requests.get("https://ninjachat.ai/api/api-keys/logs",
headers={"Authorization": f"Bearer {os.environ['NINJACHAT_API_KEY']}"},
params={"limit": 50, "group": "chat"})
for log in r.json()["logs"]:
print(f"{log['timestamp']} — {log['model']} — {log['statusCode']} — {log['latencyMs']}ms")
Filter options
| Param | Description | Example |
|---|
group | Endpoint type | chat, search, images, video |
model | Model ID | gpt-5, flux-2-klein |
status | HTTP status code | 200, 402 |
from | Start date (ISO) | 2026-03-01T00:00:00Z |
to | End date (ISO) | 2026-03-06T23:59:59Z |
limit | Results per page (max 500) | 100 |
offset | Pagination offset | 100 |
CSV export
Add format=csv to download as a spreadsheet:
curl "https://ninjachat.ai/api/api-keys/logs?format=csv&from=2026-03-01" \
-H "Authorization: Bearer nj_sk_YOUR_API_KEY" \
-o usage.csv
For rate limits per endpoint, see Rate Limits.