快速开始

Pengyoo AI 提供统一 API,通过单个端点访问数十个模型。使用你喜欢的 SDK,几行代码即可开始。

直接调用 API

curl https://ai.pengyoo.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <PENGYOO_API_KEY>" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [{"role":"user","content":"人生的意义是什么?"}]
  }'

使用 OpenAI SDK(推荐)

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.pengyoo.com/v1",
    api_key="<PENGYOO_API_KEY>",
)

completion = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "人生的意义是什么?"}],
)
print(completion.choices[0].message.content)

TypeScript

import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://ai.pengyoo.com/v1",
  apiKey: "<PENGYOO_API_KEY>",
});

const completion = await openai.chat.completions.create({
  model: "deepseek-v4-flash",
  messages: [{ role: "user", content: "人生的意义是什么?" }],
});
console.log(completion.choices[0].message);

视频(Seedance 2.0)

curl https://ai.pengyoo.com/v1/videos/generations \
  -H "Authorization: Bearer <PENGYOO_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2.0-fast-260128",
    "prompt": "海边奔跑的柴犬,电影感",
    "duration": 5
  }'

更多集成见 框架和集成