EddytorDocs & API
AI

Upsert an AI credential

Creates or replaces the API key for the specified AI provider. If a credential for the same provider already exists, it is overwritten. The stored key is encrypted at rest and is never returned by any GET endpoint. **Required scope:** `ai:write`

PUT
/v1/ai/credentials

Authorization

BearerAuth
AuthorizationBearer <token>

Security scheme for OpenAPI endpoints. Validates both JWT tokens and API keys.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for creating or updating an AI credential.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/ai/credentials" \  -H "Content-Type: application/json" \  -d '{    "provider": "openai",    "api_key": "sk-proj-abc123...",    "base_url": null  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "provider": "claude",  "base_url": "string",  "created_at": "string",  "updated_at": "string"}
Empty
Empty
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}
{  "code": "string",  "message": "string",  "request_id": "string",  "details": [    {      "field": "string",      "message": "string"    }  ]}