Documentation Index
Fetch the complete documentation index at: https://docs.codex.io/llms.txt
Use this file to discover all available pages before exploring further.
Rate Limits
Each plan has a per-second rate limit on API requests:| Plan | Rate Limit |
|---|---|
| Free | 5 requests/second |
| Growth | 300 requests/second |
| Enterprise | Custom — contact our team |
How Requests Are Counted
Every interaction with the Codex API counts against your plan’s monthly request limit. Here’s how each type of interaction is measured:| Interaction | What counts as 1 request |
|---|---|
| Query | Each time you execute a query (HTTP request) |
| Subscription | Each message the subscription sends you |
| Webhook | Each webhook delivery to your endpoint |
Subscriptions can generate a high volume of requests depending on what you’re subscribed to. For example, subscribing to trade events on a high-volume token could produce thousands of messages per hour — each one counts as a request.
Overages
Overages are charged at the same per-million rate as your subscribed plan. For example, if you exceed your 1M Growth plan limit by 500K requests, you’ll be charged for an additional 1M requests at the same per-million rate. For high-volume usage (10M+ requests/month), contact us on Discord or via email for custom plan pricing with volume discounts.WebSocket Connection Limits
WebSocket connections are the transport layer for subscriptions. Each connection can carry multiple subscriptions.| Plan | Connection Limit |
|---|---|
| Growth | 300 connections |
| Enterprise | Soft limit — contact our team for your specific needs |
Capacity Per Connection
There is no hard limit on subscriptions per connection. What matters in practice is the total number of tokens being watched on that connection and how active those tokens are — not the count ofsubscribe messages. As a starting point, plan for up to ~100 tokens watched per connection. Spread tokens across connections rather than packing them onto one — if a single connection ends up carrying all your high-volume tokens (SOL, top trending tokens, busy pairs), it’ll drop messages while your other connections sit idle. If you see drops, reduce the per-connection token count and add more connections.
The actual ceiling depends on:
- Throughput — subscribing to
onTokenEventsCreatedfor SOL generates far more messages than a low-volume token - Network capacity — your internet connection and proximity to Western US affect throughput
- Subscription type — low-throughput streams like metadata updates can be packed considerably denser, while high-volume streams (launchpad events, busy chains) warrant dedicated connections
onPricesUpdated accepts up to 25 tokens per input array — that’s a hard cap on a single subscription request, not a recommended connection density. You can run multiple onPricesUpdated subscriptions on the same connection, just count their combined tokens against the per-connection budget.