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

# Create a task



## OpenAPI

````yaml api-reference/openapi.json POST /tasks
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /tasks:
    post:
      tags:
        - tasks
      summary: Create a task
      operationId: createTask
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTaskResponse'
          description: Accepted
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WorkspaceRuntimeAdmissionError'
                  - $ref: >-
                      #/components/schemas/InferenceBalanceExhaustedErrorResponse
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - oneOf:
                      - $ref: '#/components/schemas/TasksErrorResponse'
                      - $ref: '#/components/schemas/WorkspaceRuntimeAdmissionError'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Not Found
        '408':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Request Timeout
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/TaskIdempotencyKeyReusedErrorResponse'
                  - $ref: '#/components/schemas/TaskConnectionRefusalErrorResponse'
                  - $ref: '#/components/schemas/McpServerNotConnectedErrorResponse'
          description: Conflict
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Request Entity Too Large
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Internal Server Error
components:
  schemas:
    CreateTaskRequest:
      additionalProperties: false
      properties:
        agent_profile_id:
          description: >-
            Optional agent profile the task is started through. Its connection
            pin applies to a task of the profile's agent unless runs_on chooses
            otherwise; the request's agent, model and effort are the task's.
          format: uuid
          type: string
        agent_type:
          enum:
            - codex
            - claude-code
            - opencode
          type: string
        auto_fix_ci:
          description: >-
            Optional per-task override. Omit to inherit the fresh project
            default; explicit true or false overrides it.
          type: boolean
        auto_fix_pr_comments:
          description: >-
            Optional per-task override. Omit to inherit the fresh project
            default; explicit true or false overrides it.
          type: boolean
        auto_rebase:
          description: >-
            Optional per-task override. Omit to inherit the fresh project
            default; explicit true or false overrides it.
          type: boolean
        base_branch:
          minLength: 1
          type: string
        context:
          $ref: '#/components/schemas/PromptContext'
        idempotency_key:
          description: >-
            Optional client-generated UUID, scoped to the authenticated user in
            the authenticated org. The first create with a key records it with
            the task; a retry with the same key and an equivalent request
            returns that same task (202, same body) without creating, admitting,
            or dispatching again, even if the task was since archived. Reusing a
            key for a different request fails with 409 code
            idempotency_key_reused and creates nothing.
          format: uuid
          type: string
        interaction_mode:
          enum:
            - default
            - plan
          type: string
        model:
          minLength: 1
          type: string
        post_pr_demo_video:
          description: >-
            Optional per-task override. Omit to inherit the fresh project
            default; explicit true or false overrides it.
          type: boolean
        post_pr_screenshots:
          description: >-
            Optional per-task override. Omit to inherit the fresh project
            default; explicit true or false overrides it.
          type: boolean
        project_id:
          format: uuid
          type: string
        prompt:
          minLength: 1
          type: string
        reasoning_effort:
          enum:
            - ultra
            - max
            - xhigh
            - high
            - medium
            - low
            - ultrathink
            - ultracode
          type:
            - string
            - 'null'
        runs_on:
          description: >-
            Optional initial task connection; an explicit choice is validated
            before the first turn. Omitted, the task runs on the pin of the
            agent profile agent_profile_id names when that profile pins a
            connection for the task's agent, else on the creator's default
            connection.
          oneOf:
            - additionalProperties: false
              properties:
                runs_on:
                  description: >-
                    Aether inference, paid from your organization's balance:
                    Claude Code and Codex only.
                  enum:
                    - aether
                  type: string
              required:
                - runs_on
              type: object
            - additionalProperties: false
              properties:
                connection_id:
                  description: A connection you hold that works with the harness.
                  format: uuid
                  type: string
                runs_on:
                  description: The connection connection_id names.
                  enum:
                    - stored
                  type: string
              required:
                - runs_on
                - connection_id
              type: object
        vm_size:
          enum:
            - small
            - medium
            - large
          type: string
      required:
        - project_id
        - prompt
        - agent_type
        - model
        - interaction_mode
      type: object
    CreateTaskResponse:
      additionalProperties: false
      properties:
        id:
          format: uuid
          type: string
        name:
          minLength: 1
          type: string
      required:
        - id
        - name
      type: object
    TasksErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - account_deleting
            - aether_inference_unserved
            - agent_pr_blocked
            - agent_pr_pending
            - app_identity_missing
            - attribution_unavailable
            - bad_gateway
            - bad_request
            - caller_inactive
            - conflict
            - connection_harness_mismatch
            - connection_not_held
            - contents_write_required
            - continuation_failed
            - continuation_unavailable
            - control_forbidden
            - embeddings_unavailable
            - fix_not_requested
            - fix_requests_unrecorded
            - forbidden
            - fork_branch_delete_unsupported
            - fork_forbidden
            - gateway_timeout
            - github_claim_unverified
            - github_failed
            - github_identity_mismatch
            - github_identity_required
            - github_push_access_required
            - github_reconnect_required
            - github_ref_not_found
            - gone
            - idempotency_key_reused
            - inference_proxy_unavailable
            - insufficient_credits
            - insufficient_inference_balance
            - internal_error
            - invalid_request
            - mcp_server_not_connected
            - method_not_allowed
            - mode_forbidden
            - no_dispatch_target
            - not_acceptable
            - not_found
            - not_implemented
            - onboarding_already_completed
            - onboarding_requirements_missing
            - org_role_insufficient
            - org_suspended
            - payment_required
            - pr_review_actor_required
            - pr_review_publish_forbidden
            - precondition_failed
            - pull_request_closed
            - pull_request_mirror_failed
            - pull_request_not_mirrored
            - queued_stop_requires_discard
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - stack_cycle
            - stack_too_large
            - stack_two_parents
            - stale_execution
            - stale_or_indeterminate
            - stale_pending_input
            - stream_delivery_gap
            - stream_event_conflict
            - task_awaiting_message
            - task_awaiting_tool_response
            - task_connection_disconnected
            - task_connection_unresolved
            - task_creator_deleted
            - task_ineligible
            - task_not_accepting_messages
            - task_settings_changed
            - unauthenticated
            - unsigned_aether_head
            - unsigned_commit
            - unsupported_changes
            - unsupported_media_type
            - untyped_error
            - validation_failed
            - workspace_git_unavailable
            - workspace_rejected
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    WorkspaceRuntimeAdmissionError:
      additionalProperties: false
      properties:
        code:
          enum:
            - user_suspended
            - org_suspended
            - billing_blocked
            - org_task_concurrency_exceeded
            - credits_exhausted
            - workspace_run_unavailable
          type: string
        error:
          minLength: 1
          type: string
        org_id:
          format: uuid
          type: string
        tier:
          type: string
        vm_size:
          type: string
      required:
        - error
        - code
        - tier
        - vm_size
        - org_id
      type: object
    InferenceBalanceExhaustedErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - insufficient_inference_balance
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    TaskIdempotencyKeyReusedErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - idempotency_key_reused
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    TaskConnectionRefusalErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - task_connection_unresolved
            - task_connection_disconnected
            - inference_proxy_unavailable
            - aether_inference_unserved
            - connection_harness_mismatch
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    McpServerNotConnectedErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - mcp_server_not_connected
          type: string
        error:
          minLength: 1
          type: string
        servers:
          items:
            $ref: '#/components/schemas/McpServerNotConnected'
          minItems: 1
          type: array
      required:
        - error
        - code
        - servers
      type: object
    PromptContext:
      additionalProperties: false
      properties:
        attachments:
          items:
            $ref: '#/components/schemas/Attachment'
          maxItems: 10
          type: array
        files:
          items:
            $ref: '#/components/schemas/FileReference'
          type: array
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    McpServerNotConnected:
      additionalProperties: false
      properties:
        display_name:
          type: string
        key:
          type: string
        policy:
          enum:
            - creator
            - org
          type: string
        reason:
          enum:
            - not_connected
            - needs_reauth
          type: string
        repo:
          $ref: '#/components/schemas/McpServerRepoDeclaration'
      required:
        - key
        - display_name
        - policy
        - reason
      type: object
    Attachment:
      additionalProperties: false
      properties:
        data:
          minLength: 1
          type: string
        filename:
          minLength: 1
          type: string
        mediaType:
          minLength: 1
          type: string
      required:
        - filename
        - mediaType
        - data
      type: object
    FileReference:
      additionalProperties: false
      properties:
        include:
          type: boolean
        path:
          minLength: 1
          type: string
        selection:
          $ref: '#/components/schemas/FileSelection'
      required:
        - path
        - include
      type: object
    McpServerRepoDeclaration:
      additionalProperties: false
      properties:
        cataloged:
          type: boolean
        file:
          enum:
            - .mcp.json
            - .codex/config.toml
          type: string
      required:
        - file
        - cataloged
      type: object
    FileSelection:
      additionalProperties: false
      properties:
        endLine:
          format: int64
          minimum: 1
          type: integer
        startLine:
          format: int64
          minimum: 1
          type: integer
      required:
        - startLine
        - endLine
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.