For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • API Guides
    • Overview
    • Streaming
    • Embeddings
    • Limits
    • Authentication
    • Parameters
    • Errors and Debugging
  • API Reference
      • GETList BYOK provider credentials
      • POSTCreate a BYOK provider credential
      • GETGet a BYOK provider credential
      • DELDelete a BYOK provider credential
      • PATCHUpdate a BYOK provider credential
LogoLogo
ModelsChatRankingsDocs
API ReferenceByok

List BYOK provider credentials

GET
https://openrouter.ai/api/v1/byok
GET
/api/v1/byok
$curl https://openrouter.ai/api/v1/byok \
> -H "Authorization: Bearer <token>"
1{
2 "data": [
3 {
4 "allowed_api_key_hashes": null,
5 "allowed_models": null,
6 "allowed_user_ids": null,
7 "created_at": "2025-08-24T10:30:00Z",
8 "disabled": false,
9 "id": "11111111-2222-3333-4444-555555555555",
10 "is_fallback": false,
11 "label": "sk-...AbCd",
12 "provider": "openai",
13 "sort_order": 0,
14 "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
15 "name": "Production OpenAI Key"
16 }
17 ],
18 "total_count": 1
19}

List the bring-your-own-key (BYOK) provider credentials for the authenticated entity’s default workspace. Use the workspace_id query parameter to scope the result to a different workspace, or the provider query parameter to filter by upstream provider. Management key required.

Was this page helpful?
Previous

Create a BYOK provider credential

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Query parameters

offsetintegerOptional>=0
Number of records to skip for pagination
limitintegerOptional1-100

Maximum number of records to return (max 100)

workspace_idstringOptionalformat: "uuid"
Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace.
providerenumOptional

Optional provider slug to filter by (e.g. openai, anthropic, amazon-bedrock).

Response

List of BYOK credentials
datalist of objects
List of BYOK credentials.
total_countinteger
Total number of BYOK credentials matching the filters.

Errors

401
Unauthorized Error
500
Internal Server Error