开始使用
开始使用 TurboAPI 文档,了解如何集成 AI API。
开始使用
欢迎来到 TurboAPI 文档!本指南将帮助您快速入门并运行。
快速开始
1. 注册账户
访问 TurboAPI 创建账户并获取 API 密钥。
2. 安装 SDK
npm install @turboapi/sdk
pnpm add @turboapi/sdk
yarn add @turboapi/sdk
3. 初始化客户端
import { TurboAPI } from '@turboapi/sdk';
const client = new TurboAPI({
apiKey: process.env.TURBOAPI_API_KEY,
});
4. 发送第一个请求
// 生成图像
const image = await client.images.generate({
model: 'dall-e-3',
prompt: 'A beautiful sunset over the ocean',
n: 1,
});
console.log(image.url);
后续步骤
支持
- 📧 邮箱: [email protected]
- 💬 Discord: 加入我们的社区
- 📖 常见问题 解答常见问题