> ## 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 Screenshot

> Get a specific screenshot by index.



## OpenAPI

````yaml /api-reference/tasks.yaml get /tasks/{task_id}/screenshots/{index}
openapi: 3.1.0
info:
  title: Tasks
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /tasks/{task_id}/screenshots/{index}:
    get:
      tags:
        - Tasks
      summary: Get Task Screenshot
      description: Get a specific screenshot by index.
      operationId: get_task_screenshot_tasks__task_id__screenshots__index__get
      parameters:
        - name: index
          in: path
          required: true
          schema:
            type: integer
            title: Index
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaResponse'
        '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 mediaResponse = await client.tasks.screenshots.retrieve(0, {
              task_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            });

            console.log(mediaResponse.url);
        - 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
            )
            media_response = client.tasks.screenshots.retrieve(
                index=0,
                task_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(media_response.url)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmediaResponse, err := client.Tasks.Screenshots.Get(\n\t\tcontext.TODO(),\n\t\t0,\n\t\tmobileruncloud.TaskScreenshotGetParams{\n\t\t\tTaskID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", mediaResponse.URL)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud tasks:screenshots retrieve \
              --api-key 'My API Key' \
              --task-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --index 0
components:
  schemas:
    MediaResponse:
      properties:
        url:
          type: string
          title: Url
          description: The URL of the media
      type: object
      required:
        - url
      title: MediaResponse
    UnauthorizedResponse:
      properties:
        title:
          type: string
          title: Title
          description: The title of the error
          default: Unauthorized
        status:
          type: integer
          title: Status
          description: The status code of the error
          default: 401
        detail:
          type: string
          title: Detail
          description: The detail of the error
          default: You are not authorized to access this resource
        errors:
          items: {}
          type: array
          title: Errors
          description: The errors
          default: []
      type: object
      title: UnauthorizedResponse
    ErrorResponse:
      properties:
        title:
          type: string
          title: Title
          description: The title of the error
        status:
          type: integer
          title: Status
          description: The status code of the error
        detail:
          type: string
          title: Detail
          description: The detail of the error
        errors:
          items: {}
          type: array
          title: Errors
          description: The errors
      type: object
      required:
        - title
        - status
        - detail
        - errors
      title: ErrorResponse
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header

````