---
title: "Create temporary credential"
method: POST
path: "/v1/proxy/credentials"
tags: ["Proxy"]
---

# Create temporary credential

`POST /v1/proxy/credentials`

## Request

- Base URL: `https://api.braintrust.dev`
- URL: `https://api.braintrust.dev/v1/proxy/credentials`
- Auth: one of:
  - HTTP bearer
  - none

Create a temporary credential which can access the proxy for a limited time. The temporary credential will be allowed to make requests on behalf of the Braintrust API key (or model provider API key) provided in the `Authorization` header. See [docs](/docs/deploy/ai-proxy#create-temporary-credentials) for code examples.

## Request body

- object: Payload for requesting temporary credentials.
  - `model` string, nullable: Granted model name. Null/undefined to grant usage of all models.
  - `ttl_seconds` number: TTL of the temporary credential. 10 minutes by default.
  - `logging` object, nullable: If present, proxy will log requests to the given Braintrust project name.
    - `project_name` string, required
    - `compress_audio` boolean

## Response `200`

Successfully created temporary credential

- object
  - `key` string, required

## Other responses

- `400`: The request was unacceptable, often due to missing a required parameter

## Changes

- **2026-10-30** `8f5039399f77`: 2 breaking
  - the request property `logging` became not nullable
  - the request property `model` became not nullable
- **2025-06-17** `77a2d5797d94`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/braintrustdata/apis/braintrust-api/changes/v1/proxy/credentials/post.md)

---

[API](https://skmtc.dev/braintrustdata/apis/braintrust-api.md) - [All operations](https://skmtc.dev/braintrustdata/apis/braintrust-api/llms.txt) - [OpenAPI document](https://skmtc.dev/braintrustdata/apis/braintrust-api/revisions/19184ec94018?raw)
