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

# Create Task Execution



## OpenAPI

````yaml https://api.julep.ai/api/openapi.json post /tasks/{task_id}/executions
openapi: 3.1.0
info:
  title: Julep Agents API
  description: API for Julep Agents
  termsOfService: https://www.julep.ai/terms
  contact:
    name: Julep
    url: https://www.julep.ai/
    email: developers@julep.ai
  version: 0.4.0
servers:
  - url: /api
security: []
paths:
  /tasks/{task_id}/executions:
    post:
      tags:
        - executions
      summary: Create Task Execution
      operationId: create_task_execution_tasks__task_id__executions_post
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Task Id
        - name: connection_pool
          in: query
          required: false
          schema:
            anyOf:
              - {}
              - type: 'null'
            title: Connection Pool
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExecutionRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Execution'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateExecutionRequest:
      properties:
        input:
          type: object
          title: Input
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        transition_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Transition Count
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - input
      title: CreateExecutionRequest
      description: Payload for creating an execution
    Execution:
      properties:
        task_id:
          type: string
          format: uuid
          title: Task Id
          readOnly: true
        status:
          type: string
          enum:
            - queued
            - starting
            - running
            - awaiting_input
            - succeeded
            - failed
            - cancelled
          title: Status
          readOnly: true
        input:
          type: object
          title: Input
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        transition_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Transition Count
        created_at:
          type: string
          format: date-time
          title: Created At
          readOnly: true
        updated_at:
          type: string
          format: date-time
          title: Updated At
          readOnly: true
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
        id:
          type: string
          format: uuid
          title: Id
          readOnly: true
      type: object
      required:
        - task_id
        - status
        - input
        - created_at
        - updated_at
        - id
      title: Execution
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization

````