This API retrieves the status and details of a specific task using its unique task_id
.
GET https://api.genaifactory.ai/v1/task/{task_id}
formalcloud-api-key
string
Yes
API key for authentication
task_id
integer
Yes
The unique identifier of the task.
Returns a JSON object containing the status, input, output, and details of the requested task.
created_at
string
The timestamp when the task was created.
finished_at
string
The timestamp when the task was completed.
input_data
array
An array containing the input data for the task.
language_code
string
The language code detected for the input data.
output_data
array
An array containing the output data of the task, if available.
task_id
integer
The unique identifier for the task.
task_status
string
The current status of the task (CREATED
, RUNNING
, SUCCESS
, or FAILED
).
task_type
string
The type of task created.
Input Data (input_data
)
type
string
The type of the input (e.g., text
).
text
object
Contains the input text content.
Output Data (output_data
)
type
string
The type of the output (e.g., audio
).
url
string
The URL to access the generated output.
length
float
The duration of the output in seconds.
Example Response
This API is used to create a task for various purposes, such as generating audio content based on the specified parameters and input data.
POST https://api.genaifactory.ai/v1/create_task
Parameters (params
)
Input Data (input_data
)
Text Object
Returns a JSON object containing the task details.
Example Response
formalcloud-api-key
string
Yes
API key for authentication
Content-Type
string
Yes
Must be set to application/json
task_type
string
Yes
Specifies the type of task to create:
TTS
params
object
Yes
Parameters specifying task details.
input_data
array of objects
Yes
Input data for the task.
reporter_voice
string
Yes
The reporter's voice model:
AMERICAN_MALE_1
AMERICAN_MALE_2
AMERICAN_MALE_3
AMERICAN_FEMALE_1
AMERICAN_FEMALE_2
AMERICAN_FEMALE_3
BRITISH_MALE_1
BRITISH_MALE_2
BRITISH_MALE_3
BRITISH_FEMALE_1
BRITISH_FEMALE_2
BRITISH_FEMALE_3
AUSTRALIAN_MALE_1
AUSTRALIAN_MALE_2
AUSTRALIAN_MALE_3
AUSTRALIAN_FEMALE_1
AUSTRALIAN_FEMALE_2
AUSTRALIAN_FEMALE_3
CANADIAN_MALE_1
CANADIAN_MALE_2
CANADIAN_MALE_3
CANADIAN_FEMALE_1
CANADIAN_FEMALE_2
CANADIAN_FEMALE_3
type
string
Yes
The type of input (e.g., text
).
text
object
Yes
Contains the content to be processed.
content
string
Yes
The text content to process for the task.
created_at
string
The timestamp when the task was created.
task_id
integer
The unique identifier for the task.
task_status
string
The current status of the task.
task_type
string
The type of task created.