---
title: "Create Stored Provider"
method: POST
path: "/v1/provider-credentials"
tags: ["providers"]
---

# Create Stored Provider

`POST /v1/provider-credentials`

Add a provider at runtime. Storing a key requires OTARI_SECRET_KEY.

## Request body

- CreateStoredProviderRequest — Create a stored provider. ``api_key`` is write-only and requires OTARI_SECRET_KEY.
  - `api_base` string, nullable
  - `api_key` string, nullable — Provider API key. Stored encrypted; never returned.
  - `client_args` object, nullable
  - `instance` string, required — Routing key, e.g. 'openai' or a named instance like 'home_lab'.
  - `provider_type` string, nullable — any-llm implementation when the instance name is not itself one.

## Response `201`

Successful Response

- StoredProviderResponse — A runtime-stored provider. The API key is never returned, only ``last4``.
  - `api_base` string, nullable
  - `client_args` object
  - `created_at` string, nullable
  - `decryptable` boolean
  - `instance` string, required
  - `last4` string, nullable
  - `provider_type` string, nullable
  - `updated_at` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.net/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/4891ca15ef2b/schema)
