Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
Available options
:
daily
,
weekly
,
monthly
,
null
Example
:
"monthly"
​
workspace_id
string<uuid>
The workspace to create the API key in. Defaults to the default workspace if not provided.
Example
:
"0df9e665-d932-5740-b2c7-b52af166bc11"
Response
201
application/json
API key created successfully
​
data
object
required
The created API key information
Show
child attributes
Example
:
{
"byok_usage"
:
17.38
,
"byok_usage_daily"
:
17.38
,
"byok_usage_monthly"
:
17.38
,
"byok_usage_weekly"
:
17.38
,
"created_at"
:
"2025-08-24T10:30:00Z"
,
"creator_user_id"
:
"user_2dHFtVWx2n56w6HkM0000000000"
,
"disabled"
:
false
,
"expires_at"
:
"2027-12-31T23:59:59Z"
,
"external_user"
:
null
,
"hash"
:

Images
Interns
API Keys
GET
Get current API key
GET
List API keys
POST
Create a new API key
GET
Get a single API key
DEL
Delete an API key
PATCH
Update an API key
Anthropic Messages
Models
Observability
Organization
Presets
Private Endpoints
Providers
Rerank
Responses
SCIM
SystemOne
Tools
Vault
Video Generation
Workspaces
Create a new API key
cURL
curl
--request
POST
\
--url
https://openrouter.ai/api/v1/keys
\
--header
'Authorization: Bearer <token>'
\
--header
'Content-Type: application/json'
\
--data
'
{
"expires_at": "2027-12-31T23:59:59Z",
"include_byok_in_limit": true,
"limit": 50,
"limit_reset": "monthly",
"name": "My New API Key"
}
'
