Skip to content

REST API

Base URL

https://api.50c.ai

Authentication

All requests require a Bearer token:

Terminal window
Authorization: Bearer cv_YOUR_KEY

Endpoints

List Tools

Terminal window
GET /tools

Response:

{
"tools": [
{ "name": "genius", "cost": "$0.50", "endpoint": "POST /tools/genius" },
{ "name": "roast", "cost": "$0.05", "endpoint": "POST /tools/roast" }
]
}

Execute Tool

Terminal window
POST /tools/{tool_name}

Parameters depend on the tool. See individual tool pages for details.

Example:

Terminal window
curl -X POST https://api.50c.ai/tools/genius \
-H "Authorization: Bearer cv_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"problem": "What is 2+2?"}'

Response:

{
"result": "4",
"cost_cents": 50,
"remaining_credits": 9950
}

Check Balance

Terminal window
GET /balance

Response:

{
"credits": 10000,
"plan": "pro",
"used_this_month": 500
}

Manage Sub-keys

Terminal window
GET /subkeys

Error Responses

StatusErrorDescription
400invalid_inputRequest body validation failed
401unauthorizedMissing or invalid API key
402insufficient_creditsNot enough credits
404tool_not_foundUnknown tool name
429rate_limitedToo many requests
500internal_errorServer error

Rate Limits

PlanRequests/min
Free10
Starter30
Pro60
EnterpriseCustom

Rate limit headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1710759600