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

# Get Response Attachment

> Retrieve a [Dataset Task](/core-resources/dataset-task) response attachment. Response attachment URLs can be found in the `response` object of a [Dataset Task](/core-resources/dataset-task) and only exist in some datasets.

<Accordion title="Authentication" icon="key">
  Every request sent to Scale's API requires authentication. In short, your API Key is the Bearer token. See the [Authentication](/get-started/authentication) section for more details.
</Accordion>


## OpenAPI

````yaml GET /v2/datasets/task/{task_id}/response_url/{attachment_id}
openapi: 3.1.0
info:
  title: GenAI API Spec
  description: 'Data Engine: Generative AI API Specification'
  version: 0.0.1
servers:
  - url: https://api.scale.com
security:
  - bearerAuth: []
  - basicAuth: []
paths:
  /v2/datasets/task/{task_id}/response_url/{attachment_id}:
    get:
      tags:
        - v2
      summary: Get Response Attachment
      description: >-
        Retrieve a [Dataset Task](/core-resources/dataset-task) response
        attachment. Response attachment URLs can be found in the `response`
        object of a [Dataset Task](/core-resources/dataset-task) and only exist
        in some datasets.
      operationId: getDatasetTaskResponseUrl
      parameters:
        - $ref: '#/components/parameters/taskId'
        - $ref: '#/components/parameters/attachment_id'
      responses:
        '302':
          description: Redirect to download the attachment URL content.
          headers:
            Location:
              description: The URL to redirect to.
              schema:
                type: string
                format: uri
          content:
            '*/*':
              schema:
                properties: null
        '404':
          description: Task or attachment not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_code:
                    type: number
                    example: 404
                  error:
                    type: string
                    example: Task or attachment not found.
        '500':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_code:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: An error has occurred.
components:
  parameters:
    taskId:
      name: task_id
      in: path
      required: true
      description: Scale's unique identifier for the task.
      schema:
        $ref: '#/components/schemas/TaskId'
    attachment_id:
      name: attachment_id
      in: path
      required: true
      description: Unique identifier for an attachment.
      schema:
        type: string
  schemas:
    TaskId:
      type: string
      description: Unique identifier for a task
      example: task_abc123
  securitySchemes:
    bearerAuth:
      description: >-
        Your API Key is the Bearer token. See the
        [Authentication](/get-started/authentication) section to learn how to
        access your key.
      type: http
      scheme: bearer
    basicAuth:
      description: >-
        Basic HTTP Authentication. Your API Key is your username.  Learn more
        about setting up Authentication [here](/get-started/authentication).
      type: http
      scheme: basic

````