> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptloop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Single Job

> Runs a single job with the provided task and inputs and awaits the result. Tasks have a default timeout of 1 minute. For longer running tasks, consider using async batches instead.



## OpenAPI

````yaml openapi-v0.1.json post /v0.1/tasks/{id}
openapi: 3.0.0
info:
  title: API Documentation
  description: API description
  version: '0.1'
  contact: {}
servers:
  - url: https://api.promptloop.com/
    description: Production API v0.1
security: []
tags: []
paths:
  /v0.1/tasks/{id}:
    post:
      tags:
        - Tasks
      summary: Run Single Job
      description: >-
        Runs a single job with the provided task and inputs and awaits the
        result. Tasks have a default timeout of 1 minute. For longer running
        tasks, consider using async batches instead.
      operationId: TasksController_runSingleJobV01
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskLaunchBodyDto'
      responses:
        '200':
          description: Successfully ran task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskLaunchResponseDtoV01'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    TaskLaunchBodyDto:
      type: object
      properties:
        inputs:
          description: The inputs for the task
          type: array
          items:
            type: string
        task_version:
          type: number
          description: The version of the task
          default: 0
        turbo:
          type: boolean
          description: Optional flag to enable turbo execution mode for this task run
          default: false
      required:
        - inputs
        - task_version
    TaskLaunchResponseDtoV01:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          $ref: '#/components/schemas/TaskLaunchDtoV01'
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
      required:
        - status
        - data
        - message
    ErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: error
        data:
          type: object
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
      required:
        - status
        - data
        - message
    TaskLaunchDtoV01:
      type: object
      properties:
        data_json:
          type: object
          additionalProperties:
            type: string
          example:
            propertyKey: propertyValue
            anotherKey: anotherValue
          description: An object containing key-value string pairs
        list_data_json:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          example:
            - column1Key: row1Value1
              column2Key: row1Value2
            - column1Key: row2Value1
              column2Key: row2Value2
          description: >-
            Array of objects where each object represents a row with consistent
            column keys
        list:
          type: boolean
          example: true
          description: Indicates if this is a list operation
        job_id:
          type: string
        error_detected:
          type: boolean
      required:
        - data_json
        - list_data_json
        - list
        - job_id
        - error_detected
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````