技术文档
完整的 API 参考、SDK 使用指南和开发者资源
快速开始
欢迎使用 De-Entropy API 文档。本指南将帮助您快速集成我们的 AI 服务到您的应用中。
安装 SDK
# npm
npm install @de-entropy/sdk
# yarn
yarn add @de-entropy/sdk
# pnpm
pnpm add @de-entropy/sdk第一个 API 调用
// 初始化 SDK
import { DeEntropyClient } from '@de-entropy/sdk';
const client = new DeEntropyClient({
apiKey: 'your-api-key',
baseURL: 'https://api.de-entropy.com'
});
// 调用文本分析 API
const result = await client.text.analyze({
text: '这是一段测试文本',
language: 'zh-CN'
});
console.log(result);
// {
// sentiment: 'positive',
// confidence: 0.985,
// keywords: ['测试', '文本']
// }认证与授权
所有 API 请求都需要在 Header 中包含 API Key 进行认证:
Authorization: Bearer your-api-key此页是否有用?