Skip to main content
This guide takes you from zero to your first model response with OpenPAI in under 5 minutes.

Step 1: Create an account

Open https://openp.ai in your browser and click Sign up in the top-right corner. You can register or sign in with any of the following:
  • Email + password
  • GitHub (OAuth)
  • Telegram
  • LinuxDO
After signing up, new users automatically receive an initial trial credit you can use right away for test calls.

Step 2: Create an API key

Once signed in, open the Tokens page from the left-hand menu and click Add new token. Fill in the following fields:
FieldMeaningRecommendation
NameFor your own reference onlye.g. my-app-prod
QuotaMax amount this token may spend (use -1 for unlimited)Cap each token’s quota in production
ExpiryLeave empty for no expirySet a short window for temporary tests
Model scopeModels this token may call (empty = all)Tighten permissions as needed
After saving, the system generates an API key like sk-XXXXXXXXXXXXXXXX. Copy and store it immediately — you won’t be able to view it in full again after refreshing the page.

Step 3: Choose a model

OpenPAI integrates models from OpenAI, Anthropic, Google, DeepSeek, Qwen, Midjourney, Suno and more. See the full list in the Models overview, or check available models and billing multipliers on the Models page of the console. Common model IDs:
Use caseModel ID
Chat (cost-effective)gpt-5.4-mini claude-haiku-4-5 gemini-3.1-flash-lite
Chat (high quality)gpt-5.5 claude-opus-4-8 gemini-3.1-pro-preview gemini-3.5-flash
Reasoninggpt-5.5 o4-mini claude-opus-4-8 gemini-3.1-pro-preview
Text embeddingstext-embedding-3-small text-embedding-3-large gemini-embedding-2
Image generationgpt-image-2 dall-e-3 mj_imagine nano-banana-pro

Step 4: Send your first request

OpenPAI is OpenAI-compatible by default — just change your official SDK’s base_url to https://openp.ai/v1 and use the sk- key issued by OpenPAI.
curl https://openp.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENPAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Introduce OpenPAI in one sentence"}
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="sk-XXXXXXXXXXXXXXXX",
    base_url="https://openp.ai/v1",
)

resp = client.chat.completions.create(
    model="gpt-5.5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Introduce OpenPAI in one sentence"},
    ],
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENPAI_API_KEY,
  baseURL: "https://openp.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "gpt-5.5",
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user", content: "Introduce OpenPAI in one sentence" },
  ],
});

console.log(resp.choices[0].message.content);
package main

import (
    "context"
    "fmt"

    "github.com/sashabaranov/go-openai"
)

func main() {
    cfg := openai.DefaultConfig("sk-XXXXXXXXXXXXXXXX")
    cfg.BaseURL = "https://openp.ai/v1"
    client := openai.NewClientWithConfig(cfg)

    resp, err := client.CreateChatCompletion(context.Background(),
        openai.ChatCompletionRequest{
            Model: "gpt-5.5",
            Messages: []openai.ChatCompletionMessage{
                {Role: openai.ChatMessageRoleUser, Content: "Introduce OpenPAI in one sentence"},
            },
        })
    if err != nil {
        panic(err)
    }
    fmt.Println(resp.Choices[0].Message.Content)
}
A successful request returns JSON like the following:
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1715750400,
  "model": "gpt-5.5",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "OpenPAI is a unified API gateway to the major large language models." },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 27, "completion_tokens": 19, "total_tokens": 46 }
}

Next steps

Top-ups & quota

Learn about top-up methods, minimum amounts and invoices.

Models & billing

The token / multiplier / cache billing mechanism in detail.

Client integrations

Connect tools like Cherry Studio, Cursor and Dify.

Full API reference

All endpoint fields, error codes and examples.