Skip to main content
POST

Authorizations

Authorization
string
header
required

Your SLNG consumer API key.

Body

application/json

The client model to create, including its write-only provider credentials.

The writable fields of a client model (a bring-your-own model provider credential). The organisation is taken from the authenticated request. The api_key, vertex_credentials, and aws_credentials fields are write-only and are never returned.

model_name
string
required

Your alias for the model. Sent upstream as-is unless model_id is set.

Required string length: 1 - 255
service_type
enum<string>
default:llm

The kind of model: llm for text generation, stt for speech-to-text, or tts for text-to-speech.

Available options:
llm,
stt,
tts
url
string | null
Required string length: 1 - 2000
api_key
string | null

The upstream provider API key. Write-only: stored encrypted and never returned. Required for openai-compat, openai-responses, and azure; rejected for vertex.

Minimum string length: 1
model_id
string | null

The upstream provider-facing model id when it differs from model_name. Empty or null sends model_name as-is.

Maximum string length: 255
provider
enum<string> | null

The bring-your-own model provider. openai-compat targets an OpenAI-compatible Chat Completions endpoint; openai-responses targets the OpenAI /v1/responses endpoint with the same config as openai-compat; azure is Azure OpenAI; vertex is Google Vertex AI.

Available options:
openai-compat,
openai-responses,
azure,
vertex
model_lab
string | null
Maximum string length: 100
azure_deployment
string | null

Azure OpenAI deployment name. Azure only.

Maximum string length: 255
api_version
string | null

Azure OpenAI API version. Azure only.

Maximum string length: 100
auth_header
string | null

openai-compat and openai-responses only: a custom credential header name that replaces the default Authorization Bearer scheme. Rejected for azure and vertex.

Maximum string length: 64
vertex_credentials
Vertex Credentials · object | null

Vertex only: the GCP service-account key JSON. Write-only; stored encrypted and never returned (responses expose has_vertex_credentials).

vertex_location
string | null
Maximum string length: 100
vertex_project
string | null
Maximum string length: 100
aws_credentials
Aws Credentials · object | null

Speech BYOK only: AWS SigV4 credentials (access_key_id, secret_access_key, region). Write-only; stored encrypted and never returned (responses expose has_aws_credentials).

api_key_id
string<uuid> | null

Speech BYOK only: the API key id this credential is scoped to. Null means the organisation default. Rejected on llm rows. Non-secret.

languages
string[]
regions
string[] | null
enabled
boolean
default:true
kwargs
Kwargs · object | null
fallbacks
any[] | null
deprecated

Retired. Leave it out, or send null or an empty list; a non-empty list returns a 422. To choose which key answers first, use Set as default on the BYOK page of the Vault (organization owners and admins). To add fallbacks for an agent, use Fallback routing in its Think section.

Response

The created client model.

A client model as returned by the API. Credential values are never included; has_api_key, has_vertex_credentials, and has_aws_credentials report whether each secret is stored.

id
string<uuid>
required
org_id
string<uuid>
required
service_type
enum<string>
required

The kind of model: llm, stt, or tts.

Available options:
llm,
stt,
tts
provider
string | null
required

The configured provider. May be a legacy free-form label on records created before the current provider set.

model_lab
string | null
required
url
string | null
required
has_api_key
boolean
required

Whether an upstream API key is stored. The key value is write-only and never returned.

auth_header
string | null
required

The custom credential header name, or null for the default Authorization Bearer scheme. The credential value itself is never returned.

model_name
string
required

The configured alias for the model.

model_id
string | null
required

The upstream provider-facing model id, or null when model_name is sent as-is.

azure_deployment
string | null
required

The configured Azure OpenAI deployment name (Azure only).

api_version
string | null
required

The configured Azure OpenAI API version (Azure only).

has_vertex_credentials
boolean
required

Whether Vertex service-account credentials are stored. The value is write-only and never returned.

has_aws_credentials
boolean
required

Whether AWS SigV4 credentials are stored. The value is write-only and never returned.

vertex_location
string | null
required
vertex_project
string | null
required
languages
string[]
required
regions
string[] | null
required
enabled
boolean
required
kwargs
Kwargs · object | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
api_key_id
string<uuid> | null

Speech BYOK only: the API key id this credential is scoped to, or null for the organisation default. Non-secret.