List model keys
The four providers (anthropic, openai, xai, google) with the project's own-key state. A key is never returned: preview is its last 4 characters. use is the stored choice of whose key calls use; useEffective what they use now (a plan without platformModels, Free, always uses the project's own key). Model keys belong to the project, like everything an API key reaches. Without one, Boxline's keys are used where the plan includes them; each run says which in keySource.
/v1/project/model-keysRequest
| Method and path | GET/v1/project/model-keys |
|---|---|
| Base URL | https://api.boxline.dev |
| Authentication | Your API key in the x-api-key header (or Authorization: Bearer). The examples read it from BOXLINE_API_KEY. |
curl "https://api.boxline.dev/v1/project/model-keys" \ -H "x-api-key: $BOXLINE_API_KEY"import { Boxline } from "@boxline/sdk";const bx = new Boxline(); // reads BOXLINE_API_KEY and BOXLINE_API_URLconst { keys } = await bx.project.modelKeys();for (const k of keys) console.log(k.provider, k.hasKey, k.preview, k.useEffective);from boxline import Boxlinebx = Boxline() # reads BOXLINE_API_KEY and BOXLINE_API_URLfor k in bx.project.model_keys()["keys"]: print(k["provider"], k["hasKey"], k["preview"], k["useEffective"])Responses
200 OK
One item per provider.
Fields
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
keys | object[] | – | – | |
keys[].provider | string | – | anthropic, openai, xai, google | Anthropic Claude, OpenAI, Grok (xAI), Google Gemini. Grok and Gemini have no computer use (mode computer is 400). |
keys[].use | string | – | project, platform | Whose key a model call uses, the project's own (project, no model charge from Boxline) or the platform's. |
keys[].useEffective | string | – | project, platform | Whose key a model call uses, the project's own (project, no model charge from Boxline) or the platform's. |
keys[].hasKey | boolean | – | – | |
keys[].preview | string | null | – | – | The last 4 characters of the key. |
keys[].verified | boolean | null | – | – | The provider accepted the key when it was saved (false: it could not be reached). |
keys[].createdAt | string | null | – | – | Format: date-time. |
keys[].updatedAt | string | null | – | – | Format: date-time. |
keys[].updatedVia | string | null | – | console, api_key, support, null | |
keys[].lastUsedAt | string | null | – | – | Format: date-time. |
keys[].platformAvailable | boolean | – | – | The server holds a key for the provider and the plan includes platformModels. |
{ "keys": [ { "provider": "anthropic", "use": "project", "useEffective": "project", "hasKey": false, "preview": "…", "verified": false, "createdAt": "2026-09-29T10:00:00.000Z", "updatedAt": "2026-09-29T10:00:00.000Z", "updatedVia": "console", "lastUsedAt": "2026-09-29T10:00:00.000Z", "platformAvailable": false } ]}Errors
Errors have a matching HTTP status and the same body. code is stable, so check it in your code; message is for people. See Errors and request ids.
| Status | Codes | When |
|---|---|---|
| 401 Unauthorized | unauthorized | Missing or invalid API key. |
{ "error": { "code": "not_found", "message": "session not found", "requestId": "req_4fJx0aQm2Lk9Pz7N" }}Learn more
These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.