Create an AI credential

View as Markdown

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-IdstringOptional
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.
providerenumRequired
apiKeystringOptional
baseUrlstringOptionalformat: "uri"
defaultModelstringOptional
namestringOptional1-200 characters
statusenumOptional
testbooleanOptional

Response

Created
createdAtdatetime
RFC 3339 timestamp with a UTC offset.
hasApiKeyboolean
idstring
namestring1-200 characters
providerenum
statusenum
updatedAtdatetime
RFC 3339 timestamp with a UTC offset.
baseUrlstringOptionalformat: "uri"
defaultModelstringOptional
subaccountIdstringOptional1-64 characters
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