REST API
Base URL
https://api.50c.aiAuthentication
All requests require a Bearer token:
Authorization: Bearer cv_YOUR_KEYEndpoints
List Tools
GET /toolsResponse:
{ "tools": [ { "name": "genius", "cost": "$0.50", "endpoint": "POST /tools/genius" }, { "name": "roast", "cost": "$0.05", "endpoint": "POST /tools/roast" } ]}Execute Tool
POST /tools/{tool_name}Parameters depend on the tool. See individual tool pages for details.
Example:
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
GET /balanceResponse:
{ "credits": 10000, "plan": "pro", "used_this_month": 500}Manage Sub-keys
GET /subkeysPOST /subkeys/createContent-Type: application/json
{ "name": "My Sub-key", "monthly_limit": 1000, "allowed_tools": ["genius", "roast"]}DELETE /subkeys/{key_id}Error Responses
| Status | Error | Description |
|---|---|---|
| 400 | invalid_input | Request body validation failed |
| 401 | unauthorized | Missing or invalid API key |
| 402 | insufficient_credits | Not enough credits |
| 404 | tool_not_found | Unknown tool name |
| 429 | rate_limited | Too many requests |
| 500 | internal_error | Server error |
Rate Limits
| Plan | Requests/min |
|---|---|
| Free | 10 |
| Starter | 30 |
| Pro | 60 |
| Enterprise | Custom |
Rate limit headers:
X-RateLimit-Limit: 60X-RateLimit-Remaining: 45X-RateLimit-Reset: 1710759600