---
title: "Generate Dataset Credentials"
method: POST
path: "/v1/datasets/credentials"
tags: ["Datasets"]
---

# Generate Dataset Credentials

`POST /v1/datasets/credentials`

Generate temporary S3 credentials to directly access and download dataset files from cloud storage. Credentials are valid for 7 days by default and provide read-only access to your team's available datasets.

## Response `200`

Successful Response

- BucketCredentials
  - `access_key_id` string, required — The access key id for the temporary credential
  - `secret_access_key` string, required — The secret access key for the temporary credential
  - `session_token` string, required — The session token for the temporary credential
  - `expiration` string, date-time, required — The expiration date of the temporary credential
  - `storage` StorageConfig, required
    - `bucket_name` string, required — The S3/R2 bucket name where the datasets are stored
    - `endpoint_url` string, required — The S3-compatible endpoint URL to use for accessing the bucket
    - `prefixes` string[], required — The prefixes to use for the temporary credential

## Other responses

- `400` — Bad Request
- `402` — Payment Required
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/theirstack/apis/theirstack-api-reference.md) · [All operations](https://skmtc.net/theirstack/apis/theirstack-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/theirstack/theirstack-api-reference/versions/64902095234a/schema)
