---
title: "Generate temporary model version credentials. These credentials are used by clients to write and retrieve model artifacts from the model versions external storage location."
method: POST
path: "/temporary-model-version-credentials"
tags: ["TemporaryCredentials"]
---

# Generate temporary model version credentials. These credentials are used by clients to write and retrieve model artifacts from the model versions external storage location.

`POST /temporary-model-version-credentials`

## Request

- Base URL: `http://localhost:8080/api/2.1/unity-catalog`
- URL: `http://localhost:8080/api/2.1/unity-catalog/temporary-model-version-credentials`
- Auth: none declared

## Request body

- GenerateTemporaryModelVersionCredential
  - `catalog_name` string, required: Catalog name for which temporary credentials are generated. Can be obtained from models/{full_name} (get model info) API.
  - `schema_name` string, required: Schema name for which temporary credentials are generated. Can be obtained from models/{full_name} (get model info) API.
  - `model_name` string, required: Model name for which temporary credentials are generated. Can be obtained from models/{full_name} (get model info) API.
  - `version` integer, required: Model version for which temporary credentials are generated.
  - `operation` 'UNKNOWN_MODEL_VERSION_OPERATION' | 'READ_MODEL_VERSION' | 'READ_WRITE_MODEL_VERSION', required

## Response `200`

Successful response

- TemporaryCredentials
  - `aws_temp_credentials` AwsCredentials
    - `access_key_id` string: The access key ID that identifies the temporary credentials.
    - `secret_access_key` string: The secret access key that can be used to sign AWS API requests.
    - `session_token` string: The token that users must pass to AWS API to use the temporary credentials.
  - `azure_user_delegation_sas` AzureUserDelegationSAS
    - `sas_token` string: Azure SAS Token
  - `gcp_oauth_token` GcpOauthToken
    - `oauth_token` string: Gcp Token
  - `expiration_time` integer: Server time when the credential will expire, in epoch milliseconds. The API client is advised to cache the credential given this expiration time.
  - `url` string: The normalized URL of the storage path the temporary credential was generated for.

## Changes

- **2026-07-22** `b851144f7f7e`: 1 info
  - added the optional property `url` to the response with the `200` status
- **2024-09-17** `00895ff43f02`: 1 warning, 2 info
  - removed the optional property `url` from the response with the `200` status
  - api tag `TemporaryCredentials` added
  - api tag `TemporaryModelVersionCredentials` removed
- **2024-09-02** `50c4f8f8ae26`: 6 info
  - api operation id `generateTemporaryModelVersionCredential` removed and replaced with `generateTemporaryModelVersionCredentials`
  - api tag `TemporaryModelVersionCredentials` added
  - api tag `TemporaryModelVersionCredential` removed
  - added the optional property `azure_user_delegation_sas` to the response with the `200` status
  - …2 more
- **2024-08-12** `6fd9940ca119`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unitycatalog/apis/unity-catalog-api/changes/temporary-model-version-credentials/post.md)

---

[API](https://skmtc.dev/unitycatalog/apis/unity-catalog-api.md) - [All operations](https://skmtc.dev/unitycatalog/apis/unity-catalog-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unitycatalog/apis/unity-catalog-api/revisions/c84507f0d7e0?raw)
