Generate
Authentication
This endpoint requires API Key authentication. You must include your API key in the api-key
header of your request.
Request Headers:
api-key
String
Yes
Your organization's API key for authentication.
Content-Type
String
Yes
Must be application/json
for sending JSON body.
Request Body (JSON):
query
String
Yes
The main query or prompt for the AI generation. This is the core input for the AI task.
files
Array of Files
Optional
_id of files that should be used by Neocu to process requests.
Important Notes on Request Body Parameters:
The
query
parameter is required for a successful request.
Response Codes:
200 OK
Task successfully initiated.
task_id
: Unique identifier for the initiated task.
400 Bad Request
Missing required parameters.
Returned when the query
parameter is missing in the request body.
401 Unauthorized
Authentication failed - Missing or invalid API Key.
Returned when the provided API key is invalid or not associated with any account.
402 Payment Required
Low Compute Balance.
Returned when the organization associated with the API key has insufficient compute
.
500 Internal Server Error
An unexpected error occurred on the server during task processing.
Errorr when there is a system error
Response Body (Success - 200 OK):
Response Body (Error - 4xx and 5xx):
Important Considerations:
Security: Keep your API key confidential. Treat it like a password.
Compute Balance: Monitor your compute balance and ensure you have sufficient balance to avoid service interruptions.
Error Handling: Implement proper error handling in your application to gracefully manage API errors and inform users if necessary.
Last updated