---
title: "Creates a credential in the project."
method: POST
path: "/projects/{project_id}/foundry/credentials"
tags: ["Foundry"]
---

# Creates a credential in the project.

`POST /projects/{project_id}/foundry/credentials`

## Path parameters

- `project_id` string, required

## Request body

- CreateCredentialRequest
  - `credentials` CredentialSecrets, required
    - `token` string — Access token (e.g. a HuggingFace token). Write-only; omitted unless explicitly revealed.
  - `description` string — Optional human-readable description.
  - `name` string, required — Name of the credential.

## Response `201`

- CredentialResponse
  - `created_at` string — RFC 3339 creation timestamp.
  - `credentials` CredentialSecrets
    - `token` string — Access token (e.g. a HuggingFace token). Write-only; omitted unless explicitly revealed.
  - `description` string — Human-readable description.
  - `id` string — Credential ID.
  - `name` string — Name of the credential.
  - `org_id` string — Owning organization ID.
  - `project_id` string — Owning project ID.
  - `updated_at` string — RFC 3339 last-update timestamp.
  - `vendor` string — Vendor the credential is for (e.g. "huggingface").

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `403` — Error Permissions
- `500` — Error Internal Server

---

[API](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/versions/a3fd2dedc72b/schema)
