Credentials

Create or update an API-key credential

Create from a template (templateId) or custom host, optionally storing an API key in the Keychain. One credential per (host, resource).

post/v1/credentials/api-key

Request

  • Base URL: http://localhost:9998
  • URL: http://localhost:9998/v1/credentials/api-key
  • Auth: HTTP bearer

Request body

templateIdstring

Template ID (openai, anthropic, cloudflare, etc.) — mutually exclusive with host

hoststring

Custom host — mutually exclusive with templateId

namestring
apiKeystring

API key (stored once per credential in Keychain)

accountIdstring

Account identifier used in URL paths

Response

The created or updated credential

idstring required

Stable, non-colliding identity key (host:<host> or provider:<id>).

providerIdstring nullable

Catalog provider id when known (google, openai, ...).

displayNamestring required
keyPresence'configured' | 'absent' | 'unreadable' required

Whether an API key is stored in the Keychain for this credential, three-way. configured means the Keychain returned a key. absent means the Keychain answered and there is no key for this account. unreadable means the Keychain refused to answer (locked, or a missing entitlement) and says nothing about whether a key exists, so consumers must not treat it as absence.

Changes

No recorded changes to this operation across all 1 revision of this API.