Before the first request发送第一个请求之前

Use the access enabled for your account. Do not assume a provider or model is available.以账户实际启用的访问范围为准,不预设任何供应商或模型已可用。

01

Confirm your access确认访问权限

Tell us your intended integration through the platform contact. Confirm API access and the key you should use before wiring up an application.通过平台联系入口说明集成场景,先确认 API 访问权限及所需密钥,再开始接入应用。

Contact the platform team联系平台团队
02

Keep the key server-side把密钥留在服务端

Read the key from a server environment variable. Never place it in browser code, public repositories, screenshots or support messages.在服务端通过环境变量读取密钥,不要将其放入浏览器代码、公开仓库、截图或支持消息中。

03

Start with a small budget从小额度开始

Choose an available model, send a short request, set an output limit and inspect the response and usage before expanding.选择可用模型,发送短请求,设置输出限制;检查响应与用量后,再扩大任务。

A first API request第一个 API 请求

A server-side shell example for an account with API access. The model list is scoped to your key; use a returned model ID for the variable.此服务端 Shell 示例适用于已开通 API 权限的账户。模型列表受密钥权限限制,请使用返回的真实模型 ID 设置模型变量。

# API access must be enabled. Keep the key on your server.
# List models available to this key:
curl https://api.aicofi.com/v1/models \
  -H "Authorization: Bearer $AICOFI_KEY"

# Set AICOFI_MODEL to an exact ID from that response.
curl https://api.aicofi.com/v1/chat/completions \
  -H "Authorization: Bearer $AICOFI_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"model\":\"$AICOFI_MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello, AICOFI\"}],\"max_tokens\":128}"

Never paste a real key into this page. Check available model capabilities, pricing and limits before production use.请勿在此页面粘贴真实密钥;上线使用前请确认模型能力、价格与限制。

Make the next request more reliable让下一次请求更可靠

Make success, waiting and failure clear to the person using your integration.向使用者清楚区分成功、等待与失败。

01

Validate before sending发送前验证

Check input size and required fields. Use a bounded output and a timeout that fits your workflow.检查输入大小与必填字段,设置有界输出和适合工作流的超时时间。

02

Handle failures honestly如实处理失败

Show authentication, unavailable-model and balance errors clearly. Never treat an empty response as success or endlessly retry paid requests.明确展示认证、模型不可用与余额错误,不要把空响应当作成功,也不要无限重试付费请求。

03

Check your own records核对自己的记录

Review available usage records in Console and your remaining wallet balance. Retain the context needed to diagnose your application.查看 Console 中可用的用量记录与钱包剩余额度,保留诊断自身应用所需的上下文。

Explore Console了解 Console

A few things to know开始之前,先了解这些

Can I use an existing OpenAI SDK?能否使用已有的 OpenAI SDK?
For supported OpenAI-compatible endpoints, set the base URL to https://api.aicofi.com/v1 and use your enabled AICOFI key. Compatibility depends on the selected model and endpoint; provider-specific features are not automatically supported.对于支持的 OpenAI 兼容端点,将 base URL 配置为 https://api.aicofi.com/v1,并使用已开通的 AICOFI 密钥。兼容性取决于所选模型与端点,供应商专有功能不会自动受支持。
Is a demo a live API test?Demo 是否代表真实 API 测试?
No. Product demos can use sample data and canned responses. Verify a live integration with your authorized key, a small request and its usage record.不是。产品 Demo 可能使用示例数据与预设回复。真实集成应通过自己的授权密钥、小请求及对应的用量记录验证。

Bring us a concrete use case.带着一个具体场景来聊。

Share the task and expected request pattern. Leave keys and personal data out of the message.说明任务与预期请求方式;消息中请勿包含密钥或个人数据。

Discuss your integration讨论集成需求

More ways to build on the platform更多接入平台的方式

Developer experiences can expand alongside the products, from a first API call toward repeatable application patterns.开发者体验可以随产品共同扩展,从第一次 API 调用走向可重复使用的应用模式。

01

Practical integration recipes实用的集成方案

Grow a library of examples for chat, document workflows and richer AI experiences, with a clear path from exploration to a product.积累对话、文档流程与更丰富 AI 体验的示例,让试验更容易走向产品。

02

Reusable product building blocks可复用的产品组件

Make identity, connection, usage and model interactions easier to compose in new applications through shared libraries.通过共享库,让身份、连接、用量与模型交互更容易组合到新应用中。

03

Better feedback for builders给开发者更清楚的反馈

Expand the diagnostic journey with project-oriented logs, usage comparisons and tools for evaluating an integration.用面向项目的日志、用量比较与集成评估工具,扩展诊断体验。