For AI agents, the documentation index lists all pages. Append .md to a documentation URL for Markdown, or request text/markdown.

Skip to Content
spare inference

Provider keys

List, check, choose the default and remove the provider keys you saved in the console.

1 min readEdit this page
GET
/v1/byok/connections

Your saved provider keys: name, provider, which one is the default, and recent check results. Never returns the key itself. Add keys in the console. Needs a key with the byok:read scope.

Authorization

x-api-key<token>

x-api-key: <key>. Anthropic SDKs send this.

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/byok/connections"
{  "data": [    {      "id": "string",      "provider_name": "string",      "label": "string",      "revision": "string",      "key_prefix": "string",      "api_base": "string",      "config": {        "property1": "string",        "property2": "string"      },      "is_default": true,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "verification": {        "supported": true,        "available": true,        "credential_revision": "string",        "config_revision": "string",        "last_check": {          "check_id": "string",          "credential_revision": "string",          "config_revision": "string",          "checked_at": "2019-08-24T14:15:22Z",          "outcome": "valid",          "upstream_status": 0        }      }    }  ]}
POST
/v1/byok/connections/{provider}/{id}/verify

Asks the provider whether the key works, without making it the default or sending a generation. One check per key every 15 seconds. Needs a key with the byok:write scope.

Authorization

x-api-key<token>

x-api-key: <key>. Anthropic SDKs send this.

In: header

Path Parameters

provider*string

Registry provider ID.

id*string

Stable connection UUID.

Request Body

application/json

Current credential and configuration fingerprints.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/byok/connections/string/string/verify" \  -H "Content-Type: application/json" \  -d '{    "credential_revision": "string",    "config_revision": "string"  }'
{  "check_id": "string",  "credential_revision": "string",  "config_revision": "string",  "checked_at": "2019-08-24T14:15:22Z",  "outcome": "valid",  "upstream_status": 0}
POST
/v1/byok/connections/{provider}/{id}/activate

Requests to this provider use this key from now on. Each provider has at most one default. Needs a key with the byok:write scope.

Authorization

x-api-key<token>

x-api-key: <key>. Anthropic SDKs send this.

In: header

Path Parameters

provider*string

Registry provider ID.

id*string

Stable connection UUID.

Request Body

application/json

Expected connection revision.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/byok/connections/string/string/activate" \  -H "Content-Type: application/json" \  -d '{    "revision": "string"  }'
null
DELETE
/v1/byok/connections/{provider}/{id}

Deleting the default leaves the provider without one; no other key is picked for you. Needs a key with the byok:write scope.

Authorization

x-api-key<token>

x-api-key: <key>. Anthropic SDKs send this.

In: header

Path Parameters

provider*string

Registry provider ID.

id*string

Stable connection UUID.

Request Body

application/json

Expected connection revision.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/byok/connections/string/string" \  -H "Content-Type: application/json" \  -d '{    "revision": "string"  }'
null

How is this guide?