Page cover image

Single Task

Endpoint: https://api.neocu.com/v1/task/:id

Method: GET

Content Type: application/json

Authentication: api-key

Description: Find a single task that have been run by Neocu.

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.

Request Path Parameters:

Parameter
Type
Required
Description

id

String

Yes

The unique identifier (_id) of the task.

Response Codes:

HTTP Status Code
Description
Response Body (JSON)

200 OK

Task details successfully retrieved.

See "Response Body (Success - 200 OK)" below.

401 Unauthorized

Authentication failed - Missing or invalid API Key.

Returned when the api-key header is missing.

404 Not Found

Task with the provided ID not found.

500 Internal Server Error

An unexpected error occurred on the server.

{ "error": "System Error. Please try again" }

Response Body (Success - 200 OK):

{
  "isSuccess": true,
  "task": {
    "status": "string",
    "message": ["string"],
    "date": "Date"
  },
  "asset": [
    {
      "url": "string",
      "thumbnail": "string",
      "embed": "string",
      "name": "string",
      "type": "string",
      "status": "string",
      "_id": "string"
    }
  ]
}

Response Body Fields:

Field
Type
Description

isSuccess

Boolean

Indicates whether the request was successful (always true for a 200 OK response).

task

Object

Contains details about the task.

task.status

String

The current status of the task (e.g., "generating", "completed", "failed").

task.message

Array of Strings

Messages associated with the task, providing more context about the task's progress or status.

task.date

Date

The date and time the task was created. Format is a standard JavaScript Date object, typically in ISO 8601 format.

asset

Array

An array of asset objects associated with the task.

asset[].url

String

The URL of the asset.

asset[].thumbnail

String

The URL of the asset's thumbnail, if available.

asset[].embed

String

Embed code for the asset, if applicable.

asset[].name

String

The name of the asset.

asset[].type

String

The media type of the asset (e.g., "image", "video", "audio", "360", "3d").

asset[].status

String

The status of the asset.

asset[]._id

String

The unique identifier of the asset.

Example Request:

GET /v1/task/653be5f7b747685f54d920b9
Host: api.neocu.com
api-key: YOUR_API_KEY_HERE

Example Response (200 OK):

{
  "isSuccess": true,
  "task": {
    "status": "completed",
    "message": [
      "Generation Successful"
    ],
    "date": "2023-10-27T12:34:56.789Z"
  },
  "asset": [
    {
      "url": "https://example.com/image1.jpg",
      "thumbnail": "https://example.com/image1_thumb.jpg",
      "embed": null,
      "name": "Image 1",
      "type": "image",
      "status": "active",
      "_id": "653be5f7b747685f54d920ba"
    }
  ]
}

Media Types:

Media Type
Description

voice

Audio recording of a human voice.

image

Static image (e.g., JPEG, PNG, GIF).

sound

General audio clip (e.g., sound effects, music).

video

Video clip (e.g., MP4, MOV).

360

360-degree image or video, providing an immersive, panoramic view.

3d

3D model or scene (specific formats may vary, e.g., glTF, OBJ, USDZ).

Last updated