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

# Stage artifact version

> Stage an artifact version for upload, returning storage location and version ID.



## OpenAPI

````yaml /openapi.json post /api/svc/v1/artifact-versions/stage
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: example-company.truefoundry.cloud
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: LLM Gateway Budgets
  - name: Logs
  - name: MCP Registry
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
  - name: Provider Accounts
paths:
  /api/svc/v1/artifact-versions/stage:
    post:
      tags:
        - Artifacts
      summary: Stage artifact version
      description: >-
        Stage an artifact version for upload, returning storage location and
        version ID.
      operationId: ArtifactVersion.stageArtifactVersion
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StageArtifactRequest'
      responses:
        '200':
          description: >-
            Staging information including version ID, storage root, and artifact
            ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StageArtifactResponse'
      security:
        - jwt: []
components:
  schemas:
    StageArtifactRequest:
      type: object
      properties:
        manifest:
          oneOf:
            - $ref: '#/components/schemas/ArtifactManifest'
            - $ref: '#/components/schemas/ModelManifest'
            - $ref: '#/components/schemas/AgentSkillManifest'
          description: >-
            Manifest containing metadata for the artifact to be staged (model or
            generic artifact)
      required:
        - manifest
      title: StageArtifactRequest
      x-fern-type-name: StageArtifactRequest
    StageArtifactResponse:
      type: object
      properties:
        id:
          type: string
          description: ID of the staged artifact version
        storage_root:
          type: string
          description: >-
            Root storage path where the artifact version files should be
            uploaded
        artifact_id:
          type: string
          description: ID of the artifact that the staged version belongs to
      required:
        - id
        - storage_root
        - artifact_id
      title: StageArtifactResponse
      x-fern-type-name: StageArtifactResponse
    ArtifactManifest:
      description: Log a new Artifact Version containing files and folders with metadata
      type: object
      properties:
        type:
          description: Artifact Version
          type: string
          enum:
            - artifact-version
          default: artifact-version
        description:
          description: Description
          type: string
          maxLength: 512
          nullable: true
        version_alias:
          description: >-
            Version alias is alternate, ideally human readable, version string
            to reference an artifact version. It should start with `v` followed
            by alphanumeric and it can include `.` and `-` in between (e.g.
            `v1.0.0`, `v1-prod`, `v3-dev`, etc)
          type: string
          maxLength: 128
          pattern: ^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$
        source:
          description: Artifact Source
          type: object
          oneOf:
            - $ref: '#/components/schemas/TrueFoundryManagedSource'
            - $ref: '#/components/schemas/ExternalBlobStorageSource'
            - $ref: '#/components/schemas/LocalArtifactSource'
          discriminator:
            propertyName: type
        step:
          description: >-
            Step/Epoch number in an iterative training loop the artifact version
            was created. Generally useful when logging a model version from a
            MLRepo Run
          type: integer
          minimum: 0
          default: 0
        run_id:
          description: ID of the MLRepo Run that generated the artifact version
          type: string
      allOf:
        - $ref: '#/components/schemas/BaseArtifactVersion'
      required:
        - type
        - source
        - step
      title: ArtifactManifest
      x-fern-type-name: ArtifactManifest
    ModelManifest:
      description: Log a new Model Version containing model files and folders with metadata
      type: object
      properties:
        type:
          description: Model Version
          type: string
          enum:
            - model-version
          default: model-version
        description:
          description: Description
          type: string
          maxLength: 512
          nullable: true
        version_alias:
          description: >-
            Version alias is alternate, ideally human readable, version string
            to reference an artifact version. It should start with `v` followed
            by alphanumeric and it can include `.` and `-` in between (e.g.
            `v1.0.0`, `v1-prod`, `v3-dev`, etc)
          type: string
          maxLength: 128
          pattern: ^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$
        source:
          description: Model Source
          type: object
          oneOf:
            - $ref: '#/components/schemas/TrueFoundryManagedSource'
            - $ref: '#/components/schemas/ExternalBlobStorageSource'
            - $ref: '#/components/schemas/LocalModelSource'
          discriminator:
            propertyName: type
        framework:
          description: >-
            Framework for the model version like Transformers, PyTorch, Sklearn,
            Xgboost etc with framework specific metadata. This will be used to
            infer model deployment configuration
          type: object
          oneOf:
            - $ref: '#/components/schemas/TransformersFramework'
            - $ref: '#/components/schemas/TensorFlowFramework'
            - $ref: '#/components/schemas/SklearnFramework'
            - $ref: '#/components/schemas/PyTorchFramework'
            - $ref: '#/components/schemas/KerasFramework'
            - $ref: '#/components/schemas/XGBoostFramework'
            - $ref: '#/components/schemas/LightGBMFramework'
            - $ref: '#/components/schemas/FastAIFramework'
            - $ref: '#/components/schemas/H2OFramework'
            - $ref: '#/components/schemas/ONNXFramework'
            - $ref: '#/components/schemas/SpaCyFramework'
            - $ref: '#/components/schemas/StatsModelsFramework'
            - $ref: '#/components/schemas/GluonFramework'
            - $ref: '#/components/schemas/PaddleFramework'
          discriminator:
            propertyName: type
        environment:
          $ref: '#/components/schemas/ModelVersionEnvironment'
        step:
          description: >-
            Step/Epoch number in an iterative training loop the model version
            was created. Generally useful when logging a model version from a
            MLRepo Run
          type: integer
          minimum: 0
          default: 0
        run_id:
          description: ID of the MLRepo Run that generated the model version
          type: string
      allOf:
        - $ref: '#/components/schemas/BaseArtifactVersion'
      required:
        - type
        - source
        - step
      title: ModelManifest
      x-fern-type-name: ModelManifest
    AgentSkillManifest:
      description: Agent skill version.
      type: object
      properties:
        type:
          description: Type
          type: string
          enum:
            - agent-skill
          default: agent-skill
        name:
          description: Name of the skill.
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^(?!.*anthropic)(?!.*claude)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
        source:
          description: Source
          type: object
          oneOf:
            - $ref: '#/components/schemas/AgentSkillSourceInline'
            - $ref: '#/components/schemas/AgentSkillSourceBlobStorage'
            - $ref: '#/components/schemas/AgentSkillSourceLocal'
          discriminator:
            propertyName: type
        ml_repo:
          description: Name of the repository.
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$
      allOf:
        - $ref: '#/components/schemas/BaseArtifactVersion'
      required:
        - type
        - name
        - source
        - ml_repo
      title: AgentSkillManifest
      x-fern-type-name: AgentSkillManifest
    TrueFoundryManagedSource:
      description: TrueFoundry Managed Source
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - truefoundry
          default: truefoundry
        uri:
          description: URI
          type: string
          pattern: ^(s3|gs|wasbs)://.*
      title: TrueFoundryManagedSource
      x-fern-type-name: TrueFoundryManagedSource
    ExternalBlobStorageSource:
      description: External Blob Storage Source
      type: object
      required:
        - type
        - uri
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - external
          default: external
        uri:
          description: >-
            URI referencing a path in the blob storage bucket linked to the
            MLRepo
          type: string
          pattern: ^(s3|gs|wasbs)://.*
      title: ExternalBlobStorageSource
      x-fern-type-name: ExternalBlobStorageSource
    LocalArtifactSource:
      type: object
      required:
        - type
        - paths
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - local
          default: local
        paths:
          description: >-
            Array of ArtifactPath objects representing the source and
            destination paths
          type: array
          items:
            $ref: '#/components/schemas/ArtifactPath'
      title: LocalArtifactSource
      x-fern-type-name: LocalArtifactSource
    BaseArtifactVersion:
      type: object
      required:
        - metadata
      properties:
        name:
          description: Name of the entity
          type: string
          maxLength: 256
          pattern: ^[A-Za-z0-9_\-]+$
        metadata:
          description: >-
            Key value metadata. Should be valid JSON. For e.g.
            `{"business-unit": "sales", "quality": "good", "rating": 4.5}`
          type: object
        ml_repo:
          description: Name of the ML Repo
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$
        version:
          description: Version of the entity
          type: integer
          minimum: 1
      title: BaseArtifactVersion
      x-fern-type-name: BaseArtifactVersion
    LocalModelSource:
      type: object
      required:
        - type
        - file_or_folder
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - local
          default: local
        file_or_folder:
          description: Path to the model file or folder
          type: string
      title: LocalModelSource
      x-fern-type-name: LocalModelSource
    TransformersFramework:
      description: Transformers
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - transformers
          default: transformers
        library_name:
          $ref: '#/components/schemas/LibraryName'
        pipeline_tag:
          description: >-
            The `pipeline()` task this model can be used with e.g.
            `text-generation`. See [huggingface
            docs](https://huggingface.co/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline.task)
            for all possible values
          type: string
          default: null
          nullable: true
        base_model:
          description: >-
            Base model Id from HuggingFace Hub. If this is a finetuned model,
            this points to the base model id used for finetuning.
          type: string
          default: null
          nullable: true
      title: TransformersFramework
      x-fern-type-name: TransformersFramework
    TensorFlowFramework:
      description: Tensorflow
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - tensorflow
          default: tensorflow
      title: TensorFlowFramework
      x-fern-type-name: TensorFlowFramework
    SklearnFramework:
      description: Sklearn
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - sklearn
          default: sklearn
        model_filepath:
          description: Relative path to the model file in the model version contents
          type: string
        serialization_format:
          $ref: '#/components/schemas/SklearnSerializationFormat'
        model_schema:
          $ref: '#/components/schemas/SklearnModelSchema'
      title: SklearnFramework
      x-fern-type-name: SklearnFramework
    PyTorchFramework:
      description: PyTorch
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - pytorch
          default: pytorch
      title: PyTorchFramework
      x-fern-type-name: PyTorchFramework
    KerasFramework:
      description: Keras
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - keras
          default: keras
      title: KerasFramework
      x-fern-type-name: KerasFramework
    XGBoostFramework:
      description: XGBoost
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - xgboost
          default: xgboost
        serialization_format:
          $ref: '#/components/schemas/XGBoostSerializationFormat'
        model_filepath:
          description: Relative path to the model file in the model version contents
          type: string
        model_schema:
          $ref: '#/components/schemas/XGBoostModelSchema'
      title: XGBoostFramework
      x-fern-type-name: XGBoostFramework
    LightGBMFramework:
      description: LightGBM
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - lightgbm
          default: lightgbm
      title: LightGBMFramework
      x-fern-type-name: LightGBMFramework
    FastAIFramework:
      description: FastAI
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - fastai
          default: fastai
      title: FastAIFramework
      x-fern-type-name: FastAIFramework
    H2OFramework:
      description: H2O
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - h2o
          default: h2o
      title: H2OFramework
      x-fern-type-name: H2OFramework
    ONNXFramework:
      description: ONNX
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - onnx
          default: onnx
      title: ONNXFramework
      x-fern-type-name: ONNXFramework
    SpaCyFramework:
      description: SpaCy
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - spacy
          default: spacy
      title: SpaCyFramework
      x-fern-type-name: SpaCyFramework
    StatsModelsFramework:
      description: StatsModels
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - statsmodels
          default: statsmodels
      title: StatsModelsFramework
      x-fern-type-name: StatsModelsFramework
    GluonFramework:
      description: Gluon
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - gluon
          default: gluon
      title: GluonFramework
      x-fern-type-name: GluonFramework
    PaddleFramework:
      description: Paddle
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - paddle
          default: paddle
      title: PaddleFramework
      x-fern-type-name: PaddleFramework
    ModelVersionEnvironment:
      description: >-
        Runtime environment describing python version and dependencies for
        running the model
      type: object
      properties:
        python_version:
          description: Python version to use when running the model
          type: string
          pattern: ^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$
        pip_packages:
          description: pip dependencies needed for running the model
          type: array
          items:
            type: string
      title: ModelVersionEnvironment
      x-fern-type-name: ModelVersionEnvironment
    AgentSkillSourceInline:
      description: SKILL.md for this version when using inline source.
      type: object
      required:
        - type
        - skill_md
      properties:
        type:
          description: Type
          type: string
          enum:
            - inline
          default: inline
        skill_md:
          description: Main body of SKILL.md file.
          type: string
          minLength: 1
          maxLength: 30000
      title: AgentSkillSourceInline
      x-fern-type-name: AgentSkillSourceInline
    AgentSkillSourceBlobStorage:
      description: SKILL.md content stored on blob
      type: object
      required:
        - type
        - description
        - uri
      properties:
        type:
          description: Type
          type: string
          enum:
            - blob-storage
          default: blob-storage
        description:
          description: 1–1024 chars.
          type: string
          minLength: 1
          maxLength: 1024
        uri:
          description: Storage URI of the blob storage object where the skill is stored.
          type: string
          minLength: 1
      title: AgentSkillSourceBlobStorage
      x-fern-type-name: AgentSkillSourceBlobStorage
    AgentSkillSourceLocal:
      description: >-
        Load the skill from a local directory. The directory must include
        SKILL.md with valid YAML front matter.
      type: object
      required:
        - type
        - skill_dir
      properties:
        type:
          description: Type
          type: string
          enum:
            - local
          default: local
        skill_dir:
          description: >-
            Path to the skill root directory, including SKILL.md and related
            assets.
          type: string
          minLength: 1
      title: AgentSkillSourceLocal
      x-fern-type-name: AgentSkillSourceLocal
    ArtifactPath:
      type: object
      required:
        - src
      properties:
        src:
          description: Local file or folder path
          type: string
        dest:
          description: >-
            Relative path where the file or folder will be uploaded to in the
            artifact
          type: string
      title: ArtifactPath
      x-fern-type-name: ArtifactPath
    LibraryName:
      description: Name of the library for the framework
      type: string
      enum:
        - transformers
        - sentence-transformers
        - diffusers
      default: transformers
      nullable: true
      title: LibraryName
      x-fern-type-name: LibraryName
    SklearnSerializationFormat:
      description: Serialization format used to save the sklearn model
      type: string
      enum:
        - cloudpickle
        - joblib
        - pickle
      title: SklearnSerializationFormat
      x-fern-type-name: SklearnSerializationFormat
    SklearnModelSchema:
      description: Scikit Learn Model Schema
      type: object
      required:
        - infer_method_name
        - inputs
        - outputs
      properties:
        infer_method_name:
          $ref: '#/components/schemas/InferMethodName'
        inputs:
          description: Schema of the input
          type: array
          items:
            type: object
        outputs:
          description: Schema of the output
          type: array
          items:
            type: object
      title: SklearnModelSchema
      x-fern-type-name: SklearnModelSchema
    XGBoostSerializationFormat:
      description: Serialization format used to save the xgboost model
      type: string
      enum:
        - cloudpickle
        - joblib
        - pickle
        - json
      title: XGBoostSerializationFormat
      x-fern-type-name: XGBoostSerializationFormat
    XGBoostModelSchema:
      description: Schema of the XGBoost model
      type: object
      required:
        - infer_method_name
        - inputs
        - outputs
      properties:
        infer_method_name:
          description: Name of the method used for inference
          type: string
          enum:
            - predict
        inputs:
          description: Schema of the input
          type: array
          items:
            type: object
        outputs:
          description: Schema of the output
          type: array
          items:
            type: object
      title: XGBoostModelSchema
      x-fern-type-name: XGBoostModelSchema
    InferMethodName:
      description: Name of the method used for inference
      type: string
      enum:
        - predict
        - predict_proba
      title: InferMethodName
      x-fern-type-name: InferMethodName
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````