API Documentation
Integrate the Pnyx LLM network into your applications
Quick Start
1. Create an Account
Sign up for an account with your email.
2. Get your API key
Generate your private API key from the dashboard.
3. Make your first call
Start with a simple chat completion request to test your integration
Example Request
curl https://mainnet-gateway.pnyxai.com/relay/text-generation/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "PNYX/pocket_network",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
],
"temperature": 0.7
}'Routing Options
PNYX provides access to multiple routing options by modifying the model field in the request:
Available Routers
PNYX/pocket_networkFree-tier endpoint that routes requests to anonymous models hosted in the Pocket Network.
PNYX/routerIncludes all free-tier models and a sub-selection of centralized routers (all non-flagship models). Consumes credits.
PNYX/router_proAll measured models available for routing. (Coming soon)
Custom Model Selection
You can limit routing to specific models from our leaderboard by passing model names separated by commas:
PNYX/grok-4.1-fast,claude-haiku-4.5Routes to the best model between grok-4.1-fast and claude-haiku-4.5
PNYX/grok-4.1-fast,claude-haiku-4.5,pocket_networkIncludes anonymous models from Pocket Network, potentially reducing costs significantly
PNYX/grok-4.1-fastSkip routing, directly access the selected model
Available Endpoints
| Method | Endpoint | Description | Category |
|---|---|---|---|
| POST | /v1/chat/completions | Create a chat completion | Chat |
| POST | /v1/completions | Create a text completion | Completions |
API Features
Global Network
Access multiple LLMs through a single unified API endpoint
Live Metrics
Track your usage and billing
Smart Routing
Automatically route requests to the best model for your task
Rate Limits
Rate limits vary by subscription tier. Default limits for free tier:
Requests per Minute
Tokens Limit
Requests per Day