{"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
}'
Após se cadastrar, cada desenvolvedor recebe uma chave de acesso à API pessoal, uma combinação única de letras e dígitos para acessar nosso endpoint de API. Para autenticar com a Artificial Intelligence Chat API basta incluir seu token Bearer no cabeçalho Authorization.
| Cabeçalho | Descrição |
|---|---|
Authorization
|
Obrigatório
Deve ser Bearer access_key. Veja "Sua chave de acesso à API" acima quando você estiver inscrito.
|
Sem compromisso de longo prazo. Faça upgrade, downgrade ou cancele a qualquer momento.
(Economize 2 meses com cobrança anual 🎉)
Empresas líderes confiam em nós
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.
A precisão dos dados é mantida por meio de treinamento contínuo de modelos e atualizações com base nas interações e feedback dos usuários Isso garante que a IA gere respostas relevantes e contextualmente apropriadas
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.
Os dados de "uso" incluem "prompt_tokens", "completion_tokens" e "total_tokens", que ajudam os usuários a monitorar seu consumo de tokens. Essa informação é valiosa para otimizar as solicitações e gerenciar o uso de recursos de forma eficaz
Cenários comuns incluem o desenvolvimento de chatbots para suporte ao cliente a criação de assistentes de programação para desenvolvedores a geração de conteúdo para blogs ou artigos e a construção de aplicações interativas que requerem capacidades de IA conversacional
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.
Se as respostas forem inesperadas ou incompletas, revise o "finish_reason" para obter insights Ajustar parâmetros de entrada como "temperature" ou "max_tokens" pode ajudar a refinar a saída Além disso, fornecer prompts mais claros pode gerar melhores resultados