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

# Download Code

> Endpoint to download the QECX file for a specific QEC code by slug.

Args:
    slug: The unique slug identifier of the QEC code.

Returns:
    The QECX file for the QEC code if available, otherwise a 404 or 409 error.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /codes/{slug}/download
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.3.0
servers: []
security: []
paths:
  /codes/{slug}/download:
    get:
      summary: Download Code
      description: |-
        Endpoint to download the QECX file for a specific QEC code by slug.

        Args:
            slug: The unique slug identifier of the QEC code.

        Returns:
            The QECX file for the QEC code if available, otherwise a 404 or 409 error.
      operationId: download_code_codes__slug__download_get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    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:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````