Subscriptions
Manage your AINative subscription plan — view current plan details, compare available plans, upgrade or downgrade, and inspect usage against your plan limits.
Base URL: https://api.ainative.studio
Available Plans
GET /api/v1/subscription/plans
List all available subscription plans. No authentication required.
curl https://api.ainative.studio/api/v1/subscription/plans
import httpx
resp = httpx.get("https://api.ainative.studio/api/v1/subscription/plans")
plans = resp.json()["data"]["plans"]
Response
{
"success": true,
"data": {
"plans": [
{
"id": "starter",
"name": "Starter",
"credits": 1000,
"price": 0,
"currency": "USD",
"interval": "month",
"features": [
"1,000 API credits",
"10K LLM tokens",
"0.5 GB storage",
"Community support"
]
},
{
"id": "pro",
"name": "Pro",
"credits": 50000,
"price": 49.00,
"currency": "USD",
"interval": "month",
"features": [
"50,000 API credits",
"1M LLM tokens",
"10 GB storage",
"50 MCP hours",
"Email support"
]
},
{
"id": "business",
"name": "Business",
"credits": 150000,
"price": 149.00,
"currency": "USD",
"interval": "month",
"features": [
"150,000 API credits",
"5M LLM tokens",
"50 GB storage",
"500 MCP hours",
"Cody included",
"Priority support"
]
},
{
"id": "enterprise",
"name": "Enterprise",
"credits": 200000,
"price": 699.00,
"currency": "USD",
"interval": "month",
"features": [
"200,000 API credits",
"10M LLM tokens",
"100 GB storage",
"1,000 MCP hours",
"Cody + Swarm",
"Dedicated support"
]
}
]
}
}
Get Current Subscription
GET /api/v1/subscription
Returns full subscription details for the authenticated user. Returns null under subscription if no active subscription exists.
Auth required.
curl https://api.ainative.studio/api/v1/subscription \
-H "Authorization: Bearer <your_api_key>"
import httpx
resp = httpx.get(
"https://api.ainative.studio/api/v1/subscription",
headers={"Authorization": "Bearer <your_api_key>"},
)
sub = resp.json()["data"]["subscription"]
if sub:
print(sub["plan"]["name"], sub["status"])
Response (active subscription)
{
"success": true,
"data": {
"subscription": {
"id": "sub-uuid",
"status": "active",
"current_period_start": "2026-04-01T00:00:00Z",
"current_period_end": "2026-04-30T23:59:59Z",
"cancel_at_period_end": false,
"canceled_at": null,
"plan": {
"id": "pro",
"name": "Pro",
"price": 49.00,
"currency": "USD",
"interval": "month",
"features": ["50,000 API credits", "1M LLM tokens", "10 GB storage", "50 MCP hours", "Email support"],
"is_active": true
},
"auto_renew": true,
"quantity": 1
}
}
}
Get Public Subscription Details
GET /api/v1/subscription/public
A simplified subscription view that includes credit balances and plan limits. Suitable for displaying on user dashboards without admin privileges.
Auth required.
curl https://api.ainative.studio/api/v1/subscription/public \
-H "Authorization: Bearer <your_api_key>"
Response (with active plan)
{
"success": true,
"data": {
"plan_name": "Professional",
"tier": "pro",
"status": "active",
"renewal_date": "2026-04-30T23:59:59Z",
"current_period_start": "2026-04-01T00:00:00Z",
"current_period_end": "2026-04-30T23:59:59Z",
"billing_cycle": "month",
"credits_remaining": 37659,
"credits_total": 50000,
"features": [
"50,000 API credits",
"1M LLM tokens",
"10 GB storage",
"50 MCP hours",
"Email support"
],
"limits": {
"api_credits": 50000,
"llm_tokens": 1000000,
"max_users": 5,
"max_projects": 10
}
}
}
Response (no active subscription — free tier)
{
"success": true,
"data": {
"plan_name": "Free",
"tier": "free",
"status": "active",
"renewal_date": null,
"credits_remaining": 500,
"credits_total": 500,
"features": ["500 AI credits per month", "Basic support", "Community access"],
"limits": {
"api_credits": 500,
"llm_tokens": 50000,
"max_users": 1,
"max_projects": 1
}
}
}
Upgrade or Downgrade Plan
PUT /api/v1/subscription
Change the authenticated user's plan. If an active subscription exists it is updated in place; otherwise a new subscription is created with an initial invoice.
Auth required.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
plan | string | Yes | Plan ID from GET /subscription/plans (e.g. "pro", "business") |
curl -X PUT https://api.ainative.studio/api/v1/subscription \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"plan": "pro"}'
import httpx
resp = httpx.put(
"https://api.ainative.studio/api/v1/subscription",
headers={"Authorization": "Bearer <your_api_key>"},
json={"plan": "pro"},
)
print(resp.json()["message"])
Response
{
"success": true,
"data": {
"id": "sub-uuid",
"plan": "pro",
"status": "active",
"current_period_start": "2026-04-25T10:00:00Z",
"current_period_end": "2026-05-25T10:00:00Z",
"plan_details": {
"id": "pro",
"name": "Pro",
"credits": 50000,
"price": 49.00,
"currency": "USD",
"interval": "month",
"features": [...]
}
},
"message": "Subscription updated to Pro plan"
}
Error responses
| Status | Cause |
|---|---|
400 | Invalid plan ID |
401 | Not authenticated |
500 | Database or Stripe error |
Usage Analytics
GET /api/v1/subscription/usage
All-time and current-month usage statistics against your plan limits.
Auth required.
curl https://api.ainative.studio/api/v1/subscription/usage \
-H "Authorization: Bearer <your_api_key>"
Response
{
"success": true,
"data": {
"total_credits_used": 145230.5,
"total_requests": 8420,
"active_days": 87,
"last_activity": "2026-04-25T09:55:00Z",
"monthly_credits_used": 12340.5,
"monthly_requests": 1204,
"daily_usage": [
{
"date": "2026-04-25",
"credits": 540.0,
"requests": 54
}
]
}
}