{"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
}'
Después de registrarte, a cada desarrollador se le asigna una clave de acceso a la API personal, una combinación única de letras y dígitos proporcionada para acceder a nuestro endpoint de la API. Para autenticarte con el Artificial Intelligence Chat API simplemente incluye tu token de portador en el encabezado de Autorización.
| Encabezado | Descripción |
|---|---|
Autorización
|
Requerido
Debería ser Bearer access_key. Consulta "Tu Clave de Acceso a la API" arriba cuando estés suscrito.
|
Sin compromiso a largo plazo. Mejora, reduce o cancela en cualquier momento.
(Ahorra 2 meses pagando anualmente 🎉)
Empresas líderes confían en nosotros
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.
La precisión de los datos se mantiene a través del entrenamiento continuo del modelo y actualizaciones basadas en interacciones y comentarios de los usuarios Esto asegura que la IA genere respuestas relevantes y contextualmente adecuadas
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.
Los datos de "uso" incluyen "prompt_tokens", "completion_tokens" y "total_tokens", que ayudan a los usuarios a monitorear su consumo de tokens. Esta información es valiosa para optimizar las solicitudes y gestionar el uso de recursos de manera efectiva
Los escenarios comunes incluyen el desarrollo de chatbots para soporte al cliente la creación de asistentes de codificación para desarrolladores la generación de contenido para blogs o artículos y la construcción de aplicaciones interactivas que requieren capacidades de inteligencia artificial 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.
Si las respuestas son inesperadas o incompletas revisa la "razón de finalización" para obtener información Ajustar parámetros de entrada como "temperatura" o "max_tokens" puede ayudar a refinar la salida Además proporcionar indicaciones más claras puede producir mejores resultados