Skip to Content

Settings

Manage your AI model settings. Use these endpoints to configure BYOK (Bring Your Own Key) for AI providers.

Get Settings

GET /v1/settings

Returns your current AI model configuration.

Request

curl https://api.laddro.com/v1/settings \ -H "x-api-key: YOUR_API_KEY"

Response

{ "data": { "model": { "provider": "openai", "modelId": "gpt-4o-mini", "isCustom": false } } }

If no custom model is set, isCustom is false and the system default is used (OpenAI gpt-4o-mini).


Set AI Model (BYOK)

PUT /v1/settings/model

Configure a custom AI provider and model using your own API key. Requires an active recurring Laddro subscription.

Request Body

FieldTypeRequiredDescription
providerstringYesProvider name (e.g., openai, anthropic)
modelIdstringYesModel ID (e.g., gpt-4.1-mini)
apiKeystringYesYour API key for the provider

Request

curl -X PUT https://api.laddro.com/v1/settings/model \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "provider": "anthropic", "modelId": "claude-haiku-4.5", "apiKey": "sk-ant-..." }'

Response

{ "data": { "model": { "provider": "anthropic", "modelId": "claude-haiku-4.5", "isCustom": true } }, "message": "Model updated successfully" }

Your API key is validated with a test call before saving. Invalid keys are rejected with a clear error message.

Errors

StatusDescription
400Invalid provider or model ID
401Missing or invalid API key
403BYOK requires an active recurring subscription
422Provider API key validation failed

Reset to Default Model

DELETE /v1/settings/model

Remove your custom model configuration and revert to the system default.

Request

curl -X DELETE https://api.laddro.com/v1/settings/model \ -H "x-api-key: YOUR_API_KEY"

Response

{ "data": { "model": { "provider": "openai", "modelId": "gpt-4o-mini", "isCustom": false } }, "message": "Model reset to default" }

See BYOK Guide for setup instructions and supported providers.

Last updated on