---
title: "Set organization credential"
method: POST
path: "/v1/{provider}/credentials"
tags: ["Agent credentials"]
---

# Set organization credential

`POST /v1/{provider}/credentials`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/{provider}/credentials`
- Auth: HTTP bearer

Organization credentials apply to every member. Changing them requires an admin's personal API key. The key is checked with the provider where possible. A new `opencode-go` key is added after the existing ones, up to 10, and deleting removes them all.

## Path parameters

- `provider` 'anthropic' | 'openai' | 'openrouter' | 'cursor' | 'muse-api-key' | 'opencode-go' | 'aster' | 'ollama' | 'openai-compatible' | 'bedrock' | 'claude-foundry' | 'codex-foundry' | 'claude' | 'codex' | 'muse', required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Request body

- SetCredentialRequest: Most providers take `api_key`. `ollama`: `api_key`, `base_url`, `models`. `openai-compatible`: `base_url`, `api_key`, `models_url`, `authorization_header`. `bedrock`: `aws_access_key_id`, `aws_secret_access_key`, `aws_region`, `small_fast_model_region`. `claude-foundry`: `api_key`, `resource`, `sonnet_model`, `haiku_model`, `opus_model`. `codex-foundry`: `api_key`, `base_url`, `model`.
  - `api_key` string
  - `base_url` string
  - `models_url` string
  - `authorization_header` string
  - `aws_access_key_id` string
  - `aws_secret_access_key` string
  - `aws_region` string
  - `small_fast_model_region` string
  - `resource` string
  - `sonnet_model` string
  - `haiku_model` string
  - `opus_model` string
  - `model` string
  - `models` string[]

## Response `200`

Success

- object
  - `success` boolean, required
  - `credential_id` string

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - The authenticated account cannot access this resource

---

[API](https://skmtc.dev/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
