API Reference
FunkyAPI is a unified AI proxy that lets you access multiple AI providers through a single endpoint. All requests use your API key for authentication and are charged against your wallet balance.
Base URL:
https://store.funkydevelopers.com/api
Authentication
Every request must include your API key in the X-Client-Key header.
# Example with curl curl -X POST https://store.funkydevelopers.com/api/process \ -H "X-Client-Key: your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"product": "your-product-slug", "messages": [...]}'
You can find and copy your API key from the Client Portal.
Error Codes
| Code | HTTP | Description |
|---|---|---|
| INVALID_CLIENT_KEY | 401 | API key is missing or invalid |
| PENDING_APPROVAL | 403 | Your account is pending admin approval |
| ACCOUNT_SUSPENDED | 403 | Account has been suspended |
| ACCOUNT_ON_HOLD | 403 | Account is temporarily on hold |
| DAILY_LIMIT_EXCEEDED | 429 | Daily request limit reached |
| MONTHLY_LIMIT_EXCEEDED | 429 | Monthly request limit reached |
| INSUFFICIENT_BALANCE | 402 | Wallet balance too low |
| PRODUCT_NOT_FOUND | 404 | Product slug not found or inactive |
| PRODUCT_ACCESS_DENIED | 403 | No access to this product |
| NO_MODELS_AVAILABLE | 503 | No AI models available for this product |
Process (Chat Completion)
Send a chat message and receive an AI response. Compatible with the OpenAI chat format.
POST
/api/process
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| product | string | required | Product slug to use for this request |
| messages | array | required | Array of message objects {role, content} |
| max_tokens | integer | optional | Maximum tokens in response (default: 2048) |
| temperature | float | optional | Response creativity 0.0–2.0 (default: 0.7) |
| system | string | optional | System prompt override |
Example Request
{
"product": "gpt-proxy",
"messages": [
{ "role": "user", "content": "What is the capital of France?" }
],
"max_tokens": 512,
"temperature": 0.7
}
Response
{
"success": true,
"content": "The capital of France is Paris.",
"model_label": "GPT Proxy",
"tokens_used": 42,
"transaction_id": "txn_00000001",
"balance_remaining": 499.9980
}
Get Balance
GET
/api/balance
{
"success": true,
"balance": 499.9980,
"currency": "INR"
}
List Transactions
GET
/api/transactions?limit=20&offset=0&type=debit
Wallet Recharge
You can recharge your wallet via the Client Portal or programmatically via the API.
POST
/api/wallet/recharge
{ "amount": 500 }
Returns a Razorpay order ID. Use it with the Razorpay checkout SDK, then verify:
POST
/api/wallet/verify