Page cover image

Generate

Endpoint: https://api.neocu.com/v1/generate

Method: POST

Content Type: application/json

Authentication: api-key

Description: Unleash instant creativity with Neocu Generate. Just send your request and generate images, sounds, video, voice, or 3D content in seconds! This single endpoint eliminates API complexity, letting you create diverse media faster than ever before.

Authentication

This endpoint requires API Key authentication. You must include your API key in the api-key header of your request.

Request Headers:

Header
Type
Required
Description

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",
  "files": ["file"]
}
Parameter
Type
Required
Description

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:

HTTP Status Code
Description
Response Body (JSON)

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):

{
  "task_id": "string",
  "message": "success"
}

Response Body (Error - 4xx and 5xx):

{
  "error": "string",
  "message": "string" // Optional - may be present for some error types like 402
}


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