Skip to main content
POST
modelProviders.create(spec): verifies the key, then stores the provider

Authorizations

Authorization
string
header
required

An API key, or a session token on its own session

Body

application/json
name
string
required
kind
enum<string>
required
Available options:
anthropic,
openai,
anthropic-compatible,
openai-compatible
apiKey
string
required
models
string[]
required

Model IDs.

baseUrl
string

Required for the compatible kinds, refused for the others.

testModel
string

The model of a one-token request; default the first of models.

Response

Created

name
string
required

Unique in the project, fixed at creation; a project model is named provider/model.

Pattern: ^[a-z0-9-]{1,32}$
kind
enum<string>
required
Available options:
anthropic,
openai,
anthropic-compatible,
openai-compatible
protocol
enum<string>
required

anthropic: the Messages API, which Claude Code speaks; openai: the Responses API, which Codex speaks.

Available options:
anthropic,
openai
harness
enum<string>
required
Available options:
claude-code,
codex,
pi
baseUrl
string
required
keyPreview
string
required

The key's first 4 and last 4 characters; the key is never returned.

models
object[]
required
status
enum<string>
required
Available options:
ok,
failing
lastError
string | null
required

While failing: what the provider answered.

checkedAt
string<date-time>
required

RFC 3339 in UTC with milliseconds.

Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
createdAt
string<date-time>
required

RFC 3339 in UTC with milliseconds.

Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
updatedAt
string<date-time>
required

RFC 3339 in UTC with milliseconds.

Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$