> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Save Provider Key

> Store an encrypted AI provider API key.

# Save Provider Key

Securely store an AI provider API key in the Shinzo Platform. Keys are encrypted at rest and can be used with the Spotlight model proxy.

## Authentication

Requires JWT token authentication.

<ParamField body="provider" type="string" required>Provider name (`anthropic`)</ParamField>
<ParamField body="provider_api_key" type="string" required>The API key to store</ParamField>
<ParamField body="provider_base_url" type="string">Custom base URL (for proxies or self-hosted)</ParamField>
<ParamField body="label" type="string">Optional label to identify this key</ParamField>

## Example Request

```bash theme={null}
curl -X POST https://api.app.shinzo.ai/auth/provider_keys \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "anthropic",
    "provider_api_key": "sk-ant-api03-...",
    "label": "Production Key"
  }'
```

## Response

```json theme={null}
{
  "uuid": "pk_abc123def456",
  "provider": "anthropic",
  "label": "Production Key",
  "status": "active",
  "created_at": "2025-01-15T10:00:00Z"
}
```

## Response Fields

| Field        | Type   | Description                          |
| ------------ | ------ | ------------------------------------ |
| `uuid`       | string | Unique identifier for the stored key |
| `provider`   | string | Provider name                        |
| `label`      | string | User-provided label (if set)         |
| `status`     | string | Key status (`active`)                |
| `created_at` | string | Creation timestamp (ISO 8601)        |

## Status Codes

| Code  | Description                                            |
| ----- | ------------------------------------------------------ |
| `201` | Key saved successfully                                 |
| `400` | Invalid request (missing fields, unsupported provider) |
| `401` | Invalid or missing JWT token                           |

## Security Notes

* API keys are encrypted before storage using industry-standard encryption
* Original key values cannot be retrieved after storage
* Keys can be updated or deleted but not viewed
