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

# Generate Client Code

> Generates Python client code to download the Artifact version.



## OpenAPI

````yaml /api-specs/cloud/flyte-extensions-api.json get /artifacts/v1/artifacts/{artifact-id}/versions/{execution-name}/code
openapi: 3.1.0
info:
  contact:
    email: support@dominodatalab.com
    name: Domino Data Lab
    url: https://tickets.dominodatalab.com/hc/en-us
  description: "\n\tAdds a number of extended operations to Flyte in support of retrieving artifact\n\tmetadata and bookmarking artifacts from individual executions."
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: >-
    https://tickets.dominodatalab.com/hc/en-us/articles/360060058871-Service-Level-Agreement
  title: Flyte HTTP Gateway
  version: '0.1'
servers:
  - description: >-
      Replace 'mycluster.domino.tech' with your Domino cluster hostname. For
      Domino Cloud customers, that is `your-subdomain`.domino.tech (e.g.,
      acme.domino.tech). For self-hosted deployments, it is the hostname you
      reach the Domino UI at.
    url: https://mycluster.domino.tech/flows/api
security: []
tags:
  - name: Artifacts
  - name: Blob
  - name: Bookmarks
  - name: Execution
  - name: Exports
paths:
  /artifacts/v1/artifacts/{artifact-id}/versions/{execution-name}/code:
    get:
      tags:
        - Artifacts
      summary: Generate Client Code
      description: Generates Python client code to download the Artifact version.
      operationId: artifacts-client-code-gen-download-artifact-version
      parameters:
        - description: Artifact ID
          in: path
          name: artifact-id
          required: true
          schema:
            description: Artifact ID
            type: string
        - description: Name of the execution that produced the artifact
          in: path
          name: execution-name
          required: true
          schema:
            description: Name of the execution that produced the artifact
            type: string
        - description: >-
            If provided, generated code will download just this file within the
            Artifact
          explode: false
          in: query
          name: file_name
          schema:
            description: >-
              If provided, generated code will download just this file within
              the Artifact
            type: string
        - description: >-
            Local directory to download the Artifact to. If omitted, client code
            uses default.
          explode: false
          in: query
          name: local_dir
          schema:
            description: >-
              Local directory to download the Artifact to. If omitted, client
              code uses default.
            type: string
        - description: Project of the workflow execution that produced the artifact
          explode: false
          in: query
          name: project
          schema:
            description: Project of the workflow execution that produced the artifact
            type: string
        - description: Domain of the workflow execution that produced the artifact
          explode: false
          in: query
          name: domain
          schema:
            description: Domain of the workflow execution that produced the artifact
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientCodeArtifactDownload'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
components:
  schemas:
    ClientCodeArtifactDownload:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ClientCodeArtifactDownload.json
          format: uri
          readOnly: true
          type: string
        client_code:
          description: Generated client code for downloading artifacts
          type: string
      required:
        - client_code
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      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

````

## Related topics

- [Set up prediction capture](/cloud/platform-capabilities/features/monitoring/3-set-up-domino-endpoints/1-set-up-prediction-capture.md)
- [Manage Data Sources](/cloud/admin/data-administration/external-data/index.md)
- [Example Python client: Asynchronous Domino endpoint](/cloud/platform-capabilities/features/model-deployment/async-example-client.md)
- [Connect to Pinecone](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-pinecone.md)
