Create an AI credential
Create a saved BYOK AI credential. Name is optional and defaults server-side; pass test=true to verify credentials before saving.
Authentication
AuthorizationBearer
Use Bearer <api-key>.
Headers
BCTRL-Subaccount-Id
Optional effective subaccount context for organization API keys. Subaccount API keys are already scoped and cannot use this header to act as another subaccount.
Request
This endpoint expects an object.
provider
apiKey
baseUrl
defaultModel
name
status
test
Response
Created
createdAt
RFC 3339 timestamp with a UTC offset.
hasApiKey
id
name
provider
status
updatedAt
RFC 3339 timestamp with a UTC offset.
baseUrl
defaultModel
subaccountId
Opaque identifier for a BCTRL subaccount.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error

