mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2098ff28e | ||
|
|
1cad51abb6 |
+7
-7
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||||
management:
|
management:
|
||||||
docChecksum: 86bc0c01844e23d7e1921008d13372b9
|
docChecksum: 56062ba1997e25ff8be6529c550e5de9
|
||||||
docVersion: 1.0.0
|
docVersion: 1.0.0
|
||||||
speakeasyVersion: 1.666.0
|
speakeasyVersion: 1.666.0
|
||||||
generationVersion: 2.768.0
|
generationVersion: 2.768.0
|
||||||
releaseVersion: 0.5.1
|
releaseVersion: 0.6.0
|
||||||
configChecksum: 7f34271a911f5490f6f17a4e27f8ef7f
|
configChecksum: 690b77f47b975e28d7e11a6b96fa1c2f
|
||||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||||
published: true
|
published: true
|
||||||
@@ -987,7 +987,7 @@ examples:
|
|||||||
"401":
|
"401":
|
||||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||||
"403":
|
"403":
|
||||||
application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}}
|
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
|
||||||
"500":
|
"500":
|
||||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||||
getCredits:
|
getCredits:
|
||||||
@@ -998,7 +998,7 @@ examples:
|
|||||||
"401":
|
"401":
|
||||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||||
"403":
|
"403":
|
||||||
application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}}
|
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
|
||||||
"500":
|
"500":
|
||||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||||
createCoinbaseCharge:
|
createCoinbaseCharge:
|
||||||
@@ -1232,7 +1232,7 @@ examples:
|
|||||||
speakeasy-default-get-current-key:
|
speakeasy-default-get-current-key:
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
|
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||||
"500":
|
"500":
|
||||||
@@ -1247,7 +1247,7 @@ examples:
|
|||||||
"400":
|
"400":
|
||||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||||
"403":
|
"403":
|
||||||
application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}}
|
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
|
||||||
"500":
|
"500":
|
||||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||||
createAuthKeysCode:
|
createAuthKeysCode:
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ generation:
|
|||||||
skipResponseBodyAssertions: false
|
skipResponseBodyAssertions: false
|
||||||
preApplyUnionDiscriminators: true
|
preApplyUnionDiscriminators: true
|
||||||
python:
|
python:
|
||||||
version: 0.5.1
|
version: 0.6.0
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dev: {}
|
dev: {}
|
||||||
main: {}
|
main: {}
|
||||||
|
|||||||
+47
-39
@@ -7298,7 +7298,7 @@ components:
|
|||||||
description: Error data for ForbiddenResponse
|
description: Error data for ForbiddenResponse
|
||||||
example:
|
example:
|
||||||
code: 403
|
code: 403
|
||||||
message: Only provisioning keys can perform this operation
|
message: Only management keys can perform this operation
|
||||||
ForbiddenResponse:
|
ForbiddenResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -7313,7 +7313,7 @@ components:
|
|||||||
example:
|
example:
|
||||||
error:
|
error:
|
||||||
code: 403
|
code: 403
|
||||||
message: Only provisioning keys can perform this operation
|
message: Only management keys can perform this operation
|
||||||
CreateChargeRequest:
|
CreateChargeRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -9822,8 +9822,8 @@ paths:
|
|||||||
operationId: getUserActivity
|
operationId: getUserActivity
|
||||||
summary: Get user activity grouped by endpoint
|
summary: Get user activity grouped by endpoint
|
||||||
description: >-
|
description: >-
|
||||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning
|
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -9874,7 +9874,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||||
'403':
|
'403':
|
||||||
description: Forbidden - Only provisioning keys can fetch activity
|
description: Forbidden - Only management keys can fetch activity
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@@ -9893,8 +9893,8 @@ paths:
|
|||||||
summary: Get remaining credits
|
summary: Get remaining credits
|
||||||
operationId: getCredits
|
operationId: getCredits
|
||||||
description: >-
|
description: >-
|
||||||
Get total credits purchased and used for the authenticated user. [Provisioning
|
Get total credits purchased and used for the authenticated user. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Returns the total credits purchased and used
|
description: Returns the total credits purchased and used
|
||||||
@@ -9934,7 +9934,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||||
'403':
|
'403':
|
||||||
description: Forbidden - Only provisioning keys can fetch credits
|
description: Forbidden - Only management keys can fetch credits
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@@ -10957,8 +10957,8 @@ paths:
|
|||||||
- API Keys
|
- API Keys
|
||||||
summary: List API keys
|
summary: List API keys
|
||||||
description: >-
|
description: >-
|
||||||
List all API keys for the authenticated user. [Provisioning
|
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys)
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11158,8 +11158,8 @@ paths:
|
|||||||
- API Keys
|
- API Keys
|
||||||
summary: Create a new API key
|
summary: Create a new API key
|
||||||
description: >-
|
description: >-
|
||||||
Create a new API key for the authenticated user. [Provisioning
|
Create a new API key for the authenticated user. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -11401,7 +11401,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- API Keys
|
- API Keys
|
||||||
summary: Update an API key
|
summary: Update an API key
|
||||||
description: Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11644,7 +11644,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- API Keys
|
- API Keys
|
||||||
summary: Delete an API key
|
summary: Delete an API key
|
||||||
description: Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11702,7 +11702,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- API Keys
|
- API Keys
|
||||||
summary: Get a single API key
|
summary: Get a single API key
|
||||||
description: Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11900,8 +11900,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List guardrails
|
summary: List guardrails
|
||||||
description: >-
|
description: >-
|
||||||
List all guardrails for the authenticated user. [Provisioning
|
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys)
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12057,8 +12057,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Create a guardrail
|
summary: Create a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Create a new guardrail for the authenticated user. [Provisioning
|
Create a new guardrail for the authenticated user. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -12270,7 +12270,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Get a guardrail
|
summary: Get a guardrail
|
||||||
description: Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12416,7 +12416,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Update a guardrail
|
summary: Update a guardrail
|
||||||
description: Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12631,7 +12631,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Delete a guardrail
|
summary: Delete a guardrail
|
||||||
description: Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12685,8 +12685,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List all key assignments
|
summary: List all key assignments
|
||||||
description: >-
|
description: >-
|
||||||
List all API key guardrail assignments for the authenticated user. [Provisioning
|
List all API key guardrail assignments for the authenticated user. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12784,8 +12784,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List all member assignments
|
summary: List all member assignments
|
||||||
description: >-
|
description: >-
|
||||||
List all organization member guardrail assignments for the authenticated user. [Provisioning
|
List all organization member guardrail assignments for the authenticated user. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12878,8 +12878,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List key assignments for a guardrail
|
summary: List key assignments for a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
List all API key assignments for a specific guardrail. [Provisioning
|
List all API key assignments for a specific guardrail. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12991,8 +12991,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk assign keys to a guardrail
|
summary: Bulk assign keys to a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Assign multiple API keys to a specific guardrail. [Provisioning
|
Assign multiple API keys to a specific guardrail. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13067,8 +13067,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List member assignments for a guardrail
|
summary: List member assignments for a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
List all organization member assignments for a specific guardrail. [Provisioning
|
List all organization member assignments for a specific guardrail. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13175,8 +13175,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk assign members to a guardrail
|
summary: Bulk assign members to a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Assign multiple organization members to a specific guardrail. [Provisioning
|
Assign multiple organization members to a specific guardrail. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13252,8 +13252,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk unassign keys from a guardrail
|
summary: Bulk unassign keys from a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Unassign multiple API keys from a specific guardrail. [Provisioning
|
Unassign multiple API keys from a specific guardrail. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13328,8 +13328,8 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk unassign members from a guardrail
|
summary: Bulk unassign members from a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Unassign multiple organization members from a specific guardrail. [Provisioning
|
Unassign multiple organization members from a specific guardrail. [Management
|
||||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13461,9 +13461,14 @@ paths:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Whether this is a free tier API key
|
description: Whether this is a free tier API key
|
||||||
example: false
|
example: false
|
||||||
|
is_management_key:
|
||||||
|
type: boolean
|
||||||
|
description: Whether this is a management key
|
||||||
|
example: false
|
||||||
is_provisioning_key:
|
is_provisioning_key:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Whether this is a provisioning key
|
description: Whether this is a management key
|
||||||
|
deprecated: true
|
||||||
example: false
|
example: false
|
||||||
limit_remaining:
|
limit_remaining:
|
||||||
type: number
|
type: number
|
||||||
@@ -13522,6 +13527,7 @@ paths:
|
|||||||
- byok_usage_weekly
|
- byok_usage_weekly
|
||||||
- byok_usage_monthly
|
- byok_usage_monthly
|
||||||
- is_free_tier
|
- is_free_tier
|
||||||
|
- is_management_key
|
||||||
- is_provisioning_key
|
- is_provisioning_key
|
||||||
- limit_remaining
|
- limit_remaining
|
||||||
- limit_reset
|
- limit_reset
|
||||||
@@ -13540,6 +13546,7 @@ paths:
|
|||||||
byok_usage_weekly: 17.38
|
byok_usage_weekly: 17.38
|
||||||
byok_usage_monthly: 17.38
|
byok_usage_monthly: 17.38
|
||||||
is_free_tier: false
|
is_free_tier: false
|
||||||
|
is_management_key: false
|
||||||
is_provisioning_key: false
|
is_provisioning_key: false
|
||||||
limit_remaining: 74.5
|
limit_remaining: 74.5
|
||||||
limit_reset: monthly
|
limit_reset: monthly
|
||||||
@@ -13564,6 +13571,7 @@ paths:
|
|||||||
byok_usage_weekly: 17.38
|
byok_usage_weekly: 17.38
|
||||||
byok_usage_monthly: 17.38
|
byok_usage_monthly: 17.38
|
||||||
is_free_tier: false
|
is_free_tier: false
|
||||||
|
is_management_key: false
|
||||||
is_provisioning_key: false
|
is_provisioning_key: false
|
||||||
limit_remaining: 74.5
|
limit_remaining: 74.5
|
||||||
limit_reset: monthly
|
limit_reset: monthly
|
||||||
|
|||||||
+33
-25
@@ -7316,7 +7316,7 @@ components:
|
|||||||
description: Error data for ForbiddenResponse
|
description: Error data for ForbiddenResponse
|
||||||
example:
|
example:
|
||||||
code: 403
|
code: 403
|
||||||
message: Only provisioning keys can perform this operation
|
message: Only management keys can perform this operation
|
||||||
ForbiddenResponse:
|
ForbiddenResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -7331,7 +7331,7 @@ components:
|
|||||||
example:
|
example:
|
||||||
error:
|
error:
|
||||||
code: 403
|
code: 403
|
||||||
message: Only provisioning keys can perform this operation
|
message: Only management keys can perform this operation
|
||||||
CreateChargeRequest:
|
CreateChargeRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -9836,7 +9836,7 @@ paths:
|
|||||||
operationId: getUserActivity
|
operationId: getUserActivity
|
||||||
summary: Get user activity grouped by endpoint
|
summary: Get user activity grouped by endpoint
|
||||||
description: >-
|
description: >-
|
||||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -9887,7 +9887,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||||
'403':
|
'403':
|
||||||
description: Forbidden - Only provisioning keys can fetch activity
|
description: Forbidden - Only management keys can fetch activity
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@@ -9909,7 +9909,7 @@ paths:
|
|||||||
summary: Get remaining credits
|
summary: Get remaining credits
|
||||||
operationId: getCredits
|
operationId: getCredits
|
||||||
description: >-
|
description: >-
|
||||||
Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Returns the total credits purchased and used
|
description: Returns the total credits purchased and used
|
||||||
@@ -9949,7 +9949,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||||
'403':
|
'403':
|
||||||
description: Forbidden - Only provisioning keys can fetch credits
|
description: Forbidden - Only management keys can fetch credits
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@@ -10992,7 +10992,7 @@ paths:
|
|||||||
- API Keys
|
- API Keys
|
||||||
summary: List API keys
|
summary: List API keys
|
||||||
description: >-
|
description: >-
|
||||||
List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11192,7 +11192,7 @@ paths:
|
|||||||
- API Keys
|
- API Keys
|
||||||
summary: Create a new API key
|
summary: Create a new API key
|
||||||
description: >-
|
description: >-
|
||||||
Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -11436,7 +11436,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- API Keys
|
- API Keys
|
||||||
summary: Update an API key
|
summary: Update an API key
|
||||||
description: Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11679,7 +11679,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- API Keys
|
- API Keys
|
||||||
summary: Delete an API key
|
summary: Delete an API key
|
||||||
description: Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11737,7 +11737,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- API Keys
|
- API Keys
|
||||||
summary: Get a single API key
|
summary: Get a single API key
|
||||||
description: Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -11938,7 +11938,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List guardrails
|
summary: List guardrails
|
||||||
description: >-
|
description: >-
|
||||||
List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12095,7 +12095,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Create a guardrail
|
summary: Create a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -12312,7 +12312,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Get a guardrail
|
summary: Get a guardrail
|
||||||
description: Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12459,7 +12459,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Update a guardrail
|
summary: Update a guardrail
|
||||||
description: Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12676,7 +12676,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Delete a guardrail
|
summary: Delete a guardrail
|
||||||
description: Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12733,7 +12733,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List all key assignments
|
summary: List all key assignments
|
||||||
description: >-
|
description: >-
|
||||||
List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12834,7 +12834,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List all member assignments
|
summary: List all member assignments
|
||||||
description: >-
|
description: >-
|
||||||
List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -12930,7 +12930,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List key assignments for a guardrail
|
summary: List key assignments for a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13042,7 +13042,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk assign keys to a guardrail
|
summary: Bulk assign keys to a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13120,7 +13120,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: List member assignments for a guardrail
|
summary: List member assignments for a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13227,7 +13227,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk assign members to a guardrail
|
summary: Bulk assign members to a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13306,7 +13306,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk unassign keys from a guardrail
|
summary: Bulk unassign keys from a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13384,7 +13384,7 @@ paths:
|
|||||||
- Guardrails
|
- Guardrails
|
||||||
summary: Bulk unassign members from a guardrail
|
summary: Bulk unassign members from a guardrail
|
||||||
description: >-
|
description: >-
|
||||||
Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -13519,9 +13519,14 @@ paths:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Whether this is a free tier API key
|
description: Whether this is a free tier API key
|
||||||
example: false
|
example: false
|
||||||
|
is_management_key:
|
||||||
|
type: boolean
|
||||||
|
description: Whether this is a management key
|
||||||
|
example: false
|
||||||
is_provisioning_key:
|
is_provisioning_key:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Whether this is a provisioning key
|
description: Whether this is a management key
|
||||||
|
deprecated: true
|
||||||
example: false
|
example: false
|
||||||
limit_remaining:
|
limit_remaining:
|
||||||
type: number
|
type: number
|
||||||
@@ -13580,6 +13585,7 @@ paths:
|
|||||||
- byok_usage_weekly
|
- byok_usage_weekly
|
||||||
- byok_usage_monthly
|
- byok_usage_monthly
|
||||||
- is_free_tier
|
- is_free_tier
|
||||||
|
- is_management_key
|
||||||
- is_provisioning_key
|
- is_provisioning_key
|
||||||
- limit_remaining
|
- limit_remaining
|
||||||
- limit_reset
|
- limit_reset
|
||||||
@@ -13598,6 +13604,7 @@ paths:
|
|||||||
byok_usage_weekly: 17.38
|
byok_usage_weekly: 17.38
|
||||||
byok_usage_monthly: 17.38
|
byok_usage_monthly: 17.38
|
||||||
is_free_tier: false
|
is_free_tier: false
|
||||||
|
is_management_key: false
|
||||||
is_provisioning_key: false
|
is_provisioning_key: false
|
||||||
limit_remaining: 74.5
|
limit_remaining: 74.5
|
||||||
limit_reset: monthly
|
limit_reset: monthly
|
||||||
@@ -13622,6 +13629,7 @@ paths:
|
|||||||
byok_usage_weekly: 17.38
|
byok_usage_weekly: 17.38
|
||||||
byok_usage_monthly: 17.38
|
byok_usage_monthly: 17.38
|
||||||
is_free_tier: false
|
is_free_tier: false
|
||||||
|
is_management_key: false
|
||||||
is_provisioning_key: false
|
is_provisioning_key: false
|
||||||
limit_remaining: 74.5
|
limit_remaining: 74.5
|
||||||
limit_reset: monthly
|
limit_reset: monthly
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ sources:
|
|||||||
- latest
|
- latest
|
||||||
OpenRouter API:
|
OpenRouter API:
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
|
sourceRevisionDigest: sha256:2dbe784978f60cb53a0d081e1b5f4cbb42ca86b1ff8f4361869fa78c42e042ee
|
||||||
sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
|
sourceBlobDigest: sha256:851aadf3180735f9dbfdb2904011de231d3805d187499c24a450a224cacf1ed2
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- main
|
||||||
@@ -18,10 +18,10 @@ targets:
|
|||||||
open-router:
|
open-router:
|
||||||
source: OpenRouter API
|
source: OpenRouter API
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
|
sourceRevisionDigest: sha256:2dbe784978f60cb53a0d081e1b5f4cbb42ca86b1ff8f4361869fa78c42e042ee
|
||||||
sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
|
sourceBlobDigest: sha256:851aadf3180735f9dbfdb2904011de231d3805d187499c24a450a224cacf1ed2
|
||||||
codeSamplesNamespace: open-router-python-code-samples
|
codeSamplesNamespace: open-router-python-code-samples
|
||||||
codeSamplesRevisionDigest: sha256:e44fdec134bc5f249b3e785da067ea31d1bba8f9891bca0f6c19d7ace670ab11
|
codeSamplesRevisionDigest: sha256:cf9f3fd9983864e3c5dd5bc3fa9198efc9493f4fbc671130e8f07e87722c43dd
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: 1.666.0
|
speakeasyVersion: 1.666.0
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ Forbidden - Authentication successful but insufficient permissions
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||||
| `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {<br/>"code": 403,<br/>"message": "Only provisioning keys can perform this operation"<br/>} |
|
| `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {<br/>"code": 403,<br/>"message": "Only management keys can perform this operation"<br/>} |
|
||||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||||
@@ -18,7 +18,8 @@ Current API key information
|
|||||||
| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
|
| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
|
||||||
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
|
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
|
||||||
| `is_free_tier` | *bool* | :heavy_check_mark: | Whether this is a free tier API key | false |
|
| `is_free_tier` | *bool* | :heavy_check_mark: | Whether this is a free tier API key | false |
|
||||||
| `is_provisioning_key` | *bool* | :heavy_check_mark: | Whether this is a provisioning key | false |
|
| `is_management_key` | *bool* | :heavy_check_mark: | Whether this is a management key | false |
|
||||||
|
| ~~`is_provisioning_key`~~ | *bool* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Whether this is a management key | false |
|
||||||
| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
|
| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
|
||||||
| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
|
| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
|
||||||
| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
|
| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ API key details
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {<br/>"label": "sk-or-v1-au7...890",<br/>"limit": 100,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"is_free_tier": false,<br/>"is_provisioning_key": false,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"rate_limit": {<br/>"requests": 1000,<br/>"interval": "1h",<br/>"note": "This field is deprecated and safe to ignore."<br/>}<br/>} |
|
| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {<br/>"label": "sk-or-v1-au7...890",<br/>"limit": 100,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"is_free_tier": false,<br/>"is_management_key": false,<br/>"is_provisioning_key": false,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"rate_limit": {<br/>"requests": 1000,<br/>"interval": "1h",<br/>"note": "This field is deprecated and safe to ignore."<br/>}<br/>} |
|
||||||
@@ -11,7 +11,7 @@ Analytics and usage endpoints
|
|||||||
|
|
||||||
## get_user_activity
|
## get_user_activity
|
||||||
|
|
||||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ API key management endpoints
|
|||||||
|
|
||||||
## list
|
## list
|
||||||
|
|
||||||
List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## create
|
## create
|
||||||
|
|
||||||
Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## update
|
## update
|
||||||
|
|
||||||
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## delete
|
## delete
|
||||||
|
|
||||||
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## get
|
## get
|
||||||
|
|
||||||
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Credit management endpoints
|
|||||||
|
|
||||||
## get_credits
|
## get_credits
|
||||||
|
|
||||||
Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Guardrails endpoints
|
|||||||
|
|
||||||
## list
|
## list
|
||||||
|
|
||||||
List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## create
|
## create
|
||||||
|
|
||||||
Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## get
|
## get
|
||||||
|
|
||||||
Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## update
|
## update
|
||||||
|
|
||||||
Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## delete
|
## delete
|
||||||
|
|
||||||
Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## list_key_assignments
|
## list_key_assignments
|
||||||
|
|
||||||
List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## list_member_assignments
|
## list_member_assignments
|
||||||
|
|
||||||
List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## list_guardrail_key_assignments
|
## list_guardrail_key_assignments
|
||||||
|
|
||||||
List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## bulk_assign_keys
|
## bulk_assign_keys
|
||||||
|
|
||||||
Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -466,7 +466,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## list_guardrail_member_assignments
|
## list_guardrail_member_assignments
|
||||||
|
|
||||||
List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -515,7 +515,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## bulk_assign_members
|
## bulk_assign_members
|
||||||
|
|
||||||
Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -567,7 +567,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## bulk_unassign_keys
|
## bulk_unassign_keys
|
||||||
|
|
||||||
Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
@@ -618,7 +618,7 @@ with OpenRouter(
|
|||||||
|
|
||||||
## bulk_unassign_members
|
## bulk_unassign_members
|
||||||
|
|
||||||
Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "openrouter"
|
name = "openrouter"
|
||||||
version = "0.5.1"
|
version = "0.6.0"
|
||||||
description = "Official Python Client SDK for OpenRouter."
|
description = "Official Python Client SDK for OpenRouter."
|
||||||
authors = [{ name = "OpenRouter" },]
|
authors = [{ name = "OpenRouter" },]
|
||||||
readme = "README-PYPI.md"
|
readme = "README-PYPI.md"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
|
|
||||||
__title__: str = "openrouter"
|
__title__: str = "openrouter"
|
||||||
__version__: str = "0.5.1"
|
__version__: str = "0.6.0"
|
||||||
__openapi_doc_version__: str = "1.0.0"
|
__openapi_doc_version__: str = "1.0.0"
|
||||||
__gen_version__: str = "2.768.0"
|
__gen_version__: str = "2.768.0"
|
||||||
__user_agent__: str = "speakeasy-sdk/python 0.5.1 2.768.0 1.0.0 openrouter"
|
__user_agent__: str = "speakeasy-sdk/python 0.6.0 2.768.0 1.0.0 openrouter"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if __package__ is not None:
|
if __package__ is not None:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class Analytics(BaseSDK):
|
|||||||
) -> operations.GetUserActivityResponse:
|
) -> operations.GetUserActivityResponse:
|
||||||
r"""Get user activity grouped by endpoint
|
r"""Get user activity grouped by endpoint
|
||||||
|
|
||||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -147,7 +147,7 @@ class Analytics(BaseSDK):
|
|||||||
) -> operations.GetUserActivityResponse:
|
) -> operations.GetUserActivityResponse:
|
||||||
r"""Get user activity grouped by endpoint
|
r"""Get user activity grouped by endpoint
|
||||||
|
|
||||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
|
|||||||
+10
-10
@@ -27,7 +27,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.ListResponse:
|
) -> operations.ListResponse:
|
||||||
r"""List API keys
|
r"""List API keys
|
||||||
|
|
||||||
List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -147,7 +147,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.ListResponse:
|
) -> operations.ListResponse:
|
||||||
r"""List API keys
|
r"""List API keys
|
||||||
|
|
||||||
List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -270,7 +270,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.CreateKeysResponse:
|
) -> operations.CreateKeysResponse:
|
||||||
r"""Create a new API key
|
r"""Create a new API key
|
||||||
|
|
||||||
Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param name: Name for the new API key
|
:param name: Name for the new API key
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -413,7 +413,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.CreateKeysResponse:
|
) -> operations.CreateKeysResponse:
|
||||||
r"""Create a new API key
|
r"""Create a new API key
|
||||||
|
|
||||||
Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param name: Name for the new API key
|
:param name: Name for the new API key
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -557,7 +557,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.UpdateKeysResponse:
|
) -> operations.UpdateKeysResponse:
|
||||||
r"""Update an API key
|
r"""Update an API key
|
||||||
|
|
||||||
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to update
|
:param hash: The hash identifier of the API key to update
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -708,7 +708,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.UpdateKeysResponse:
|
) -> operations.UpdateKeysResponse:
|
||||||
r"""Update an API key
|
r"""Update an API key
|
||||||
|
|
||||||
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to update
|
:param hash: The hash identifier of the API key to update
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -854,7 +854,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.DeleteKeysResponse:
|
) -> operations.DeleteKeysResponse:
|
||||||
r"""Delete an API key
|
r"""Delete an API key
|
||||||
|
|
||||||
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to delete
|
:param hash: The hash identifier of the API key to delete
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -976,7 +976,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.DeleteKeysResponse:
|
) -> operations.DeleteKeysResponse:
|
||||||
r"""Delete an API key
|
r"""Delete an API key
|
||||||
|
|
||||||
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to delete
|
:param hash: The hash identifier of the API key to delete
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -1098,7 +1098,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.GetKeyResponse:
|
) -> operations.GetKeyResponse:
|
||||||
r"""Get a single API key
|
r"""Get a single API key
|
||||||
|
|
||||||
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to retrieve
|
:param hash: The hash identifier of the API key to retrieve
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -1220,7 +1220,7 @@ class APIKeys(BaseSDK):
|
|||||||
) -> operations.GetKeyResponse:
|
) -> operations.GetKeyResponse:
|
||||||
r"""Get a single API key
|
r"""Get a single API key
|
||||||
|
|
||||||
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to retrieve
|
:param hash: The hash identifier of the API key to retrieve
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class Credits(BaseSDK):
|
|||||||
) -> operations.GetCreditsResponse:
|
) -> operations.GetCreditsResponse:
|
||||||
r"""Get remaining credits
|
r"""Get remaining credits
|
||||||
|
|
||||||
Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -138,7 +138,7 @@ class Credits(BaseSDK):
|
|||||||
) -> operations.GetCreditsResponse:
|
) -> operations.GetCreditsResponse:
|
||||||
r"""Get remaining credits
|
r"""Get remaining credits
|
||||||
|
|
||||||
Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListGuardrailsResponse:
|
) -> operations.ListGuardrailsResponse:
|
||||||
r"""List guardrails
|
r"""List guardrails
|
||||||
|
|
||||||
List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -141,7 +141,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListGuardrailsResponse:
|
) -> operations.ListGuardrailsResponse:
|
||||||
r"""List guardrails
|
r"""List guardrails
|
||||||
|
|
||||||
List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -263,7 +263,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.CreateGuardrailResponse:
|
) -> operations.CreateGuardrailResponse:
|
||||||
r"""Create a guardrail
|
r"""Create a guardrail
|
||||||
|
|
||||||
Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param name: Name for the new guardrail
|
:param name: Name for the new guardrail
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -409,7 +409,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.CreateGuardrailResponse:
|
) -> operations.CreateGuardrailResponse:
|
||||||
r"""Create a guardrail
|
r"""Create a guardrail
|
||||||
|
|
||||||
Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param name: Name for the new guardrail
|
:param name: Name for the new guardrail
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -547,7 +547,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.GetGuardrailResponse:
|
) -> operations.GetGuardrailResponse:
|
||||||
r"""Get a guardrail
|
r"""Get a guardrail
|
||||||
|
|
||||||
Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail to retrieve
|
:param id: The unique identifier of the guardrail to retrieve
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -664,7 +664,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.GetGuardrailResponse:
|
) -> operations.GetGuardrailResponse:
|
||||||
r"""Get a guardrail
|
r"""Get a guardrail
|
||||||
|
|
||||||
Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail to retrieve
|
:param id: The unique identifier of the guardrail to retrieve
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -790,7 +790,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.UpdateGuardrailResponse:
|
) -> operations.UpdateGuardrailResponse:
|
||||||
r"""Update a guardrail
|
r"""Update a guardrail
|
||||||
|
|
||||||
Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail to update
|
:param id: The unique identifier of the guardrail to update
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -944,7 +944,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.UpdateGuardrailResponse:
|
) -> operations.UpdateGuardrailResponse:
|
||||||
r"""Update a guardrail
|
r"""Update a guardrail
|
||||||
|
|
||||||
Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail to update
|
:param id: The unique identifier of the guardrail to update
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -1089,7 +1089,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.DeleteGuardrailResponse:
|
) -> operations.DeleteGuardrailResponse:
|
||||||
r"""Delete a guardrail
|
r"""Delete a guardrail
|
||||||
|
|
||||||
Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail to delete
|
:param id: The unique identifier of the guardrail to delete
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -1206,7 +1206,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.DeleteGuardrailResponse:
|
) -> operations.DeleteGuardrailResponse:
|
||||||
r"""Delete a guardrail
|
r"""Delete a guardrail
|
||||||
|
|
||||||
Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail to delete
|
:param id: The unique identifier of the guardrail to delete
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -1324,7 +1324,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListKeyAssignmentsResponse:
|
) -> operations.ListKeyAssignmentsResponse:
|
||||||
r"""List all key assignments
|
r"""List all key assignments
|
||||||
|
|
||||||
List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -1441,7 +1441,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListKeyAssignmentsResponse:
|
) -> operations.ListKeyAssignmentsResponse:
|
||||||
r"""List all key assignments
|
r"""List all key assignments
|
||||||
|
|
||||||
List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -1558,7 +1558,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListMemberAssignmentsResponse:
|
) -> operations.ListMemberAssignmentsResponse:
|
||||||
r"""List all member assignments
|
r"""List all member assignments
|
||||||
|
|
||||||
List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -1675,7 +1675,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListMemberAssignmentsResponse:
|
) -> operations.ListMemberAssignmentsResponse:
|
||||||
r"""List all member assignments
|
r"""List all member assignments
|
||||||
|
|
||||||
List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
This is used to track API usage per application.
|
This is used to track API usage per application.
|
||||||
@@ -1793,7 +1793,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListGuardrailKeyAssignmentsResponse:
|
) -> operations.ListGuardrailKeyAssignmentsResponse:
|
||||||
r"""List key assignments for a guardrail
|
r"""List key assignments for a guardrail
|
||||||
|
|
||||||
List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -1918,7 +1918,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListGuardrailKeyAssignmentsResponse:
|
) -> operations.ListGuardrailKeyAssignmentsResponse:
|
||||||
r"""List key assignments for a guardrail
|
r"""List key assignments for a guardrail
|
||||||
|
|
||||||
List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -2042,7 +2042,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkAssignKeysToGuardrailResponse:
|
) -> operations.BulkAssignKeysToGuardrailResponse:
|
||||||
r"""Bulk assign keys to a guardrail
|
r"""Bulk assign keys to a guardrail
|
||||||
|
|
||||||
Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param key_hashes: Array of API key hashes to assign to the guardrail
|
:param key_hashes: Array of API key hashes to assign to the guardrail
|
||||||
@@ -2178,7 +2178,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkAssignKeysToGuardrailResponse:
|
) -> operations.BulkAssignKeysToGuardrailResponse:
|
||||||
r"""Bulk assign keys to a guardrail
|
r"""Bulk assign keys to a guardrail
|
||||||
|
|
||||||
Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param key_hashes: Array of API key hashes to assign to the guardrail
|
:param key_hashes: Array of API key hashes to assign to the guardrail
|
||||||
@@ -2315,7 +2315,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListGuardrailMemberAssignmentsResponse:
|
) -> operations.ListGuardrailMemberAssignmentsResponse:
|
||||||
r"""List member assignments for a guardrail
|
r"""List member assignments for a guardrail
|
||||||
|
|
||||||
List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -2440,7 +2440,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.ListGuardrailMemberAssignmentsResponse:
|
) -> operations.ListGuardrailMemberAssignmentsResponse:
|
||||||
r"""List member assignments for a guardrail
|
r"""List member assignments for a guardrail
|
||||||
|
|
||||||
List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||||||
@@ -2564,7 +2564,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkAssignMembersToGuardrailResponse:
|
) -> operations.BulkAssignMembersToGuardrailResponse:
|
||||||
r"""Bulk assign members to a guardrail
|
r"""Bulk assign members to a guardrail
|
||||||
|
|
||||||
Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param member_user_ids: Array of member user IDs to assign to the guardrail
|
:param member_user_ids: Array of member user IDs to assign to the guardrail
|
||||||
@@ -2700,7 +2700,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkAssignMembersToGuardrailResponse:
|
) -> operations.BulkAssignMembersToGuardrailResponse:
|
||||||
r"""Bulk assign members to a guardrail
|
r"""Bulk assign members to a guardrail
|
||||||
|
|
||||||
Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param member_user_ids: Array of member user IDs to assign to the guardrail
|
:param member_user_ids: Array of member user IDs to assign to the guardrail
|
||||||
@@ -2836,7 +2836,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkUnassignKeysFromGuardrailResponse:
|
) -> operations.BulkUnassignKeysFromGuardrailResponse:
|
||||||
r"""Bulk unassign keys from a guardrail
|
r"""Bulk unassign keys from a guardrail
|
||||||
|
|
||||||
Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param key_hashes: Array of API key hashes to unassign from the guardrail
|
:param key_hashes: Array of API key hashes to unassign from the guardrail
|
||||||
@@ -2972,7 +2972,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkUnassignKeysFromGuardrailResponse:
|
) -> operations.BulkUnassignKeysFromGuardrailResponse:
|
||||||
r"""Bulk unassign keys from a guardrail
|
r"""Bulk unassign keys from a guardrail
|
||||||
|
|
||||||
Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param key_hashes: Array of API key hashes to unassign from the guardrail
|
:param key_hashes: Array of API key hashes to unassign from the guardrail
|
||||||
@@ -3108,7 +3108,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkUnassignMembersFromGuardrailResponse:
|
) -> operations.BulkUnassignMembersFromGuardrailResponse:
|
||||||
r"""Bulk unassign members from a guardrail
|
r"""Bulk unassign members from a guardrail
|
||||||
|
|
||||||
Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param member_user_ids: Array of member user IDs to unassign from the guardrail
|
:param member_user_ids: Array of member user IDs to unassign from the guardrail
|
||||||
@@ -3244,7 +3244,7 @@ class Guardrails(BaseSDK):
|
|||||||
) -> operations.BulkUnassignMembersFromGuardrailResponse:
|
) -> operations.BulkUnassignMembersFromGuardrailResponse:
|
||||||
r"""Bulk unassign members from a guardrail
|
r"""Bulk unassign members from a guardrail
|
||||||
|
|
||||||
Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||||
|
|
||||||
:param id: The unique identifier of the guardrail
|
:param id: The unique identifier of the guardrail
|
||||||
:param member_user_ids: Array of member user IDs to unassign from the guardrail
|
:param member_user_ids: Array of member user IDs to unassign from the guardrail
|
||||||
|
|||||||
@@ -137,8 +137,10 @@ class GetCurrentKeyDataTypedDict(TypedDict):
|
|||||||
r"""External BYOK usage (in USD) for current UTC month"""
|
r"""External BYOK usage (in USD) for current UTC month"""
|
||||||
is_free_tier: bool
|
is_free_tier: bool
|
||||||
r"""Whether this is a free tier API key"""
|
r"""Whether this is a free tier API key"""
|
||||||
|
is_management_key: bool
|
||||||
|
r"""Whether this is a management key"""
|
||||||
is_provisioning_key: bool
|
is_provisioning_key: bool
|
||||||
r"""Whether this is a provisioning key"""
|
r"""Whether this is a management key"""
|
||||||
limit_remaining: Nullable[float]
|
limit_remaining: Nullable[float]
|
||||||
r"""Remaining spending limit in USD"""
|
r"""Remaining spending limit in USD"""
|
||||||
limit_reset: Nullable[str]
|
limit_reset: Nullable[str]
|
||||||
@@ -187,8 +189,16 @@ class GetCurrentKeyData(BaseModel):
|
|||||||
is_free_tier: bool
|
is_free_tier: bool
|
||||||
r"""Whether this is a free tier API key"""
|
r"""Whether this is a free tier API key"""
|
||||||
|
|
||||||
is_provisioning_key: bool
|
is_management_key: bool
|
||||||
r"""Whether this is a provisioning key"""
|
r"""Whether this is a management key"""
|
||||||
|
|
||||||
|
is_provisioning_key: Annotated[
|
||||||
|
bool,
|
||||||
|
pydantic.Field(
|
||||||
|
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
||||||
|
),
|
||||||
|
]
|
||||||
|
r"""Whether this is a management key"""
|
||||||
|
|
||||||
limit_remaining: Nullable[float]
|
limit_remaining: Nullable[float]
|
||||||
r"""Remaining spending limit in USD"""
|
r"""Remaining spending limit in USD"""
|
||||||
|
|||||||
Reference in New Issue
Block a user