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

# Load Artifact Version



## OpenAPI

````yaml /api-reference/openapi.json get /apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}/versions/{version_id}:
    get:
      summary: Load Artifact Version
      operationId: >-
        load_artifact_version_apps__app_name__users__user_id__sessions__session_id__artifacts__artifact_name__versions__version_id__get
      parameters:
        - name: app_name
          in: path
          required: true
          schema:
            type: string
            title: App Name
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: artifact_name
          in: path
          required: true
          schema:
            type: string
            title: Artifact Name
        - name: version_id
          in: path
          required: true
          schema:
            type: integer
            title: Version Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Part-Output'
                  - type: 'null'
                title: >-
                  Response Load Artifact Version Apps  App Name  Users  User Id 
                  Sessions  Session Id  Artifacts  Artifact Name  Versions 
                  Version Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Part-Output:
      properties:
        mediaResolution:
          anyOf:
            - $ref: '#/components/schemas/PartMediaResolution'
            - type: 'null'
          description: |-
            Media resolution for the input media.
                
        codeExecutionResult:
          anyOf:
            - $ref: '#/components/schemas/CodeExecutionResult'
            - type: 'null'
          description: Optional. The result of executing the ExecutableCode.
        executableCode:
          anyOf:
            - $ref: '#/components/schemas/ExecutableCode'
            - type: 'null'
          description: >-
            Optional. Code generated by the model that is intended to be
            executed.
        fileData:
          anyOf:
            - $ref: '#/components/schemas/FileData'
            - type: 'null'
          description: >-
            Optional. The URI-based data of the part. This can be used to
            include files from Google Cloud Storage.
        functionCall:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall'
            - type: 'null'
          description: >-
            Optional. A predicted function call returned from the model. This
            contains the name of the function to call and the arguments to pass
            to the function.
        functionResponse:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponse-Output'
            - type: 'null'
          description: >-
            Optional. The result of a function call. This is used to provide the
            model with the result of a function call that it predicted.
        inlineData:
          anyOf:
            - $ref: '#/components/schemas/Blob'
            - type: 'null'
          description: >-
            Optional. The inline data content of the part. This can be used to
            include images, audio, or video in a request.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: >-
            Optional. The text content of the part. When sent from the VSCode
            Gemini Code Assist extension, references to @mentioned items will be
            converted to markdown boldface text. For example `@my-repo` will be
            converted to and sent as `**my-repo**` by the IDE agent.
        thought:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Thought
          description: >-
            Optional. Indicates whether the `part` represents the model's
            thought process or reasoning.
        thoughtSignature:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Thoughtsignature
          description: >-
            Optional. An opaque signature for the thought so it can be reused in
            subsequent requests.
        videoMetadata:
          anyOf:
            - $ref: '#/components/schemas/VideoMetadata'
            - type: 'null'
          description: >-
            Optional. Video metadata. The metadata should only be specified
            while the video data is presented in inline_data or file_data.
        toolCall:
          anyOf:
            - $ref: '#/components/schemas/ToolCall'
            - type: 'null'
          description: >-
            Server-side tool call. This field is populated when the model
            predicts a tool invocation that should be executed on the server.
            The client is expected to echo this message back to the API.
        toolResponse:
          anyOf:
            - $ref: '#/components/schemas/ToolResponse'
            - type: 'null'
          description: >-
            The output from a server-side ToolCall execution. This field is
            populated by the client with the results of executing the
            corresponding ToolCall.
        partMetadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Partmetadata
          description: >-
            Custom metadata associated with the Part. Agents using genai.Part as
            content representation may need to keep track of the additional
            information. For example it can be name of a file/source from which
            the Part originates or a way to multiplex multiple Part streams.
            This field is not supported in Vertex AI.
        audioTranscription:
          anyOf:
            - $ref: '#/components/schemas/Transcription'
            - type: 'null'
          description: Output only. The transcription of the audio part.
      additionalProperties: false
      type: object
      title: Part
      description: >-
        A datatype containing media content.


        Exactly one field within a Part should be set, representing the specific
        type

        of content being conveyed. Using multiple fields within the same `Part`

        instance is considered invalid.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PartMediaResolution:
      properties:
        level:
          anyOf:
            - $ref: '#/components/schemas/PartMediaResolutionLevel'
            - type: 'null'
          description: |-
            The tokenization quality used for given media.
                
        numTokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Numtokens
          description: |-
            Specifies the required sequence length for media tokenization.
                
      additionalProperties: false
      type: object
      title: PartMediaResolution
      description: Media resolution for the input media.
    CodeExecutionResult:
      properties:
        outcome:
          anyOf:
            - $ref: '#/components/schemas/Outcome'
            - type: 'null'
          description: Required. Outcome of the code execution.
        output:
          anyOf:
            - type: string
            - type: 'null'
          title: Output
          description: >-
            Optional. Contains stdout when code execution is successful, stderr
            or other description otherwise.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. The identifier of the `ExecutableCode` part this result is
            for. Only populated if the corresponding `ExecutableCode` has an id.
            This field is not supported in Vertex AI.
      additionalProperties: false
      type: object
      title: CodeExecutionResult
      description: |-
        Result of executing the ExecutableCode.

        Generated only when the `CodeExecution` tool is used.
    ExecutableCode:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: Required. The code to be executed.
        language:
          anyOf:
            - $ref: '#/components/schemas/Language'
            - type: 'null'
          description: Required. Programming language of the `code`.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. Unique identifier of the `ExecutableCode` part. The server
            returns the `CodeExecutionResult` with the matching `id`. This field
            is not supported in Vertex AI.
      additionalProperties: false
      type: object
      title: ExecutableCode
      description: >-
        Code generated by the model that is meant to be executed, and the result
        returned to the model.


        Generated when using the `CodeExecution` tool, in which the code will be

        automatically executed, and a corresponding CodeExecutionResult will
        also be

        generated.
    FileData:
      properties:
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. The display name of the file. Used to provide a label or
            filename to distinguish files. This field is only returned in
            `PromptMessage` for prompt management. It is used in the Gemini
            calls only when server side tools (`code_execution`,
            `google_search`, and `url_context`) are enabled. This field is not
            supported in Gemini API.
        fileUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Fileuri
          description: Required. The URI of the file in Google Cloud Storage.
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
      additionalProperties: false
      type: object
      title: FileData
      description: >-
        URI-based data.


        A FileData message contains a URI pointing to data of a specific media
        type.

        It is used to represent images, audio, and video stored in Google Cloud

        Storage.
    FunctionCall:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. The unique id of the function call. If populated, the
            client to execute the `function_call` and return the response with
            the matching `id`.
        args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Args
          description: >-
            Optional. The function parameters and values in JSON object format.
            See FunctionDeclaration.parameters for parameter details.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            Optional. The name of the function to call. Matches
            FunctionDeclaration.name.
        partialArgs:
          anyOf:
            - items:
                $ref: '#/components/schemas/PartialArg'
              type: array
            - type: 'null'
          title: Partialargs
          description: >-
            Optional. The partial argument value of the function call. If
            provided, represents the arguments/fields that are streamed
            incrementally. This field is not supported in Gemini API.
        willContinue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Willcontinue
          description: >-
            Optional. Whether this is the last part of the FunctionCall. If
            true, another partial message for the current FunctionCall is
            expected to follow. This field is not supported in Gemini API.
      additionalProperties: false
      type: object
      title: FunctionCall
      description: >-
        A predicted FunctionCall returned from the model that contains a string
        representing the FunctionDeclaration.name and a structured JSON object
        containing the parameters and their values.
    FunctionResponse-Output:
      properties:
        willContinue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Willcontinue
          description: >-
            Optional. Signals that function call continues, and more responses
            will be returned, turning the function call into a generator. Is
            only applicable to NON_BLOCKING function calls, is ignored
            otherwise. If set to false, future responses will not be considered.
            It is allowed to return empty `response` with `will_continue=False`
            to signal that the function call is finished. This may still trigger
            the model generation. To avoid triggering the generation and finish
            the function call, additionally set `scheduling` to `SILENT`. This
            field is not supported in Vertex AI.
        scheduling:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponseScheduling'
            - type: 'null'
          description: >-
            Optional. Specifies how the response should be scheduled in the
            conversation. Only applicable to NON_BLOCKING function calls, is
            ignored otherwise. Defaults to WHEN_IDLE.
        parts:
          anyOf:
            - items:
                $ref: '#/components/schemas/FunctionResponsePart'
              type: array
            - type: 'null'
          title: Parts
          description: >-
            Optional. Ordered `Parts` that constitute a function response. Parts
            may have different IANA MIME types.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Optional. The id of the function call this response is for.
            Populated by the client to match the corresponding function call
            `id`.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            Required. The name of the function to call. Matches
            FunctionDeclaration.name and FunctionCall.name.
        response:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response
          description: >-
            Required. The function response in JSON object format. Use "output"
            key to specify function output and "error" key to specify error
            details (if any). If "output" and "error" keys are not specified,
            then whole "response" is treated as function output.
      additionalProperties: false
      type: object
      title: FunctionResponse
      description: >-
        The result output from a FunctionCall that contains a string
        representing the FunctionDeclaration.name and a structured JSON object
        containing any output from the function is used as context to the model.


        This should contain the result of a `FunctionCall` made based on model

        prediction.
    Blob:
      properties:
        data:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Data
          description: Required. The raw bytes of the data.
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. The display name of the blob. Used to provide a label or
            filename to distinguish blobs. This field is only returned in
            `PromptMessage` for prompt management. It is used in the Gemini
            calls only when server-side tools (`code_execution`,
            `google_search`, and `url_context`) are enabled. This field is not
            supported in Gemini API.
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
      additionalProperties: false
      type: object
      title: Blob
      description: >-
        A content blob.


        A Blob contains data of a specific media type. It is used to represent
        images,

        audio, and video.
    VideoMetadata:
      properties:
        endOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Endoffset
          description: Optional. The end offset of the video.
        fps:
          anyOf:
            - type: number
            - type: 'null'
          title: Fps
          description: >-
            Optional. The frame rate of the video sent to the model. If not
            specified, the default value is 1.0. The valid range is (0.0, 24.0].
        startOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Startoffset
          description: Optional. The start offset of the video.
      additionalProperties: false
      type: object
      title: VideoMetadata
      description: >-
        Provides metadata for a video, including the start and end offsets for
        clipping and the frame rate.
    ToolCall:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Unique identifier of the tool call. The server returns the tool
            response with the matching `id`.
        toolType:
          anyOf:
            - $ref: '#/components/schemas/ToolType'
            - type: 'null'
          description: The type of tool that was called.
        args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Args
          description: >-
            The tool call arguments. Example: {"arg1": "value1", "arg2":
            "value2"}.
      additionalProperties: false
      type: object
      title: ToolCall
      description: >-
        A predicted server-side `ToolCall` returned from the model.


        This message contains information about a tool that the model wants to
        invoke.

        The client is NOT expected to execute this `ToolCall`. Instead, the

        client should pass this `ToolCall` back to the API in a subsequent turn

        within a `Content` message, along with the corresponding `ToolResponse`.
    ToolResponse:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: The identifier of the tool call this response is for.
        toolType:
          anyOf:
            - $ref: '#/components/schemas/ToolType'
            - type: 'null'
          description: >-
            The type of tool that was called, matching the tool_type in the
            corresponding ToolCall.
        response:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response
          description: The tool response.
      additionalProperties: false
      type: object
      title: ToolResponse
      description: >-
        The output from a server-side `ToolCall` execution.


        This message contains the results of a tool invocation that was
        initiated by a

        `ToolCall` from the model. The client should pass this `ToolResponse`
        back to

        the API in a subsequent turn within a `Content` message, along with the

        corresponding `ToolCall`.
    Transcription:
      properties:
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Optional. Transcription text.
        finished:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Finished
          description: Optional. The bool indicates the end of the transcription.
        languageCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Languagecode
          description: The BCP-47 language code of the transcription.
        speakerLabel:
          anyOf:
            - type: string
            - type: 'null'
          title: Speakerlabel
          description: >-
            A label identifying the speaker of this audio segment (e.g. "spk_1",
            "spk_2").
                  
        words:
          anyOf:
            - items:
                $ref: '#/components/schemas/WordInfo'
              type: array
            - type: 'null'
          title: Words
          description: |-
            Detailed word-level transcriptions and timing details.
                  
      additionalProperties: false
      type: object
      title: Transcription
      description: Audio transcription in Server Content.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PartMediaResolutionLevel:
      type: string
      enum:
        - MEDIA_RESOLUTION_UNSPECIFIED
        - MEDIA_RESOLUTION_LOW
        - MEDIA_RESOLUTION_MEDIUM
        - MEDIA_RESOLUTION_HIGH
        - MEDIA_RESOLUTION_ULTRA_HIGH
      title: PartMediaResolutionLevel
      description: The tokenization quality used for given media.
    Outcome:
      type: string
      enum:
        - OUTCOME_UNSPECIFIED
        - OUTCOME_OK
        - OUTCOME_FAILED
        - OUTCOME_DEADLINE_EXCEEDED
      title: Outcome
      description: Outcome of the code execution.
    Language:
      type: string
      enum:
        - LANGUAGE_UNSPECIFIED
        - PYTHON
      title: Language
      description: Programming language of the `code`.
    PartialArg:
      properties:
        boolValue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Boolvalue
          description: Optional. Represents a boolean value.
        jsonPath:
          anyOf:
            - type: string
            - type: 'null'
          title: Jsonpath
          description: >-
            Required. A JSON Path (RFC 9535) to the argument being streamed.
            https://datatracker.ietf.org/doc/html/rfc9535. e.g.
            "$.foo.bar[0].data".
        nullValue:
          anyOf:
            - type: string
              const: NULL_VALUE
            - type: 'null'
          title: Nullvalue
          description: Optional. Represents a null value.
        numberValue:
          anyOf:
            - type: number
            - type: 'null'
          title: Numbervalue
          description: Optional. Represents a double value.
        stringValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Stringvalue
          description: Optional. Represents a string value.
        willContinue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Willcontinue
          description: >-
            Optional. Whether this is not the last part of the same json_path.
            If true, another PartialArg message for the current json_path is
            expected to follow.
      additionalProperties: false
      type: object
      title: PartialArg
      description: |-
        Partial argument value of the function call.

        This data type is not supported in Gemini API.
    FunctionResponseScheduling:
      type: string
      enum:
        - SCHEDULING_UNSPECIFIED
        - SILENT
        - WHEN_IDLE
        - INTERRUPT
      title: FunctionResponseScheduling
      description: >-
        Specifies how the response should be scheduled in the conversation.


        Only applicable to NON_BLOCKING function calls, is ignored otherwise.
        Defaults

        to WHEN_IDLE.
    FunctionResponsePart:
      properties:
        inlineData:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponseBlob'
            - type: 'null'
          description: Inline media bytes.
        fileData:
          anyOf:
            - $ref: '#/components/schemas/FunctionResponseFileData'
            - type: 'null'
          description: URI based data. This field is not supported in Gemini API.
      additionalProperties: false
      type: object
      title: FunctionResponsePart
      description: >-
        A datatype containing media that is part of a `FunctionResponse`
        message.


        A `FunctionResponsePart` consists of data which has an associated
        datatype. A

        `FunctionResponsePart` can only contain one of the accepted types in

        `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed
        IANA

        MIME type identifying the type and subtype of the media if the
        `inline_data`

        field is filled with raw bytes.
    ToolType:
      type: string
      enum:
        - TOOL_TYPE_UNSPECIFIED
        - GOOGLE_SEARCH_WEB
        - GOOGLE_SEARCH_IMAGE
        - URL_CONTEXT
        - GOOGLE_MAPS
        - FILE_SEARCH
      title: ToolType
      description: The type of tool in the function call.
    WordInfo:
      properties:
        word:
          anyOf:
            - type: string
            - type: 'null'
          title: Word
          description: |-
            Transcript of the word.
                  
        startOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Startoffset
          description: |-
            Start offset in time of the word relative to the start of the audio.
                  
        endOffset:
          anyOf:
            - type: string
            - type: 'null'
          title: Endoffset
          description: |-
            End offset in time of the word relative to the start of the audio.
                  
      additionalProperties: false
      type: object
      title: WordInfo
      description: Information about a single recognized word.
    FunctionResponseBlob:
      properties:
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
        data:
          anyOf:
            - type: string
              contentEncoding: base64
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Data
          description: Required. Raw bytes.
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. Display name of the blob. Used to provide a label or
            filename to distinguish blobs. This field is only returned in
            PromptMessage for prompt management. It is currently used in the
            Gemini GenerateContent calls only when server side tools
            (code_execution, google_search, and url_context) are enabled. This
            field is not supported in Gemini API.
      additionalProperties: false
      type: object
      title: FunctionResponseBlob
      description: |-
        Raw media bytes for function response.

        Text should not be sent as raw bytes, use the 'text' field.
    FunctionResponseFileData:
      properties:
        fileUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Fileuri
          description: Required. URI.
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
          description: Required. The IANA standard MIME type of the source data.
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
          description: >-
            Optional. Display name of the file data. Used to provide a label or
            filename to distinguish file datas. This field is only returned in
            PromptMessage for prompt management. It is currently used in the
            Gemini GenerateContent calls only when server side tools
            (code_execution, google_search, and url_context) are enabled.
      additionalProperties: false
      type: object
      title: FunctionResponseFileData
      description: |-
        URI based data for function response.

        This data type is not supported in Gemini API.

````

## Related topics

- [Load Artifact](/api-reference/load-artifact.md)
- [List Artifact Versions](/api-reference/list-artifact-versions.md)
- [List Artifact Versions Metadata](/api-reference/list-artifact-versions-metadata.md)
- [Get Artifact Version Metadata](/api-reference/get-artifact-version-metadata.md)
- [Artifacts](/guides/artifacts.md)
