Tu primera solicitud
Envía tu primera solicitud a la API de NovaAI y aprende cómo se estructuran las solicitudes y respuestas. Esta guía te orientará en la creación de una solicitud de completado de chat simple, en la comprensión de los parámetros requeridos y en la interpretación de la respuesta devuelta por la API.
Before You Begin
Before making your first request, ensure you've completed the following:
Installed the NovaAI SDK.
Configured your API key.
Completed authentication.
Created a NovaAI project.
Your First API Request
The example below sends a simple prompt to the NovaAI Chat model and returns a generated response.
Understanding the Request
Every chat request consists of a few essential properties.
Property | Type | Required | Description |
|---|---|---|---|
| String | Yes | Specifies which AI model processes the request. |
| Array | Yes | The conversation history sent to the model. |
| Number | No | Controls randomness in generated responses. |
| Integer | No | Limits the maximum response length. |
| Boolean | No | Enables streaming responses. |
Request Lifecycle
Every request follows the same lifecycle regardless of the selected model or endpoint.
Example Response
A successful request returns a structured JSON response.
Understanding the Response
Property | Description |
| Unique identifier for the request. |
| AI model that generated the response. |
| Generated content returned by the model. |
| Token usage statistics for the request. |
Response Flow
Try Your Own Prompt
Use the example below to experiment with different prompts.
Replace the prompt in the previous example with your own and observe how different instructions influence the generated output.
Common Request Errors
Invalid Model
The requested model does not exist or is unavailable.
Solution
Verify the model name and ensure it is supported by your account.
Invalid Request Body
One or more required properties are missing or incorrectly formatted.
Solution
Validate the JSON payload and confirm all required fields are included.
Rate Limit Exceeded
Too many requests were sent within a short period.
Solution
Retry the request after the recommended wait time or implement exponential backoff.
What's Next?
Congratulations! You've successfully sent your first request to NovaAI.
Continue to Core Concepts to learn how models, prompts, messages, tokens, and responses work together to power every interaction with the NovaAI platform.