> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Sign up, create a key and send your first API request in 5 minutes

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](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

<Tip>After signing up, new users automatically receive an initial trial credit you can use right away for test calls.</Tip>

## 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:

| Field       | Meaning                                                  | Recommendation                         |
| ----------- | -------------------------------------------------------- | -------------------------------------- |
| Name        | For your own reference only                              | e.g. `my-app-prod`                     |
| Quota       | Max amount this token may spend (use `-1` for unlimited) | Cap each token's quota in production   |
| Expiry      | Leave empty for no expiry                                | Set a short window for temporary tests |
| Model scope | Models 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](/en/models/overview), or check available models and billing multipliers on the **Models** page of the console.

Common model IDs:

| Use case              | Model 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` |
| Reasoning             | `gpt-5.5` `o4-mini` `claude-opus-4-8` `gemini-3.1-pro-preview`          |
| Text embeddings       | `text-embedding-3-small` `text-embedding-3-large` `gemini-embedding-2`  |
| Image generation      | `gpt-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.

<CodeGroup>
  ```bash cURL theme={null}
  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"}
      ]
    }'
  ```

  ```python Python (openai SDK) theme={null}
  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)
  ```

  ```javascript Node.js theme={null}
  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);
  ```

  ```go Go theme={null}
  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)
  }
  ```
</CodeGroup>

A successful request returns JSON like the following:

```json theme={null}
{
  "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

<CardGroup cols={2}>
  <Card title="Top-ups & quota" icon="wallet" href="/en/getting-started/top-up">
    Learn about top-up methods, minimum amounts and invoices.
  </Card>

  <Card title="Models & billing" icon="coins" href="/en/pricing/billing">
    The token / multiplier / cache billing mechanism in detail.
  </Card>

  <Card title="Client integrations" icon="puzzle-piece" href="/en/integrations/overview">
    Connect tools like Cherry Studio, Cursor and Dify.
  </Card>

  <Card title="Full API reference" icon="code" href="/en/api-reference/introduction">
    All endpoint fields, error codes and examples.
  </Card>
</CardGroup>
