{"id":"chatcmpl_codxer_mrjvzhjh_acmdnhoxj4","object":"chat.completion","created":1783987316,"model":"CodXER-Low-2-X1.0","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I help you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":1901,"completion_tokens":141,"total_tokens":2042},"_codxer":{"provider":"agixer","codxer_model":"CodXER Low-2 X1.0","upstream_model":"CodXER-Low-2-X1.0"}}
curl --location --request POST 'https://zylalabs.com/api/13186/artificial+intelligence+chat+api/26807/chat+completions' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"model": "CodXER Low-2 X1.0",
"messages": [
{
"role": "user",
"content": "Hello"
}
],
"max_tokens": 256
}'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 Artificial Intelligence Chat API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
无长期承诺。随时升级、降级或取消。
(年度计费可节省 2 个月 🎉)
领先企业的信赖之选
This API generates text responses for chat, reasoning, coding and content generation. It accepts structured text prompts and returns generated text in JSON responses. It supports streaming responses and model routing. It can be integrated into websites, mobile applications, automation workflows and software agents through HTTPS requests.
The Chat Completions endpoint returns a JSON object containing generated text responses based on input messages. It includes details such as the assistant's reply, usage statistics, and model information.
Key fields in the response include "id" (unique identifier), "object" (response type), "created" (timestamp), "model" (used model), "choices" (generated messages), and "usage" (token counts).
Users can customize requests using parameters like "messages" (input messages), "temperature" (response randomness), and "max_tokens" (response length). These parameters help tailor the output.
The response data is structured as a JSON object. It contains an array of "choices," each with a "message" field that includes the assistant's content and a "finish_reason" indicating how the response ended.
Typical use cases include customer support chatbots, coding assistance, content generation, and interactive applications where users seek conversational AI responses.
Users can extract the "content" field from the "message" object to display the assistant's response. Additionally, they can analyze "usage" data to monitor token consumption for optimization.
通过基于用户互动和反馈的持续模型训练和更新来保持数据准确性 这确保了人工智能生成相关且符合上下文的响应
If the response contains partial or empty results, users should check the "finish_reason" field for context. They can also adjust input parameters to refine the request for more complete outputs.
The Chat Completions endpoint provides generated text responses based on user input messages. It includes the assistant's reply, token usage statistics, and metadata about the model used for generation, allowing for diverse applications in chat, coding, and content creation.
Users can customize requests by adjusting parameters such as "messages" (input text), "temperature" (to control randomness), and "max_tokens" (to limit response length). This flexibility allows for tailored interactions based on specific needs.
The JSON response is structured with fields like "id," "object," "created," "model," and an array of "choices." Each choice contains a "message" with the assistant's content and a "finish_reason" that indicates how the response concluded.
The "finish_reason" field provides context on how the response was generated. It can indicate whether the response completed normally, was truncated, or stopped due to reaching a token limit, helping users understand the output's completeness.
“使用”数据包括“提示令牌”、“完成令牌”和“总令牌”,这帮助用户监控他们的令牌消耗。这些信息对于优化请求和有效管理资源使用是有价值的
常见场景包括为客户支持开发聊天机器人 为开发人员创建编码助手 为博客或文章生成内容 以及构建需要对话AI功能的互动应用程序
The API maintains response quality through continuous model training and updates based on user interactions. Feedback loops help refine the models, ensuring they produce relevant and contextually appropriate outputs.
如果响应出乎意料或不完整,请查看“finish_reason”以获取更多见解 调整输入参数如“temperature”或“max_tokens”可以帮助改善输出 此外,提供更清晰的提示可能会产生更好的结果