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

CodeHTTPDescription
INVALID_CLIENT_KEY401API key is missing or invalid
PENDING_APPROVAL403Your account is pending admin approval
ACCOUNT_SUSPENDED403Account has been suspended
ACCOUNT_ON_HOLD403Account is temporarily on hold
DAILY_LIMIT_EXCEEDED429Daily request limit reached
MONTHLY_LIMIT_EXCEEDED429Monthly request limit reached
INSUFFICIENT_BALANCE402Wallet balance too low
PRODUCT_NOT_FOUND404Product slug not found or inactive
PRODUCT_ACCESS_DENIED403No access to this product
NO_MODELS_AVAILABLE503No 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

FieldTypeRequiredDescription
productstringrequiredProduct slug to use for this request
messagesarrayrequiredArray of message objects {role, content}
max_tokensintegeroptionalMaximum tokens in response (default: 2048)
temperaturefloatoptionalResponse creativity 0.0–2.0 (default: 0.7)
systemstringoptionalSystem 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