Back to Blogs

Quick Start

April 29, 2026

This guide helps you complete your first PP API request in 5 minutes.

Prerequisites

• A PP API account • Available balance in your account • Basic command-line or programming experience

Step 1: Get Your API Key

1. Log in to PP API Console. 2. In the left navigation bar, click Token Management. 3. Click the + Create Token button at the top of the page. 4. Enter a recognizable name (e.g. my-first-token) and set a quota limit as needed. 5. After confirming, the system generates an API key that starts with `sk-`.

Step 2: Send Your First Request

PP API fully supports OpenAI's Chat Completions format. You only need to point `base_url` to PP API and use your PP API key.

Using cURL

Code
curl https://app.ppapi.ai/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_PP_API_KEY" -d '{
  "model": "gpt-5.4-mini",
  "messages": [
    {"role": "user", "content": "Hello! What is PP API?"}
  ]
}'

Using Python (OpenAI SDK)

Code
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_PP_API_KEY",
    base_url="https://app.ppapi.ai/v1",
)

response = client.chat.completions.create(
    model="gpt-5.4-mini",
    messages=[
        {"role": "user", "content": "Hello! What is PP API?"},
    ],
)
print(response.choices[0].message.content)

Using Node.js

Code
import OpenAI from 'openai';
const client = new OpenAI({
  apiKey: 'YOUR_PP_API_KEY',
  baseURL: 'https://app.ppapi.ai/v1',
});

const response = await client.chat.completions.create({
  model: 'gpt-5.4-mini',
  messages: [{ role: 'user', content: 'Hello! What is PP API?' }],
});

console.log(response.choices[0].message.content);

Step 3: Switch Models

One of the biggest advantages of PP API is that switching models only requires changing the `model` parameter; no other code needs to change:

Code
response = client.chat.completions.create(model="gpt-5.4", ...)
# Switch to Deepseek
response = client.chat.completions.create(model="deepseek-v3.2", ...)
# Switch to Alibaba Qwen
response = client.chat.completions.create(model="qwen3.5-plus", ...)
# Switch to Google Gemini
response = client.chat.completions.create(model="gemini-3.1-flash-lite-preview", ...)

For the complete list of models and pricing, visit Model Marketplace.

Step 4: Check Call Records

After sending requests successfully, you can check call records in Console: 1. Go to Usage Logs to view the details of each request (model, token usage, cost, etc.). 2. Go to Dashboard to see usage distribution and trends.