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

# Get Task

> Get full details of a task by ID.



## OpenAPI

````yaml /api-reference/tasks.yaml get /tasks/{task_id}
openapi: 3.1.0
info:
  title: Tasks
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /tasks/{task_id}:
    get:
      tags:
        - Tasks
      summary: Get Task
      description: Get full details of a task by ID.
      operationId: get_task_tasks__task_id__get
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            format: uuid
            title: Task Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const task = await
            client.tasks.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(task.task);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            task = client.tasks.retrieve(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(task.task)
components:
  schemas:
    TaskResponse:
      properties:
        task:
          $ref: '#/components/schemas/TaskListItem'
          description: The task
      required:
        - task
      title: TaskResponse
      type: object
    UnauthorizedResponse:
      properties:
        detail:
          default: You are not authorized to access this resource
          description: The detail of the error
          title: Detail
          type: string
        errors:
          default: []
          description: The errors
          items: {}
          title: Errors
          type: array
        status:
          default: 401
          description: The status code of the error
          title: Status
          type: integer
        title:
          default: Unauthorized
          description: The title of the error
          title: Title
          type: string
      title: UnauthorizedResponse
      type: object
    ErrorResponse:
      properties:
        detail:
          description: The detail of the error
          title: Detail
          type: string
        errors:
          description: The errors
          items: {}
          title: Errors
          type: array
        status:
          description: The status code of the error
          title: Status
          type: integer
        title:
          description: The title of the error
          title: Title
          type: string
      required:
        - title
        - status
        - detail
        - errors
      title: ErrorResponse
      type: object
    TaskListItem:
      description: >-
        Task representation for list endpoints — omits the large trajectory
        field.
      properties:
        accessibility:
          default: true
          title: Accessibility
          type: boolean
        apps:
          items:
            type: string
          title: Apps
          type: array
        cancelRequestedAt:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Cancelrequestedat
        claimedAt:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Claimedat
        continueOnFailure:
          default: false
          title: Continueonfailure
          type: boolean
        createdAt:
          format: date-time
          title: Createdat
          type: string
        createdBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdby
        credentials:
          items:
            $ref: '#/components/schemas/PackageCredentials'
          title: Credentials
          type: array
        creditsUsed:
          anyOf:
            - type: number
            - type: 'null'
          title: Creditsused
        deviceId:
          format: uuid
          title: Deviceid
          type: string
        dispatchedAt:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Dispatchedat
        displayId:
          title: Displayid
          type: integer
        executionTimeout:
          default: 1000
          title: Executiontimeout
          type: integer
        files:
          items:
            type: string
          title: Files
          type: array
        finishedAt:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Finishedat
        humanize:
          default: false
          description: Whether human-like input was requested.
          title: Humanize
          type: boolean
        id:
          format: uuid
          title: Id
          type: string
        llmModel:
          description: >-
            The LLM model identifier to use for the task (e.g.
            'gemini/gemini-2.5-flash')
          title: Llmmodel
          type: string
        maxSteps:
          default: 100
          title: Maxsteps
          type: integer
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output
        outputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputschema
        ownerId:
          title: Ownerid
          type: string
        reasoning:
          default: true
          title: Reasoning
          type: boolean
        recordingDeviceId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Recordingdeviceid
        recordingEnabled:
          default: false
          description: >-
            Record device video for the whole task and persist a retrievable
            reference
          title: Recordingenabled
          type: boolean
        recordingId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Recordingid
        source:
          default: api
          description: >-
            Where the task came from: 'api' for tasks created via POST /tasks,
            'agent' for tasks spawned by an agent step. Agent tasks are readable
            (status, trajectory, media) but not controllable via this API.
          enum:
            - api
            - agent
          title: Source
          type: string
        status:
          $ref: '#/components/schemas/TaskStatus'
        steps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Steps
        streamUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Streamurl
        subagentModel:
          default: mobilerun/mobile-agent-fast
          description: >-
            LLM model used by sub-agent roles: executor, app_opener,
            structured_output
          title: Subagentmodel
          type: string
        succeeded:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Succeeded
        task:
          minLength: 1
          title: Task
          type: string
        temperature:
          default: 0.5
          deprecated: true
          description: >-
            Deprecated and ignored. Sampling behavior is controlled by the model
            provider.
          title: Temperature
          type: number
        tmpDevice:
          title: Tmpdevice
          type: boolean
        updatedAt:
          format: date-time
          title: Updatedat
          type: string
        userId:
          deprecated: true
          description: 'Deprecated: use ownerId (tenancy) / createdBy (actor).'
          title: Userid
          type: string
        vision:
          default: false
          title: Vision
          type: boolean
        vpnCountry:
          anyOf:
            - $ref: '#/components/schemas/VPNCountry'
            - type: 'null'
      required:
        - llmModel
        - task
        - id
        - status
        - deviceId
        - displayId
        - tmpDevice
        - userId
        - ownerId
      title: TaskListItem
      type: object
    PackageCredentials:
      properties:
        credentialNames:
          items:
            type: string
          title: Credentialnames
          type: array
        packageName:
          title: Packagename
          type: string
      required:
        - packageName
        - credentialNames
      title: PackageCredentials
      type: object
    TaskStatus:
      enum:
        - prepared
        - queued
        - created
        - running
        - cancelling
        - completed
        - failed
        - cancelled
      title: TaskStatus
      type: string
    VPNCountry:
      enum:
        - US
        - BR
        - FR
        - DE
        - IN
        - JP
        - KR
        - ZA
      title: VPNCountry
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

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