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_network

Free-tier endpoint that routes requests to anonymous models hosted in the Pocket Network.

PNYX/router

Includes all free-tier models and a sub-selection of centralized routers (all non-flagship models). Consumes credits.

PNYX/router_pro

All 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.5

Routes to the best model between grok-4.1-fast and claude-haiku-4.5

PNYX/grok-4.1-fast,claude-haiku-4.5,pocket_network

Includes anonymous models from Pocket Network, potentially reducing costs significantly

PNYX/grok-4.1-fast

Skip routing, directly access the selected model

Available Endpoints

MethodEndpointDescriptionCategory
POST/v1/chat/completionsCreate a chat completionChat
POST/v1/completionsCreate a text completionCompletions

API Features

Pnyx Icon

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:

10

Requests per Minute

N/A

Tokens Limit

50

Requests per Day