---
title: "Create Provider Config"
method: POST
path: "/v1/workspaces/{workspace}/provider-configs/"
tags: ["v1", "protected", "provider-configs"]
---

# Create Provider Config

`POST /v1/workspaces/{workspace}/provider-configs/`

Create a new provider configuration.

## Path parameters

- `workspace` string, required — Slug of the workspace the request acts in

## Request body

- ProviderConfigCreate — Payload for creating an LLM provider configuration.
  - `api_key` string, nullable — Secret API key for the provider. Stored encrypted in the secret manager; never returned in responses. May be empty for proxies that accept keyless traffic — the backend suppresses the Authorization header when this is empty.
  - `api_key_secret_id` string, uuid, nullable — Use an existing workspace secret as the API key instead of supplying one here. Mutually exclusive with api_key. The secret keeps its own lifecycle: several configurations may share it, and it cannot be deleted while any of them still points at it.
  - `description` string, nullable — Optional human-readable description of this configuration.
  - `endpoint_url` string, nullable — Optional custom endpoint URL (e.g. for self-hosted or proxied providers). Leave unset to use the provider's default.
  - `is_public` boolean — If True, the configuration is visible to all workspace members; otherwise it is scoped to the creator.
  - `name` string, required — Human-readable label for this provider configuration.
  - `provider_spec_id` string, uuid, required — UUID of the provider specification (e.g. OpenAI, Anthropic) this configuration targets. Look up via list_specs.

## Response `200`

Successful Response

- ProviderConfigResponse
  - `created_at` string, required
  - `created_by` string, required
  - `endpoint_url` string, nullable, required
  - `id` string, required
  - `is_active` boolean, required
  - `is_public` boolean, required
  - `managed_by` string, nullable
  - `model_instance_ids` string[]
  - `name` string, required
  - `provider_spec_id` string, required
  - `provider_spec_key` string, nullable
  - `provider_spec_name` string, nullable
  - `requires_api_key` boolean
  - `updated_at` string, required
  - `workspace_id` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-26** `d3ad8e1a3681` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/workspaces/:workspace/provider-configs/post.md)

---

[API](https://skmtc.dev/agentarea/apis/agentarea-api.md) · [All operations](https://skmtc.dev/agentarea/apis/agentarea-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentarea/apis/agentarea-api/revisions/286327d8bd86?raw)
