Documentation

Everything you need to integrate CheapLLM into your workflow.

Quick Start

Get started with CheapLLM in under 5 minutes:

  1. Create an account — Sign up at cheapllm.net/signup
  2. Add your API key — Go to Settings → API Keys → Add Key
  3. Submit your first prompt — Use the web form or upload a CSV
  4. Get results — View in your dashboard or receive via email/webhook

Adding Your API Keys

CheapLLM uses a Bring Your Own Key (BYOK) model. You provide your own API keys from supported providers.

How to add a key:

  1. Navigate to Settings → API Keys
  2. Click Add New Key
  3. Select your provider (OpenAI, Anthropic, etc.)
  4. Paste your API key and click Save

Security Note

Your API keys are encrypted with AES-256 at rest. They are only decrypted in-memory when making requests on your behalf. We never log or store keys in plaintext. You can delete your keys at any time.

Where to get API keys:

Supported Providers

OpenAI

GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo, o1, o1-mini

Anthropic

Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku

Google

Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini Pro

xAI

Grok-2, Grok-2 Mini

Mistral

Mistral Large, Mistral Medium, Mistral Small, Mixtral

Together AI

200+ open-source models (Llama, DeepSeek, Qwen, etc.)

Using the Web Interface

The simplest way to use CheapLLM is through the web dashboard:

  1. Go to Dashboard → New Request
  2. Select your Provider and Model
  3. Type or paste your prompt
  4. Click Submit
  5. Results will appear in your dashboard and optionally be sent to your email

CSV Bulk Upload

For bulk requests, upload a CSV file with your prompts:

CSV Format

prompt,model,system_message
"Summarize this article: ...",gpt-4o,"You are a helpful assistant"
"Translate to Spanish: Hello world",claude-3-5-sonnet,
"Generate 5 product names for a coffee brand",gpt-4o-mini,

Required Columns

  • prompt — The prompt text (required)

Optional Columns

  • model — Model ID (defaults to your account default)
  • system_message — System prompt for the model
  • temperature — Temperature setting (0-2)
  • max_tokens — Maximum response length

REST API Reference

Integrate CheapLLM programmatically using our REST API.

Base URL

https://api.cheapllm.net/v1

Authentication

Include your CheapLLM API token in the Authorization header:

Authorization: Bearer YOUR_CHEAPLLM_TOKEN

Submit a Request

POST /requests

curl -X POST https://api.cheapllm.net/v1/requests \
  -H "Authorization: Bearer YOUR_CHEAPLLM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "model": "gpt-4o",
    "prompt": "Explain quantum computing in simple terms",
    "system_message": "You are a helpful teacher",
    "temperature": 0.7,
    "max_tokens": 1000
  }'

Response

{
  "id": "req_abc123",
  "status": "pending",
  "created_at": "2024-01-15T10:30:00Z",
  "estimated_completion": "2024-01-15T14:30:00Z"
}

Get Request Status

GET /requests/:id

curl https://api.cheapllm.net/v1/requests/req_abc123 \
  -H "Authorization: Bearer YOUR_CHEAPLLM_TOKEN"

List Requests

GET /requests?status=completed&limit=50

curl "https://api.cheapllm.net/v1/requests?status=completed&limit=50" \
  -H "Authorization: Bearer YOUR_CHEAPLLM_TOKEN"

Webhooks

Receive notifications when your requests complete:

Setup

  1. Go to Settings → Webhooks
  2. Add your webhook URL
  3. Optionally add a signing secret for verification

Webhook Payload

{
  "event": "request.completed",
  "request_id": "req_abc123",
  "status": "completed",
  "result": {
    "content": "Quantum computing is...",
    "tokens_used": 245,
    "cost_usd": 0.0012
  },
  "timestamp": "2024-01-15T14:32:15Z"
}

Rate Limits

EndpointLimit
POST /requests1,000 requests/minute
GET /requests100 requests/minute
CSV Upload10,000 rows per file

Error Handling

The API returns standard HTTP status codes:

CodeMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid API token)
429Rate limit exceeded
500Internal server error

Error Response Format

{
  "error": {
    "code": "invalid_api_key",
    "message": "The provided API key is invalid or expired",
    "details": null
  }
}