API

Introducción

Crear clave API

Crea un secreto con alcance de proyecto para solicitudes NovaAI de servidor a servidor. Almacene el secreto devuelto una sola vez; NovaAI no lo volverá a mostrar.

POST
https://api.novaai.com/v1/api-keys

Authentication

Send a project-scoped NovaAI API key in the Authorization header using the Bearer scheme. Requests without valid credentials return 401 Unauthorized.

Authorization

string

requerido

Request properties

name

string

requerido

Human-readable label for the environment that will use this key.

project_id

string

requerido

Project that owns the key and determines its access and usage limits.

expires_at

string

opcional

Optional ISO 8601 expiration time for temporary credentials.

Response behavior

A successful POST request returns a structured NovaAI resource response. Validate the returned identifier before persisting it, and handle 400 Bad Request for malformed input or 401 Unauthorized for invalid project credentials.

Integration notes

Use POST /v1/api-keys from a trusted server environment. Keep your NovaAI API key out of browser bundles and pass only the data required for create api key in each request.

Validate inputs before sending the request, log the returned request identifier for troubleshooting, and use exponential backoff for temporary failures or rate-limit responses. Treat malformed payloads and authorization failures as non-retryable until corrected.

Error handling

Inspect the error type and code returned by NovaAI before retrying. Correct invalid parameters for 400 responses, refresh or replace credentials for 401 responses, and wait before retrying requests that are temporarily limited.

POST/v1/api-keys
POST /v1/api-keys HTTP/1.1
Authorization: Bearer NOVA_API_KEY
Content-Type: application/json
200Success response
{
"id": "create_api_key_01",
"object": "nova.resource",
"status": "succeeded"
}
400Invalid request
{
"error": {
"message": "Invalid request",
"type": "invalid_request_error",
"code": "invalid_parameter"
}
}

Create a free website with Framer, the website builder loved by startups, designers and agencies.