Run Task

GA

Run a task with the specified inputs and receive structured output.

This endpoint executes the task using its active revision(s) and returns the results. Key features:

  1. Automatic revision selection based on traffic weights
  2. Structured output matching the task’s output_format
  3. Execution metadata (tokens, timing, etc.)
  4. Support for file uploads when required

Required:

  • Input parameters as defined in the task’s user_prompt
  • Image file if task has image_required=true

Optional:

  • Specific revision_id for testing or comparison
  • Custom execution parameters

The response includes:

  • Structured output matching the task’s output_format
  • Execution metadata (tokens used, timing)
  • Input data for audit purposes
  • References to any processed images

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.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

revision_idstringOptionalformat: "uuid"
Optional Task Revision ID to use for execution. If not provided, an active revision will be selected based on traffic weights.

Response

Successful Response
task_idstringformat: "uuid"
The unique identifier of the Task associated with this run.
task_revision_idstringformat: "uuid"
The unique identifier of the Task Revision associated with this run.
responsemap from strings to any
The structured response from the Task execution.
run_dataobject
Additional data about the Task execution, including submitted inputs and processed files.
idstringformat: "uuid"
The unique identifier of the Task Run.
createdstring
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.
is_errorboolean or nullDefaults to false
input_processor_timingdouble or null
The execution time for the TaskRun in seconds.
llm_call_timingdouble or null
The execution time for the TaskRun in seconds.
charged_creditsstring or null
The total credits charged for the TaskRun.

Errors