Run a Task

GA
POST

Run a specified Task against provided text and/or image input. The response is controlled by the output_format of the Task. Note that a Task must be enabled to be run.

Path parameters

org_idstringRequired

The unique identifier of the organization.

project_idstringRequired

The unique identifier of the project.

task_idstringRequired

The specific Task to reference.

Query parameters

revisionstringOptional

Request

This endpoint expects a multipart form containing an optional file.
task_inputstringRequired

The data input to the Task. This should be relevant to the user_prompt and provide values for the dynamic {...} parameters that are referenced in the prompt. Not required if image_required is set to true and there are no dynamic parameters in the prompt. It should be send as a JSON string.

task_filefileOptional

Response

This endpoint returns an object.
task_idstring

The unique identifier of the Task associated with this run.

task_revision_idstring

The unique identifier of the Task Revision associated with this run.

responsemap from strings to any

The structured response from the Task execution.

run_datamap from strings to any

Additional data about the Task such as the submitted text input.

idstring

The unique identifier of the Task Run.

createddatetime

The timestamp when the Task Run was created.

input_tokensinteger

The number of tokens submit as input to the model.

output_tokensinteger

The number of tokens generated and output by the model.

total_tokensinteger

The total token usage for the TaskRun.