翻篇收录说明
翻篇网页快照

Quick Start

https://www.ppapi.ai/blogs/quick-start

最近抓取:2026-12-05 07:36:08(北京时间)

最近内容变化:2026-12-02 19:03:19(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Quick Start

正文摘录

Back to BlogsQuick StartApril 29, 2026This 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 experienceStep 1: Get Your API Key1. 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 RequestPP 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 cURLCodecurl 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)Codefrom 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.jsCodeimport 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 ModelsOne of the biggest advantages of PP API is that switching models only requires changing the `model` parameter; no other code needs to change:Coderesponse = 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 RecordsAfter 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.