Compare commits

..
1 Commits
Author SHA1 Message Date
OpenRouter Team 9193488c2b Commits included in this export:
- 6f4fff535fbf4274255c255ae23620b8e00e614f
  - ef358e96cb01e469b77d44683603a602b0813116
  - e6299b4ebfe5c2eed6c598771f0fd99f84555401
  - 24d3f0ee1c2aa19a62f7902836034080b9246813
  - 68922847c2969b773887310eb7aa9a814e199c5a
  - 729ee2338c39df22461526153e7f4ba868fd498e
  - e1074ff86fccf5e48406b7595298873106d3cc5a
  - 123bbdaf841d299162a82ee2573adfbb70a45b8f
  - ac457b8a8dad98fdf5ddcae8dd4711361cea3084
  - ea825199f4c59dd68fec01cf8d18a582963c9f25
  - 4d48e4f6bb936e785787314a965298da6b78fea0
  - 718729a573ee98893a4408d5a52ab4686661fe54
  - b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: 6f4fff535fbf4274255c255ae23620b8e00e614f
2026-02-05 21:29:54 +00:00
57 changed files with 468 additions and 918 deletions
+11 -16
View File
@@ -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: 44cf69670d08f875912803fcbf819e62 docChecksum: 86bc0c01844e23d7e1921008d13372b9
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.7.3 releaseVersion: 0.5.1
configChecksum: b2d1a05e03508d9e74db24120e9e88e2 configChecksum: 7f34271a911f5490f6f17a4e27f8ef7f
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
@@ -14,7 +14,6 @@ features:
python: python:
acceptHeaders: 3.0.0 acceptHeaders: 3.0.0
additionalDependencies: 1.0.0 additionalDependencies: 1.0.0
additionalProperties: 1.0.1
constsAndDefaults: 1.0.5 constsAndDefaults: 1.0.5
core: 5.23.13 core: 5.23.13
defaultEnabledRetries: 0.2.0 defaultEnabledRetries: 0.2.0
@@ -425,11 +424,10 @@ generatedFiles:
- docs/components/schema17responsehealing.md - docs/components/schema17responsehealing.md
- docs/components/schema17web.md - docs/components/schema17web.md
- docs/components/schema19.md - docs/components/schema19.md
- docs/components/schema20.md - docs/components/schema19reasoningencrypted.md
- docs/components/schema20reasoningencrypted.md - docs/components/schema19reasoningsummary.md
- docs/components/schema20reasoningsummary.md - docs/components/schema19reasoningtext.md
- docs/components/schema20reasoningtext.md - docs/components/schema21.md
- docs/components/schema22.md
- docs/components/schema3.md - docs/components/schema3.md
- docs/components/schema5.md - docs/components/schema5.md
- docs/components/schema5enum.md - docs/components/schema5enum.md
@@ -449,7 +447,6 @@ generatedFiles:
- docs/components/toolresponsemessagecontent.md - docs/components/toolresponsemessagecontent.md
- docs/components/toomanyrequestsresponseerrordata.md - docs/components/toomanyrequestsresponseerrordata.md
- docs/components/topproviderinfo.md - docs/components/topproviderinfo.md
- docs/components/trace.md
- docs/components/truncation.md - docs/components/truncation.md
- docs/components/ttl.md - docs/components/ttl.md
- docs/components/type.md - docs/components/type.md
@@ -666,7 +663,6 @@ generatedFiles:
- docs/operations/updatekeysrequestbody.md - docs/operations/updatekeysrequestbody.md
- docs/operations/updatekeysresponse.md - docs/operations/updatekeysresponse.md
- docs/operations/usage.md - docs/operations/usage.md
- docs/operations/usagelimittype.md
- docs/operations/web3data.md - docs/operations/web3data.md
- docs/sdks/analytics/README.md - docs/sdks/analytics/README.md
- docs/sdks/apikeys/README.md - docs/sdks/apikeys/README.md
@@ -699,7 +695,6 @@ generatedFiles:
- src/openrouter/components/_schema14.py - src/openrouter/components/_schema14.py
- src/openrouter/components/_schema17.py - src/openrouter/components/_schema17.py
- src/openrouter/components/_schema19.py - src/openrouter/components/_schema19.py
- src/openrouter/components/_schema20.py
- src/openrouter/components/_schema5.py - src/openrouter/components/_schema5.py
- src/openrouter/components/activityitem.py - src/openrouter/components/activityitem.py
- src/openrouter/components/assistantmessage.py - src/openrouter/components/assistantmessage.py
@@ -992,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 management keys can perform this operation"}} application/json: {"error": {"code": 403, "message": "Only provisioning 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:
@@ -1003,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 management keys can perform this operation"}} application/json: {"error": {"code": 403, "message": "Only provisioning 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:
@@ -1237,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_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."}}} 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."}}}
"401": "401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500": "500":
@@ -1252,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 management keys can perform this operation"}} application/json: {"error": {"code": 403, "message": "Only provisioning 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
View File
@@ -31,7 +31,7 @@ generation:
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.7.3 version: 0.5.1
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
+54 -140
View File
@@ -3574,7 +3574,6 @@ components:
- Inceptron - Inceptron
- InferenceNet - InferenceNet
- Infermatic - Infermatic
- Io Net
- Inflection - Inflection
- Liquid - Liquid
- Mara - Mara
@@ -4095,25 +4094,6 @@ components:
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for
observability. If provided in both the request body and the x-session-id header, the body value takes observability. If provided in both the request body and the x-session-id header, the body value takes
precedence. Maximum of 128 characters. precedence. Maximum of 128 characters.
trace:
type: object
properties:
trace_id:
type: string
trace_name:
type: string
span_name:
type: string
generation_name:
type: string
parent_span_id:
type: string
additionalProperties:
nullable: true
description: >-
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name,
parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured
broadcast destinations.
description: Request schema for Responses endpoint description: Request schema for Responses endpoint
example: example:
model: anthropic/claude-4.5-sonnet-20250929 model: anthropic/claude-4.5-sonnet-20250929
@@ -7211,25 +7191,6 @@ components:
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for
observability. If provided in both the request body and the x-session-id header, the body value takes observability. If provided in both the request body and the x-session-id header, the body value takes
precedence. Maximum of 128 characters. precedence. Maximum of 128 characters.
trace:
type: object
properties:
trace_id:
type: string
trace_name:
type: string
span_name:
type: string
generation_name:
type: string
parent_span_id:
type: string
additionalProperties:
nullable: true
description: >-
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name,
parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured
broadcast destinations.
models: models:
type: array type: array
items: items:
@@ -7337,7 +7298,7 @@ components:
description: Error data for ForbiddenResponse description: Error data for ForbiddenResponse
example: example:
code: 403 code: 403
message: Only management keys can perform this operation message: Only provisioning keys can perform this operation
ForbiddenResponse: ForbiddenResponse:
type: object type: object
properties: properties:
@@ -7352,7 +7313,7 @@ components:
example: example:
error: error:
code: 403 code: 403
message: Only management keys can perform this operation message: Only provisioning keys can perform this operation
CreateChargeRequest: CreateChargeRequest:
type: object type: object
properties: properties:
@@ -7546,6 +7507,7 @@ components:
required: required:
- prompt - prompt
- completion - completion
additionalProperties: false
description: Pricing information for the model description: Pricing information for the model
example: example:
prompt: '0.00003' prompt: '0.00003'
@@ -8053,6 +8015,7 @@ components:
required: required:
- prompt - prompt
- completion - completion
additionalProperties: false
provider_name: provider_name:
$ref: '#/components/schemas/ProviderName' $ref: '#/components/schemas/ProviderName'
tag: tag:
@@ -8387,7 +8350,6 @@ components:
- Inceptron - Inceptron
- InferenceNet - InferenceNet
- Infermatic - Infermatic
- Io Net
- Inflection - Inflection
- Liquid - Liquid
- Mara - Mara
@@ -8570,20 +8532,6 @@ components:
type: string type: string
maxLength: 128 maxLength: 128
__schema19: __schema19:
type: object
properties:
trace_id:
type: string
trace_name:
type: string
span_name:
type: string
generation_name:
type: string
parent_span_id:
type: string
additionalProperties: {}
__schema20:
oneOf: oneOf:
- type: object - type: object
properties: properties:
@@ -8593,9 +8541,9 @@ components:
summary: summary:
type: string type: string
id: id:
$ref: '#/components/schemas/__schema21' $ref: '#/components/schemas/__schema20'
format: format:
$ref: '#/components/schemas/__schema22' $ref: '#/components/schemas/__schema21'
index: index:
$ref: '#/components/schemas/__schema11' $ref: '#/components/schemas/__schema11'
required: required:
@@ -8609,9 +8557,9 @@ components:
data: data:
type: string type: string
id: id:
$ref: '#/components/schemas/__schema21' $ref: '#/components/schemas/__schema20'
format: format:
$ref: '#/components/schemas/__schema22' $ref: '#/components/schemas/__schema21'
index: index:
$ref: '#/components/schemas/__schema11' $ref: '#/components/schemas/__schema11'
required: required:
@@ -8631,19 +8579,19 @@ components:
- type: string - type: string
- type: 'null' - type: 'null'
id: id:
$ref: '#/components/schemas/__schema21' $ref: '#/components/schemas/__schema20'
format: format:
$ref: '#/components/schemas/__schema22' $ref: '#/components/schemas/__schema21'
index: index:
$ref: '#/components/schemas/__schema11' $ref: '#/components/schemas/__schema11'
required: required:
- type - type
type: object type: object
__schema21: __schema20:
anyOf: anyOf:
- type: string - type: string
- type: 'null' - type: 'null'
__schema22: __schema21:
anyOf: anyOf:
- type: string - type: string
enum: enum:
@@ -8654,7 +8602,7 @@ components:
- anthropic-claude-v1 - anthropic-claude-v1
- google-gemini-v1 - google-gemini-v1
- type: 'null' - type: 'null'
__schema26: __schema25:
anyOf: anyOf:
- $ref: '#/components/schemas/ChatCompletionFinishReason' - $ref: '#/components/schemas/ChatCompletionFinishReason'
- type: 'null' - type: 'null'
@@ -9030,7 +8978,7 @@ components:
reasoning_details: reasoning_details:
type: array type: array
items: items:
$ref: '#/components/schemas/__schema20' $ref: '#/components/schemas/__schema19'
images: images:
type: array type: array
items: items:
@@ -9106,8 +9054,6 @@ components:
- type: 'null' - type: 'null'
required: required:
- name - name
cache_control:
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
required: required:
- type - type
- function - function
@@ -9165,12 +9111,6 @@ components:
observability. If provided in both the request body and the x-session-id header, the body value takes observability. If provided in both the request body and the x-session-id header, the body value takes
precedence. Maximum of 128 characters. precedence. Maximum of 128 characters.
$ref: '#/components/schemas/__schema18' $ref: '#/components/schemas/__schema18'
trace:
description: >-
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name,
parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured
broadcast destinations.
$ref: '#/components/schemas/__schema19'
messages: messages:
minItems: 1 minItems: 1
type: array type: array
@@ -9301,10 +9241,6 @@ components:
minimum: 0 minimum: 0
maximum: 2 maximum: 2
- type: 'null' - type: 'null'
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
tool_choice: tool_choice:
$ref: '#/components/schemas/ToolChoiceOption' $ref: '#/components/schemas/ToolChoiceOption'
tools: tools:
@@ -9350,7 +9286,7 @@ components:
type: object type: object
properties: properties:
finish_reason: finish_reason:
$ref: '#/components/schemas/__schema26' $ref: '#/components/schemas/__schema25'
index: index:
type: number type: number
message: message:
@@ -9408,14 +9344,14 @@ components:
reasoning_details: reasoning_details:
type: array type: array
items: items:
$ref: '#/components/schemas/__schema20' $ref: '#/components/schemas/__schema19'
ChatStreamingChoice: ChatStreamingChoice:
type: object type: object
properties: properties:
delta: delta:
$ref: '#/components/schemas/ChatStreamingMessageChunk' $ref: '#/components/schemas/ChatStreamingMessageChunk'
finish_reason: finish_reason:
$ref: '#/components/schemas/__schema26' $ref: '#/components/schemas/__schema25'
index: index:
type: number type: number
logprobs: logprobs:
@@ -9886,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. [Management Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -9938,7 +9874,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/UnauthorizedResponse' $ref: '#/components/schemas/UnauthorizedResponse'
'403': '403':
description: Forbidden - Only management keys can fetch activity description: Forbidden - Only provisioning keys can fetch activity
content: content:
application/json: application/json:
schema: schema:
@@ -9957,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. [Management Get total credits purchased and used for the authenticated user. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
responses: responses:
'200': '200':
description: Returns the total credits purchased and used description: Returns the total credits purchased and used
@@ -9998,7 +9934,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/UnauthorizedResponse' $ref: '#/components/schemas/UnauthorizedResponse'
'403': '403':
description: Forbidden - Only management keys can fetch credits description: Forbidden - Only provisioning keys can fetch credits
content: content:
application/json: application/json:
schema: schema:
@@ -10622,7 +10558,6 @@ paths:
- Inceptron - Inceptron
- InferenceNet - InferenceNet
- Infermatic - Infermatic
- Io Net
- Inflection - Inflection
- Liquid - Liquid
- Mara - Mara
@@ -11022,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. [Management key](/docs/guides/overview/auth/management-api-keys) List all API keys for the authenticated user. [Provisioning
required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11223,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. [Management Create a new API key for the authenticated user. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
requestBody: requestBody:
content: content:
application/json: application/json:
@@ -11466,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11709,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11767,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11965,8 +11900,8 @@ paths:
- Guardrails - Guardrails
summary: List guardrails summary: List guardrails
description: >- description: >-
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) List all guardrails for the authenticated user. [Provisioning
required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12122,8 +12057,8 @@ paths:
- Guardrails - Guardrails
summary: Create a guardrail summary: Create a guardrail
description: >- description: >-
Create a new guardrail for the authenticated user. [Management Create a new guardrail for the authenticated user. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
requestBody: requestBody:
content: content:
application/json: application/json:
@@ -12335,7 +12270,7 @@ paths:
tags: tags:
- Guardrails - Guardrails
summary: Get a guardrail summary: Get a guardrail
description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12481,7 +12416,7 @@ paths:
tags: tags:
- Guardrails - Guardrails
summary: Update a guardrail summary: Update a guardrail
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12696,7 +12631,7 @@ paths:
tags: tags:
- Guardrails - Guardrails
summary: Delete a guardrail summary: Delete a guardrail
description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12750,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. [Management List all API key guardrail assignments for the authenticated user. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12849,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. [Management List all organization member guardrail assignments for the authenticated user. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12943,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. [Management List all API key assignments for a specific guardrail. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13056,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. [Management Assign multiple API keys to a specific guardrail. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13132,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. [Management List all organization member assignments for a specific guardrail. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13240,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. [Management Assign multiple organization members to a specific guardrail. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13317,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. [Management Unassign multiple API keys from a specific guardrail. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13393,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. [Management Unassign multiple organization members from a specific guardrail. [Provisioning
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13526,14 +13461,9 @@ 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 management key description: Whether this is a provisioning key
deprecated: true
example: false example: false
limit_remaining: limit_remaining:
type: number type: number
@@ -13592,7 +13522,6 @@ 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
@@ -13611,7 +13540,6 @@ 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
@@ -13636,7 +13564,6 @@ 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
@@ -13775,19 +13702,6 @@ paths:
nullable: true nullable: true
format: date-time format: date-time
description: Optional expiration time for the API key to be created description: Optional expiration time for the API key to be created
key_label:
type: string
maxLength: 100
description: Optional custom label for the API key. Defaults to the app name if not provided.
example: My Custom Key
usage_limit_type:
type: string
enum:
- daily
- weekly
- monthly
description: Optional credit limit reset interval. When set, the credit limit resets on this interval.
example: monthly
required: required:
- callback_url - callback_url
example: example:
+40 -121
View File
@@ -3593,7 +3593,6 @@ components:
- Inceptron - Inceptron
- InferenceNet - InferenceNet
- Infermatic - Infermatic
- Io Net
- Inflection - Inflection
- Liquid - Liquid
- Mara - Mara
@@ -4098,23 +4097,6 @@ components:
maxLength: 128 maxLength: 128
description: >- description: >-
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
trace:
type: object
properties:
trace_id:
type: string
trace_name:
type: string
span_name:
type: string
generation_name:
type: string
parent_span_id:
type: string
additionalProperties:
nullable: true
description: >-
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
description: Request schema for Responses endpoint description: Request schema for Responses endpoint
example: example:
model: anthropic/claude-4.5-sonnet-20250929 model: anthropic/claude-4.5-sonnet-20250929
@@ -7227,23 +7209,6 @@ components:
maxLength: 128 maxLength: 128
description: >- description: >-
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
trace:
type: object
properties:
trace_id:
type: string
trace_name:
type: string
span_name:
type: string
generation_name:
type: string
parent_span_id:
type: string
additionalProperties:
nullable: true
description: >-
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
models: models:
type: array type: array
items: items:
@@ -7351,7 +7316,7 @@ components:
description: Error data for ForbiddenResponse description: Error data for ForbiddenResponse
example: example:
code: 403 code: 403
message: Only management keys can perform this operation message: Only provisioning keys can perform this operation
ForbiddenResponse: ForbiddenResponse:
type: object type: object
properties: properties:
@@ -7366,7 +7331,7 @@ components:
example: example:
error: error:
code: 403 code: 403
message: Only management keys can perform this operation message: Only provisioning keys can perform this operation
CreateChargeRequest: CreateChargeRequest:
type: object type: object
properties: properties:
@@ -7552,6 +7517,7 @@ components:
required: required:
- prompt - prompt
- completion - completion
additionalProperties: false
description: Pricing information for the model description: Pricing information for the model
example: example:
prompt: '0.00003' prompt: '0.00003'
@@ -8065,6 +8031,7 @@ components:
required: required:
- prompt - prompt
- completion - completion
additionalProperties: false
provider_name: provider_name:
$ref: '#/components/schemas/ProviderName' $ref: '#/components/schemas/ProviderName'
tag: tag:
@@ -8383,7 +8350,6 @@ components:
- Inceptron - Inceptron
- InferenceNet - InferenceNet
- Infermatic - Infermatic
- Io Net
- Inflection - Inflection
- Liquid - Liquid
- Mara - Mara
@@ -8570,20 +8536,6 @@ components:
type: string type: string
maxLength: 128 maxLength: 128
__schema19: __schema19:
type: object
properties:
trace_id:
type: string
trace_name:
type: string
span_name:
type: string
generation_name:
type: string
parent_span_id:
type: string
additionalProperties: {}
__schema20:
oneOf: oneOf:
- type: object - type: object
properties: properties:
@@ -8593,9 +8545,9 @@ components:
summary: summary:
type: string type: string
id: id:
$ref: '#/components/schemas/__schema21' $ref: '#/components/schemas/__schema20'
format: format:
$ref: '#/components/schemas/__schema22' $ref: '#/components/schemas/__schema21'
index: index:
$ref: '#/components/schemas/__schema11' $ref: '#/components/schemas/__schema11'
required: required:
@@ -8609,9 +8561,9 @@ components:
data: data:
type: string type: string
id: id:
$ref: '#/components/schemas/__schema21' $ref: '#/components/schemas/__schema20'
format: format:
$ref: '#/components/schemas/__schema22' $ref: '#/components/schemas/__schema21'
index: index:
$ref: '#/components/schemas/__schema11' $ref: '#/components/schemas/__schema11'
required: required:
@@ -8631,19 +8583,19 @@ components:
- type: string - type: string
- type: 'null' - type: 'null'
id: id:
$ref: '#/components/schemas/__schema21' $ref: '#/components/schemas/__schema20'
format: format:
$ref: '#/components/schemas/__schema22' $ref: '#/components/schemas/__schema21'
index: index:
$ref: '#/components/schemas/__schema11' $ref: '#/components/schemas/__schema11'
required: required:
- type - type
type: object type: object
__schema21: __schema20:
anyOf: anyOf:
- type: string - type: string
- type: 'null' - type: 'null'
__schema22: __schema21:
anyOf: anyOf:
- type: string - type: string
enum: enum:
@@ -8655,7 +8607,7 @@ components:
- google-gemini-v1 - google-gemini-v1
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
- type: 'null' - type: 'null'
__schema26: __schema25:
anyOf: anyOf:
- $ref: '#/components/schemas/ChatCompletionFinishReason' - $ref: '#/components/schemas/ChatCompletionFinishReason'
- type: 'null' - type: 'null'
@@ -9034,7 +8986,7 @@ components:
reasoning_details: reasoning_details:
type: array type: array
items: items:
$ref: '#/components/schemas/__schema20' $ref: '#/components/schemas/__schema19'
images: images:
type: array type: array
items: items:
@@ -9110,8 +9062,6 @@ components:
- type: 'null' - type: 'null'
required: required:
- name - name
cache_control:
$ref: '#/components/schemas/ChatMessageContentItemCacheControl'
required: required:
- type - type
- function - function
@@ -9168,10 +9118,6 @@ components:
description: >- description: >-
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
$ref: '#/components/schemas/__schema18' $ref: '#/components/schemas/__schema18'
trace:
description: >-
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
$ref: '#/components/schemas/__schema19'
messages: messages:
minItems: 1 minItems: 1
type: array type: array
@@ -9303,10 +9249,6 @@ components:
minimum: 0 minimum: 0
maximum: 2 maximum: 2
- type: 'null' - type: 'null'
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
tool_choice: tool_choice:
$ref: '#/components/schemas/ToolChoiceOption' $ref: '#/components/schemas/ToolChoiceOption'
tools: tools:
@@ -9353,7 +9295,7 @@ components:
type: object type: object
properties: properties:
finish_reason: finish_reason:
$ref: '#/components/schemas/__schema26' $ref: '#/components/schemas/__schema25'
index: index:
type: number type: number
message: message:
@@ -9411,14 +9353,14 @@ components:
reasoning_details: reasoning_details:
type: array type: array
items: items:
$ref: '#/components/schemas/__schema20' $ref: '#/components/schemas/__schema19'
ChatStreamingChoice: ChatStreamingChoice:
type: object type: object
properties: properties:
delta: delta:
$ref: '#/components/schemas/ChatStreamingMessageChunk' $ref: '#/components/schemas/ChatStreamingMessageChunk'
finish_reason: finish_reason:
$ref: '#/components/schemas/__schema26' $ref: '#/components/schemas/__schema25'
index: index:
type: number type: number
logprobs: logprobs:
@@ -9894,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -9945,7 +9887,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/UnauthorizedResponse' $ref: '#/components/schemas/UnauthorizedResponse'
'403': '403':
description: Forbidden - Only management keys can fetch activity description: Forbidden - Only provisioning keys can fetch activity
content: content:
application/json: application/json:
schema: schema:
@@ -9967,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
responses: responses:
'200': '200':
description: Returns the total credits purchased and used description: Returns the total credits purchased and used
@@ -10007,7 +9949,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/UnauthorizedResponse' $ref: '#/components/schemas/UnauthorizedResponse'
'403': '403':
description: Forbidden - Only management keys can fetch credits description: Forbidden - Only provisioning keys can fetch credits
content: content:
application/json: application/json:
schema: schema:
@@ -10645,7 +10587,6 @@ paths:
- Inceptron - Inceptron
- InferenceNet - InferenceNet
- Infermatic - Infermatic
- Io Net
- Inflection - Inflection
- Liquid - Liquid
- Mara - Mara
@@ -11051,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11251,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
requestBody: requestBody:
content: content:
application/json: application/json:
@@ -11495,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11738,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11796,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -11997,7 +11938,7 @@ paths:
- Guardrails - Guardrails
summary: List guardrails summary: List guardrails
description: >- description: >-
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12154,7 +12095,7 @@ paths:
- Guardrails - Guardrails
summary: Create a guardrail summary: Create a guardrail
description: >- description: >-
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
requestBody: requestBody:
content: content:
application/json: application/json:
@@ -12371,7 +12312,7 @@ paths:
tags: tags:
- Guardrails - Guardrails
summary: Get a guardrail summary: Get a guardrail
description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12518,7 +12459,7 @@ paths:
tags: tags:
- Guardrails - Guardrails
summary: Update a guardrail summary: Update a guardrail
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12735,7 +12676,7 @@ paths:
tags: tags:
- Guardrails - Guardrails
summary: Delete a guardrail summary: Delete a guardrail
description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12792,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12893,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -12989,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13101,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13179,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13286,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13365,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13443,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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
parameters: parameters:
- schema: - schema:
type: string type: string
@@ -13578,14 +13519,9 @@ 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 management key description: Whether this is a provisioning key
deprecated: true
example: false example: false
limit_remaining: limit_remaining:
type: number type: number
@@ -13644,7 +13580,6 @@ 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
@@ -13663,7 +13598,6 @@ 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
@@ -13688,7 +13622,6 @@ 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
@@ -13834,20 +13767,6 @@ paths:
nullable: true nullable: true
format: date-time format: date-time
description: Optional expiration time for the API key to be created description: Optional expiration time for the API key to be created
key_label:
type: string
maxLength: 100
description: Optional custom label for the API key. Defaults to the app name if not provided.
example: My Custom Key
usage_limit_type:
type: string
enum:
- daily
- weekly
- monthly
description: Optional credit limit reset interval. When set, the credit limit resets on this interval.
example: monthly
x-speakeasy-unknown-values: allow
required: required:
- callback_url - callback_url
example: example:
+5 -5
View File
@@ -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:c35c30cefa7374fca9158283ca25f10c981f1098509d9e4ac03cbfed356479df sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
sourceBlobDigest: sha256:c09875e3f18d78b78c948d40ec1a5ac7af9be1725db1ee5c7cd2bbe8bb446ffb sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
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:c35c30cefa7374fca9158283ca25f10c981f1098509d9e4ac03cbfed356479df sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
sourceBlobDigest: sha256:c09875e3f18d78b78c948d40ec1a5ac7af9be1725db1ee5c7cd2bbe8bb446ffb sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:0fdbb46fc2029d053bd04962e251a7cd3cfcd96a19a31dcfce59f25cbf30b3b1 codeSamplesRevisionDigest: sha256:e44fdec134bc5f249b3e785da067ea31d1bba8f9891bca0f6c19d7ace670ab11
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.666.0 speakeasyVersion: 1.666.0
-4
View File
@@ -182,8 +182,6 @@ import os
def main(): def main():
with OpenRouter( with OpenRouter(
http_referer="<value>",
x_title="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
# Rest of application here... # Rest of application here...
@@ -193,8 +191,6 @@ def main():
async def amain(): async def amain():
async with OpenRouter( async with OpenRouter(
http_referer="<value>",
x_title="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
# Rest of application here... # Rest of application here...
+1 -1
View File
@@ -11,5 +11,5 @@
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A | | `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema20](../components/schema20.md)] | :heavy_minus_sign: | N/A | | `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A | | `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
-2
View File
@@ -10,7 +10,6 @@
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A | | `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A | | `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `trace` | [Optional[components.Schema19]](../components/schema19.md) | :heavy_minus_sign: | N/A |
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A | | `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | | `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A | | `models` | List[*str*] | :heavy_minus_sign: | N/A |
@@ -29,7 +28,6 @@
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A | | `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A | | `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A | | `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
+1 -1
View File
@@ -10,4 +10,4 @@
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A | | `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema20](../components/schema20.md)] | :heavy_minus_sign: | N/A | | `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
-1
View File
@@ -41,4 +41,3 @@ Request schema for Responses endpoint
| `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | | `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | | | `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | | | `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | |
| `trace` | [Optional[components.Trace]](../components/trace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | |
-1
View File
@@ -40,7 +40,6 @@
| `INCEPTRON` | Inceptron | | `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet | | `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic | | `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection | | `INFLECTION` | Inflection |
| `LIQUID` | Liquid | | `LIQUID` | Liquid |
| `MARA` | Mara | | `MARA` | Mara |
+19 -9
View File
@@ -1,13 +1,23 @@
# Schema19 # Schema19
## Fields ## Supported Types
### `components.Schema19ReasoningSummary`
```python
value: components.Schema19ReasoningSummary = /* values here */
```
### `components.Schema19ReasoningEncrypted`
```python
value: components.Schema19ReasoningEncrypted = /* values here */
```
### `components.Schema19ReasoningText`
```python
value: components.Schema19ReasoningText = /* values here */
```
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `trace_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `span_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `generation_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `parent_span_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
@@ -1,4 +1,4 @@
# Schema20ReasoningEncrypted # Schema19ReasoningEncrypted
## Fields ## Fields
@@ -8,5 +8,5 @@
| `type` | *Literal["reasoning.encrypted"]* | :heavy_check_mark: | N/A | | `type` | *Literal["reasoning.encrypted"]* | :heavy_check_mark: | N/A |
| `data` | *str* | :heavy_check_mark: | N/A | | `data` | *str* | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `format_` | [OptionalNullable[components.Schema22]](../components/schema22.md) | :heavy_minus_sign: | N/A | | `format_` | [OptionalNullable[components.Schema21]](../components/schema21.md) | :heavy_minus_sign: | N/A |
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
@@ -1,4 +1,4 @@
# Schema20ReasoningSummary # Schema19ReasoningSummary
## Fields ## Fields
@@ -8,5 +8,5 @@
| `type` | *Literal["reasoning.summary"]* | :heavy_check_mark: | N/A | | `type` | *Literal["reasoning.summary"]* | :heavy_check_mark: | N/A |
| `summary` | *str* | :heavy_check_mark: | N/A | | `summary` | *str* | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `format_` | [OptionalNullable[components.Schema22]](../components/schema22.md) | :heavy_minus_sign: | N/A | | `format_` | [OptionalNullable[components.Schema21]](../components/schema21.md) | :heavy_minus_sign: | N/A |
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
@@ -1,4 +1,4 @@
# Schema20ReasoningText # Schema19ReasoningText
## Fields ## Fields
@@ -9,5 +9,5 @@
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `format_` | [OptionalNullable[components.Schema22]](../components/schema22.md) | :heavy_minus_sign: | N/A | | `format_` | [OptionalNullable[components.Schema21]](../components/schema21.md) | :heavy_minus_sign: | N/A |
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
-23
View File
@@ -1,23 +0,0 @@
# Schema20
## Supported Types
### `components.Schema20ReasoningSummary`
```python
value: components.Schema20ReasoningSummary = /* values here */
```
### `components.Schema20ReasoningEncrypted`
```python
value: components.Schema20ReasoningEncrypted = /* values here */
```
### `components.Schema20ReasoningText`
```python
value: components.Schema20ReasoningText = /* values here */
```
@@ -1,4 +1,4 @@
# Schema22 # Schema21
## Values ## Values
-1
View File
@@ -40,7 +40,6 @@
| `INCEPTRON` | Inceptron | | `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet | | `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic | | `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection | | `INFLECTION` | Inflection |
| `LIQUID` | Liquid | | `LIQUID` | Liquid |
| `MARA` | Mara | | `MARA` | Mara |
+1 -2
View File
@@ -4,7 +4,6 @@
## Fields ## Fields
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A | | `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ToolDefinitionJSONFunction](../components/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A | | `function` | [components.ToolDefinitionJSONFunction](../components/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
-15
View File
@@ -1,15 +0,0 @@
# Trace
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
## Fields
| Field | Type | Required | Description |
| -------------------------- | -------------------------- | -------------------------- | -------------------------- |
| `trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `trace_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `span_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `generation_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `parent_span_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A |
+1 -1
View File
@@ -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 management 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 provisioning keys can perform this operation"<br/>} |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -10,5 +10,3 @@
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | | `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
+1 -2
View File
@@ -18,8 +18,7 @@ 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_management_key` | *bool* | :heavy_check_mark: | Whether this is a management key | false | | `is_provisioning_key` | *bool* | :heavy_check_mark: | Whether this is a provisioning 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 |
+2 -2
View File
@@ -6,5 +6,5 @@ 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_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/>} | | `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/>} |
-1
View File
@@ -68,7 +68,6 @@
| `INCEPTRON` | Inceptron | | `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet | | `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic | | `INFERMATIC` | Infermatic |
| `IO_NET` | Io Net |
| `INFLECTION` | Inflection | | `INFLECTION` | Inflection |
| `LIQUID` | Liquid | | `LIQUID` | Liquid |
| `MARA` | Mara | | `MARA` | Mara |
-12
View File
@@ -1,12 +0,0 @@
# UsageLimitType
Optional credit limit reset interval. When set, the credit limit resets on this interval.
## Values
| Name | Value |
| --------- | --------- |
| `DAILY` | daily |
| `WEEKLY` | weekly |
| `MONTHLY` | monthly |
+1 -1
View File
@@ -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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
+5 -5
View File
@@ -16,7 +16,7 @@ API key management endpoints
## list ## list
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -64,7 +64,7 @@ with OpenRouter(
## create ## create
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -116,7 +116,7 @@ with OpenRouter(
## update ## update
Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -170,7 +170,7 @@ with OpenRouter(
## delete ## delete
Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -218,7 +218,7 @@ with OpenRouter(
## get ## get
Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
-2
View File
@@ -46,7 +46,6 @@ with OpenRouter(
| `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A | | `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A | | `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `trace` | [Optional[components.Schema19]](../../components/schema19.md) | :heavy_minus_sign: | N/A |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | | `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A | | `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -64,7 +63,6 @@ with OpenRouter(
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A | | `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A | | `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A | | `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
+1 -1
View File
@@ -12,7 +12,7 @@ Credit management endpoints
## get_credits ## get_credits
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
+13 -13
View File
@@ -23,7 +23,7 @@ Guardrails endpoints
## list ## list
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -70,7 +70,7 @@ with OpenRouter(
## create ## create
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -123,7 +123,7 @@ with OpenRouter(
## get ## get
Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -170,7 +170,7 @@ with OpenRouter(
## update ## update
Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
@@ -225,7 +225,7 @@ with OpenRouter(
## delete ## delete
Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
### Example Usage ### Example Usage
-2
View File
@@ -95,8 +95,6 @@ with OpenRouter(
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | | `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response ### Response
-1
View File
@@ -75,7 +75,6 @@ with OpenRouter(
| `plugins` | List[[components.Plugin](../../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | | `plugins` | List[[components.Plugin](../../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | | | `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | | | `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | |
| `trace` | [Optional[components.Trace]](../../components/trace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response ### Response
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "openrouter" name = "openrouter"
version = "0.7.3" version = "0.5.1"
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"
+2 -2
View File
@@ -3,10 +3,10 @@
import importlib.metadata import importlib.metadata
__title__: str = "openrouter" __title__: str = "openrouter"
__version__: str = "0.7.3" __version__: str = "0.5.1"
__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.7.3 2.768.0 1.0.0 openrouter" __user_agent__: str = "speakeasy-sdk/python 0.5.1 2.768.0 1.0.0 openrouter"
try: try:
if __package__ is not None: if __package__ is not None:
+2 -2
View File
@@ -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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-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
View File
@@ -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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-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.
-40
View File
@@ -32,9 +32,6 @@ class Chat(BaseSDK):
route: OptionalNullable[components.Route] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[
Union[components.Schema19, components.Schema19TypedDict]
] = None,
model: Optional[str] = None, model: Optional[str] = None,
models: Optional[List[str]] = None, models: Optional[List[str]] = None,
frequency_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET,
@@ -60,7 +57,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict] Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET, ] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None, tool_choice: Optional[Any] = None,
tools: Optional[ tools: Optional[
Union[ Union[
@@ -97,7 +93,6 @@ class Chat(BaseSDK):
:param route: :param route:
:param user: :param user:
:param session_id: :param session_id:
:param trace:
:param model: :param model:
:param models: :param models:
:param frequency_penalty: :param frequency_penalty:
@@ -115,7 +110,6 @@ class Chat(BaseSDK):
:param stream: :param stream:
:param stream_options: :param stream_options:
:param temperature: :param temperature:
:param parallel_tool_calls:
:param tool_choice: :param tool_choice:
:param tools: :param tools:
:param top_p: :param top_p:
@@ -145,9 +139,6 @@ class Chat(BaseSDK):
route: OptionalNullable[components.Route] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[
Union[components.Schema19, components.Schema19TypedDict]
] = None,
model: Optional[str] = None, model: Optional[str] = None,
models: Optional[List[str]] = None, models: Optional[List[str]] = None,
frequency_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET,
@@ -173,7 +164,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict] Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET, ] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None, tool_choice: Optional[Any] = None,
tools: Optional[ tools: Optional[
Union[ Union[
@@ -210,7 +200,6 @@ class Chat(BaseSDK):
:param route: :param route:
:param user: :param user:
:param session_id: :param session_id:
:param trace:
:param model: :param model:
:param models: :param models:
:param frequency_penalty: :param frequency_penalty:
@@ -228,7 +217,6 @@ class Chat(BaseSDK):
:param stream: :param stream:
:param stream_options: :param stream_options:
:param temperature: :param temperature:
:param parallel_tool_calls:
:param tool_choice: :param tool_choice:
:param tools: :param tools:
:param top_p: :param top_p:
@@ -257,9 +245,6 @@ class Chat(BaseSDK):
route: OptionalNullable[components.Route] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[
Union[components.Schema19, components.Schema19TypedDict]
] = None,
model: Optional[str] = None, model: Optional[str] = None,
models: Optional[List[str]] = None, models: Optional[List[str]] = None,
frequency_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET,
@@ -285,7 +270,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict] Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET, ] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None, tool_choice: Optional[Any] = None,
tools: Optional[ tools: Optional[
Union[ Union[
@@ -322,7 +306,6 @@ class Chat(BaseSDK):
:param route: :param route:
:param user: :param user:
:param session_id: :param session_id:
:param trace:
:param model: :param model:
:param models: :param models:
:param frequency_penalty: :param frequency_penalty:
@@ -340,7 +323,6 @@ class Chat(BaseSDK):
:param stream: :param stream:
:param stream_options: :param stream_options:
:param temperature: :param temperature:
:param parallel_tool_calls:
:param tool_choice: :param tool_choice:
:param tools: :param tools:
:param top_p: :param top_p:
@@ -376,7 +358,6 @@ class Chat(BaseSDK):
route=route, route=route,
user=user, user=user,
session_id=session_id, session_id=session_id,
trace=utils.get_pydantic_model(trace, Optional[components.Schema19]),
messages=utils.get_pydantic_model(messages, List[components.Message]), messages=utils.get_pydantic_model(messages, List[components.Message]),
model=model, model=model,
models=models, models=models,
@@ -401,7 +382,6 @@ class Chat(BaseSDK):
stream_options, OptionalNullable[components.ChatStreamOptions] stream_options, OptionalNullable[components.ChatStreamOptions]
), ),
temperature=temperature, temperature=temperature,
parallel_tool_calls=parallel_tool_calls,
tool_choice=tool_choice, tool_choice=tool_choice,
tools=utils.get_pydantic_model( tools=utils.get_pydantic_model(
tools, Optional[List[components.ToolDefinitionJSON]] tools, Optional[List[components.ToolDefinitionJSON]]
@@ -524,9 +504,6 @@ class Chat(BaseSDK):
route: OptionalNullable[components.Route] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[
Union[components.Schema19, components.Schema19TypedDict]
] = None,
model: Optional[str] = None, model: Optional[str] = None,
models: Optional[List[str]] = None, models: Optional[List[str]] = None,
frequency_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET,
@@ -552,7 +529,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict] Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET, ] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None, tool_choice: Optional[Any] = None,
tools: Optional[ tools: Optional[
Union[ Union[
@@ -589,7 +565,6 @@ class Chat(BaseSDK):
:param route: :param route:
:param user: :param user:
:param session_id: :param session_id:
:param trace:
:param model: :param model:
:param models: :param models:
:param frequency_penalty: :param frequency_penalty:
@@ -607,7 +582,6 @@ class Chat(BaseSDK):
:param stream: :param stream:
:param stream_options: :param stream_options:
:param temperature: :param temperature:
:param parallel_tool_calls:
:param tool_choice: :param tool_choice:
:param tools: :param tools:
:param top_p: :param top_p:
@@ -637,9 +611,6 @@ class Chat(BaseSDK):
route: OptionalNullable[components.Route] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[
Union[components.Schema19, components.Schema19TypedDict]
] = None,
model: Optional[str] = None, model: Optional[str] = None,
models: Optional[List[str]] = None, models: Optional[List[str]] = None,
frequency_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET,
@@ -665,7 +636,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict] Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET, ] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None, tool_choice: Optional[Any] = None,
tools: Optional[ tools: Optional[
Union[ Union[
@@ -702,7 +672,6 @@ class Chat(BaseSDK):
:param route: :param route:
:param user: :param user:
:param session_id: :param session_id:
:param trace:
:param model: :param model:
:param models: :param models:
:param frequency_penalty: :param frequency_penalty:
@@ -720,7 +689,6 @@ class Chat(BaseSDK):
:param stream: :param stream:
:param stream_options: :param stream_options:
:param temperature: :param temperature:
:param parallel_tool_calls:
:param tool_choice: :param tool_choice:
:param tools: :param tools:
:param top_p: :param top_p:
@@ -749,9 +717,6 @@ class Chat(BaseSDK):
route: OptionalNullable[components.Route] = UNSET, route: OptionalNullable[components.Route] = UNSET,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[
Union[components.Schema19, components.Schema19TypedDict]
] = None,
model: Optional[str] = None, model: Optional[str] = None,
models: Optional[List[str]] = None, models: Optional[List[str]] = None,
frequency_penalty: OptionalNullable[float] = UNSET, frequency_penalty: OptionalNullable[float] = UNSET,
@@ -777,7 +742,6 @@ class Chat(BaseSDK):
Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict] Union[components.ChatStreamOptions, components.ChatStreamOptionsTypedDict]
] = UNSET, ] = UNSET,
temperature: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET,
parallel_tool_calls: OptionalNullable[bool] = UNSET,
tool_choice: Optional[Any] = None, tool_choice: Optional[Any] = None,
tools: Optional[ tools: Optional[
Union[ Union[
@@ -814,7 +778,6 @@ class Chat(BaseSDK):
:param route: :param route:
:param user: :param user:
:param session_id: :param session_id:
:param trace:
:param model: :param model:
:param models: :param models:
:param frequency_penalty: :param frequency_penalty:
@@ -832,7 +795,6 @@ class Chat(BaseSDK):
:param stream: :param stream:
:param stream_options: :param stream_options:
:param temperature: :param temperature:
:param parallel_tool_calls:
:param tool_choice: :param tool_choice:
:param tools: :param tools:
:param top_p: :param top_p:
@@ -868,7 +830,6 @@ class Chat(BaseSDK):
route=route, route=route,
user=user, user=user,
session_id=session_id, session_id=session_id,
trace=utils.get_pydantic_model(trace, Optional[components.Schema19]),
messages=utils.get_pydantic_model(messages, List[components.Message]), messages=utils.get_pydantic_model(messages, List[components.Message]),
model=model, model=model,
models=models, models=models,
@@ -893,7 +854,6 @@ class Chat(BaseSDK):
stream_options, OptionalNullable[components.ChatStreamOptions] stream_options, OptionalNullable[components.ChatStreamOptions]
), ),
temperature=temperature, temperature=temperature,
parallel_tool_calls=parallel_tool_calls,
tool_choice=tool_choice, tool_choice=tool_choice,
tools=utils.get_pydantic_model( tools=utils.get_pydantic_model(
tools, Optional[List[components.ToolDefinitionJSON]] tools, Optional[List[components.ToolDefinitionJSON]]
+24 -35
View File
@@ -33,17 +33,16 @@ if TYPE_CHECKING:
Schema17Web, Schema17Web,
Schema17WebTypedDict, Schema17WebTypedDict,
) )
from ._schema19 import Schema19, Schema19TypedDict from ._schema19 import (
from ._schema20 import ( Schema19,
Schema20, Schema19ReasoningEncrypted,
Schema20ReasoningEncrypted, Schema19ReasoningEncryptedTypedDict,
Schema20ReasoningEncryptedTypedDict, Schema19ReasoningSummary,
Schema20ReasoningSummary, Schema19ReasoningSummaryTypedDict,
Schema20ReasoningSummaryTypedDict, Schema19ReasoningText,
Schema20ReasoningText, Schema19ReasoningTextTypedDict,
Schema20ReasoningTextTypedDict, Schema19TypedDict,
Schema20TypedDict, Schema21,
Schema22,
) )
from ._schema5 import Schema5, Schema5Enum, Schema5TypedDict from ._schema5 import Schema5, Schema5Enum, Schema5TypedDict
from .activityitem import ActivityItem, ActivityItemTypedDict from .activityitem import ActivityItem, ActivityItemTypedDict
@@ -497,8 +496,6 @@ if TYPE_CHECKING:
Provider, Provider,
ProviderTypedDict, ProviderTypedDict,
ServiceTier, ServiceTier,
Trace,
TraceTypedDict,
Truncation, Truncation,
) )
from .openresponsesresponsetext import ( from .openresponsesresponsetext import (
@@ -1502,16 +1499,14 @@ __all__ = [
"Schema17Web", "Schema17Web",
"Schema17WebTypedDict", "Schema17WebTypedDict",
"Schema19", "Schema19",
"Schema19ReasoningEncrypted",
"Schema19ReasoningEncryptedTypedDict",
"Schema19ReasoningSummary",
"Schema19ReasoningSummaryTypedDict",
"Schema19ReasoningText",
"Schema19ReasoningTextTypedDict",
"Schema19TypedDict", "Schema19TypedDict",
"Schema20", "Schema21",
"Schema20ReasoningEncrypted",
"Schema20ReasoningEncryptedTypedDict",
"Schema20ReasoningSummary",
"Schema20ReasoningSummaryTypedDict",
"Schema20ReasoningText",
"Schema20ReasoningTextTypedDict",
"Schema20TypedDict",
"Schema22",
"Schema3", "Schema3",
"Schema5", "Schema5",
"Schema5Enum", "Schema5Enum",
@@ -1544,8 +1539,6 @@ __all__ = [
"ToolResponseMessageTypedDict", "ToolResponseMessageTypedDict",
"TopProviderInfo", "TopProviderInfo",
"TopProviderInfoTypedDict", "TopProviderInfoTypedDict",
"Trace",
"TraceTypedDict",
"Truncation", "Truncation",
"Type", "Type",
"TypeResponseCompleted", "TypeResponseCompleted",
@@ -1616,16 +1609,14 @@ _dynamic_imports: dict[str, str] = {
"Schema17Web": "._schema17", "Schema17Web": "._schema17",
"Schema17WebTypedDict": "._schema17", "Schema17WebTypedDict": "._schema17",
"Schema19": "._schema19", "Schema19": "._schema19",
"Schema19ReasoningEncrypted": "._schema19",
"Schema19ReasoningEncryptedTypedDict": "._schema19",
"Schema19ReasoningSummary": "._schema19",
"Schema19ReasoningSummaryTypedDict": "._schema19",
"Schema19ReasoningText": "._schema19",
"Schema19ReasoningTextTypedDict": "._schema19",
"Schema19TypedDict": "._schema19", "Schema19TypedDict": "._schema19",
"Schema20": "._schema20", "Schema21": "._schema19",
"Schema20ReasoningEncrypted": "._schema20",
"Schema20ReasoningEncryptedTypedDict": "._schema20",
"Schema20ReasoningSummary": "._schema20",
"Schema20ReasoningSummaryTypedDict": "._schema20",
"Schema20ReasoningText": "._schema20",
"Schema20ReasoningTextTypedDict": "._schema20",
"Schema20TypedDict": "._schema20",
"Schema22": "._schema20",
"Schema5": "._schema5", "Schema5": "._schema5",
"Schema5Enum": "._schema5", "Schema5Enum": "._schema5",
"Schema5TypedDict": "._schema5", "Schema5TypedDict": "._schema5",
@@ -1990,8 +1981,6 @@ _dynamic_imports: dict[str, str] = {
"Provider": ".openresponsesrequest", "Provider": ".openresponsesrequest",
"ProviderTypedDict": ".openresponsesrequest", "ProviderTypedDict": ".openresponsesrequest",
"ServiceTier": ".openresponsesrequest", "ServiceTier": ".openresponsesrequest",
"Trace": ".openresponsesrequest",
"TraceTypedDict": ".openresponsesrequest",
"Truncation": ".openresponsesrequest", "Truncation": ".openresponsesrequest",
"OpenResponsesResponseText": ".openresponsesresponsetext", "OpenResponsesResponseText": ".openresponsesresponsetext",
"OpenResponsesResponseTextTypedDict": ".openresponsesresponsetext", "OpenResponsesResponseTextTypedDict": ".openresponsesresponsetext",
+220 -26
View File
@@ -1,41 +1,235 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations from __future__ import annotations
from openrouter.types import BaseModel from openrouter.types import (
BaseModel,
Nullable,
OptionalNullable,
UNSET,
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import get_discriminator, validate_const, validate_open_enum
import pydantic import pydantic
from pydantic import ConfigDict from pydantic import Discriminator, Tag, model_serializer
from typing import Any, Dict, Optional from pydantic.functional_validators import AfterValidator, PlainValidator
from typing_extensions import NotRequired, TypedDict from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class Schema19TypedDict(TypedDict): Schema21 = Union[
trace_id: NotRequired[str] Literal[
trace_name: NotRequired[str] "unknown",
span_name: NotRequired[str] "openai-responses-v1",
generation_name: NotRequired[str] "azure-openai-responses-v1",
parent_span_id: NotRequired[str] "xai-responses-v1",
"anthropic-claude-v1",
"google-gemini-v1",
],
UnrecognizedStr,
]
class Schema19(BaseModel): class Schema19ReasoningTextTypedDict(TypedDict):
model_config = ConfigDict( type: Literal["reasoning.text"]
populate_by_name=True, arbitrary_types_allowed=True, extra="allow" text: NotRequired[Nullable[str]]
) signature: NotRequired[Nullable[str]]
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) id: NotRequired[Nullable[str]]
format_: NotRequired[Nullable[Schema21]]
index: NotRequired[float]
trace_id: Optional[str] = None
trace_name: Optional[str] = None class Schema19ReasoningText(BaseModel):
TYPE: Annotated[
Annotated[
Literal["reasoning.text"], AfterValidator(validate_const("reasoning.text"))
],
pydantic.Field(alias="type"),
] = "reasoning.text"
span_name: Optional[str] = None text: OptionalNullable[str] = UNSET
generation_name: Optional[str] = None signature: OptionalNullable[str] = UNSET
parent_span_id: Optional[str] = None id: OptionalNullable[str] = UNSET
@property format_: Annotated[
def additional_properties(self): Annotated[
return self.__pydantic_extra__ OptionalNullable[Schema21], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
@additional_properties.setter index: Optional[float] = None
def additional_properties(self, value):
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] @model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["text", "signature", "id", "format", "index"]
nullable_fields = ["text", "signature", "id", "format"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
class Schema19ReasoningEncryptedTypedDict(TypedDict):
data: str
type: Literal["reasoning.encrypted"]
id: NotRequired[Nullable[str]]
format_: NotRequired[Nullable[Schema21]]
index: NotRequired[float]
class Schema19ReasoningEncrypted(BaseModel):
data: str
TYPE: Annotated[
Annotated[
Literal["reasoning.encrypted"],
AfterValidator(validate_const("reasoning.encrypted")),
],
pydantic.Field(alias="type"),
] = "reasoning.encrypted"
id: OptionalNullable[str] = UNSET
format_: Annotated[
Annotated[
OptionalNullable[Schema21], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
index: Optional[float] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["id", "format", "index"]
nullable_fields = ["id", "format"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
class Schema19ReasoningSummaryTypedDict(TypedDict):
summary: str
type: Literal["reasoning.summary"]
id: NotRequired[Nullable[str]]
format_: NotRequired[Nullable[Schema21]]
index: NotRequired[float]
class Schema19ReasoningSummary(BaseModel):
summary: str
TYPE: Annotated[
Annotated[
Literal["reasoning.summary"],
AfterValidator(validate_const("reasoning.summary")),
],
pydantic.Field(alias="type"),
] = "reasoning.summary"
id: OptionalNullable[str] = UNSET
format_: Annotated[
Annotated[
OptionalNullable[Schema21], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
index: Optional[float] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["id", "format", "index"]
nullable_fields = ["id", "format"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
Schema19TypedDict = TypeAliasType(
"Schema19TypedDict",
Union[
Schema19ReasoningSummaryTypedDict,
Schema19ReasoningEncryptedTypedDict,
Schema19ReasoningTextTypedDict,
],
)
Schema19 = Annotated[
Union[
Annotated[Schema19ReasoningSummary, Tag("reasoning.summary")],
Annotated[Schema19ReasoningEncrypted, Tag("reasoning.encrypted")],
Annotated[Schema19ReasoningText, Tag("reasoning.text")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
-235
View File
@@ -1,235 +0,0 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import (
BaseModel,
Nullable,
OptionalNullable,
UNSET,
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import get_discriminator, validate_const, validate_open_enum
import pydantic
from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import AfterValidator, PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
Schema22 = Union[
Literal[
"unknown",
"openai-responses-v1",
"azure-openai-responses-v1",
"xai-responses-v1",
"anthropic-claude-v1",
"google-gemini-v1",
],
UnrecognizedStr,
]
class Schema20ReasoningTextTypedDict(TypedDict):
type: Literal["reasoning.text"]
text: NotRequired[Nullable[str]]
signature: NotRequired[Nullable[str]]
id: NotRequired[Nullable[str]]
format_: NotRequired[Nullable[Schema22]]
index: NotRequired[float]
class Schema20ReasoningText(BaseModel):
TYPE: Annotated[
Annotated[
Literal["reasoning.text"], AfterValidator(validate_const("reasoning.text"))
],
pydantic.Field(alias="type"),
] = "reasoning.text"
text: OptionalNullable[str] = UNSET
signature: OptionalNullable[str] = UNSET
id: OptionalNullable[str] = UNSET
format_: Annotated[
Annotated[
OptionalNullable[Schema22], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
index: Optional[float] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["text", "signature", "id", "format", "index"]
nullable_fields = ["text", "signature", "id", "format"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
class Schema20ReasoningEncryptedTypedDict(TypedDict):
data: str
type: Literal["reasoning.encrypted"]
id: NotRequired[Nullable[str]]
format_: NotRequired[Nullable[Schema22]]
index: NotRequired[float]
class Schema20ReasoningEncrypted(BaseModel):
data: str
TYPE: Annotated[
Annotated[
Literal["reasoning.encrypted"],
AfterValidator(validate_const("reasoning.encrypted")),
],
pydantic.Field(alias="type"),
] = "reasoning.encrypted"
id: OptionalNullable[str] = UNSET
format_: Annotated[
Annotated[
OptionalNullable[Schema22], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
index: Optional[float] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["id", "format", "index"]
nullable_fields = ["id", "format"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
class Schema20ReasoningSummaryTypedDict(TypedDict):
summary: str
type: Literal["reasoning.summary"]
id: NotRequired[Nullable[str]]
format_: NotRequired[Nullable[Schema22]]
index: NotRequired[float]
class Schema20ReasoningSummary(BaseModel):
summary: str
TYPE: Annotated[
Annotated[
Literal["reasoning.summary"],
AfterValidator(validate_const("reasoning.summary")),
],
pydantic.Field(alias="type"),
] = "reasoning.summary"
id: OptionalNullable[str] = UNSET
format_: Annotated[
Annotated[
OptionalNullable[Schema22], PlainValidator(validate_open_enum(False))
],
pydantic.Field(alias="format"),
] = UNSET
index: Optional[float] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = ["id", "format", "index"]
nullable_fields = ["id", "format"]
null_default_fields = []
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k)
serialized.pop(k, None)
optional_nullable = k in optional_fields and k in nullable_fields
is_set = (
self.__pydantic_fields_set__.intersection({n})
or k in null_default_fields
) # pylint: disable=no-member
if val is not None and val != UNSET_SENTINEL:
m[k] = val
elif val != UNSET_SENTINEL and (
not k in optional_fields or (optional_nullable and is_set)
):
m[k] = val
return m
Schema20TypedDict = TypeAliasType(
"Schema20TypedDict",
Union[
Schema20ReasoningSummaryTypedDict,
Schema20ReasoningEncryptedTypedDict,
Schema20ReasoningTextTypedDict,
],
)
Schema20 = Annotated[
Union[
Annotated[Schema20ReasoningSummary, Tag("reasoning.summary")],
Annotated[Schema20ReasoningEncrypted, Tag("reasoning.encrypted")],
Annotated[Schema20ReasoningText, Tag("reasoning.text")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
-1
View File
@@ -45,7 +45,6 @@ Schema5Enum = Union[
"Inceptron", "Inceptron",
"InferenceNet", "InferenceNet",
"Infermatic", "Infermatic",
"Io Net",
"Inflection", "Inflection",
"Liquid", "Liquid",
"Mara", "Mara",
@@ -1,7 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations from __future__ import annotations
from ._schema20 import Schema20, Schema20TypedDict from ._schema19 import Schema19, Schema19TypedDict
from .chatmessagecontentitem import ( from .chatmessagecontentitem import (
ChatMessageContentItem, ChatMessageContentItem,
ChatMessageContentItemTypedDict, ChatMessageContentItemTypedDict,
@@ -56,7 +56,7 @@ class AssistantMessageTypedDict(TypedDict):
tool_calls: NotRequired[List[ChatMessageToolCallTypedDict]] tool_calls: NotRequired[List[ChatMessageToolCallTypedDict]]
refusal: NotRequired[Nullable[str]] refusal: NotRequired[Nullable[str]]
reasoning: NotRequired[Nullable[str]] reasoning: NotRequired[Nullable[str]]
reasoning_details: NotRequired[List[Schema20TypedDict]] reasoning_details: NotRequired[List[Schema19TypedDict]]
images: NotRequired[List[ImageTypedDict]] images: NotRequired[List[ImageTypedDict]]
@@ -76,7 +76,7 @@ class AssistantMessage(BaseModel):
reasoning: OptionalNullable[str] = UNSET reasoning: OptionalNullable[str] = UNSET
reasoning_details: Optional[List[Schema20]] = None reasoning_details: Optional[List[Schema19]] = None
images: Optional[List[Image]] = None images: Optional[List[Image]] = None
@@ -3,7 +3,6 @@
from __future__ import annotations from __future__ import annotations
from ._schema10 import Schema10, Schema10TypedDict from ._schema10 import Schema10, Schema10TypedDict
from ._schema17 import Schema17, Schema17TypedDict from ._schema17 import Schema17, Schema17TypedDict
from ._schema19 import Schema19, Schema19TypedDict
from ._schema5 import Schema5, Schema5TypedDict from ._schema5 import Schema5, Schema5TypedDict
from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict
from .message import Message, MessageTypedDict from .message import Message, MessageTypedDict
@@ -386,7 +385,6 @@ class ChatGenerationParamsTypedDict(TypedDict):
route: NotRequired[Nullable[Route]] route: NotRequired[Nullable[Route]]
user: NotRequired[str] user: NotRequired[str]
session_id: NotRequired[str] session_id: NotRequired[str]
trace: NotRequired[Schema19TypedDict]
model: NotRequired[str] model: NotRequired[str]
models: NotRequired[List[str]] models: NotRequired[List[str]]
frequency_penalty: NotRequired[Nullable[float]] frequency_penalty: NotRequired[Nullable[float]]
@@ -404,7 +402,6 @@ class ChatGenerationParamsTypedDict(TypedDict):
stream: NotRequired[bool] stream: NotRequired[bool]
stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]] stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]]
temperature: NotRequired[Nullable[float]] temperature: NotRequired[Nullable[float]]
parallel_tool_calls: NotRequired[Nullable[bool]]
tool_choice: NotRequired[Any] tool_choice: NotRequired[Any]
tools: NotRequired[List[ToolDefinitionJSONTypedDict]] tools: NotRequired[List[ToolDefinitionJSONTypedDict]]
top_p: NotRequired[Nullable[float]] top_p: NotRequired[Nullable[float]]
@@ -428,8 +425,6 @@ class ChatGenerationParams(BaseModel):
session_id: Optional[str] = None session_id: Optional[str] = None
trace: Optional[Schema19] = None
model: Optional[str] = None model: Optional[str] = None
models: Optional[List[str]] = None models: Optional[List[str]] = None
@@ -464,8 +459,6 @@ class ChatGenerationParams(BaseModel):
temperature: OptionalNullable[float] = UNSET temperature: OptionalNullable[float] = UNSET
parallel_tool_calls: OptionalNullable[bool] = UNSET
tool_choice: Optional[Any] = None tool_choice: Optional[Any] = None
tools: Optional[List[ToolDefinitionJSON]] = None tools: Optional[List[ToolDefinitionJSON]] = None
@@ -488,7 +481,6 @@ class ChatGenerationParams(BaseModel):
"route", "route",
"user", "user",
"session_id", "session_id",
"trace",
"model", "model",
"models", "models",
"frequency_penalty", "frequency_penalty",
@@ -506,7 +498,6 @@ class ChatGenerationParams(BaseModel):
"stream", "stream",
"stream_options", "stream_options",
"temperature", "temperature",
"parallel_tool_calls",
"tool_choice", "tool_choice",
"tools", "tools",
"top_p", "top_p",
@@ -528,7 +519,6 @@ class ChatGenerationParams(BaseModel):
"stop", "stop",
"stream_options", "stream_options",
"temperature", "temperature",
"parallel_tool_calls",
"top_p", "top_p",
] ]
null_default_fields = [] null_default_fields = []
@@ -1,7 +1,7 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations from __future__ import annotations
from ._schema20 import Schema20, Schema20TypedDict from ._schema19 import Schema19, Schema19TypedDict
from .chatstreamingmessagetoolcall import ( from .chatstreamingmessagetoolcall import (
ChatStreamingMessageToolCall, ChatStreamingMessageToolCall,
ChatStreamingMessageToolCallTypedDict, ChatStreamingMessageToolCallTypedDict,
@@ -27,7 +27,7 @@ class ChatStreamingMessageChunkTypedDict(TypedDict):
reasoning: NotRequired[Nullable[str]] reasoning: NotRequired[Nullable[str]]
refusal: NotRequired[Nullable[str]] refusal: NotRequired[Nullable[str]]
tool_calls: NotRequired[List[ChatStreamingMessageToolCallTypedDict]] tool_calls: NotRequired[List[ChatStreamingMessageToolCallTypedDict]]
reasoning_details: NotRequired[List[Schema20TypedDict]] reasoning_details: NotRequired[List[Schema19TypedDict]]
class ChatStreamingMessageChunk(BaseModel): class ChatStreamingMessageChunk(BaseModel):
@@ -41,7 +41,7 @@ class ChatStreamingMessageChunk(BaseModel):
tool_calls: Optional[List[ChatStreamingMessageToolCall]] = None tool_calls: Optional[List[ChatStreamingMessageToolCall]] = None
reasoning_details: Optional[List[Schema20]] = None reasoning_details: Optional[List[Schema19]] = None
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
@@ -55,7 +55,7 @@ from openrouter.types import (
) )
from openrouter.utils import get_discriminator, validate_const, validate_open_enum from openrouter.utils import get_discriminator, validate_const, validate_open_enum
import pydantic import pydantic
from pydantic import ConfigDict, Discriminator, Tag, model_serializer from pydantic import Discriminator, Tag, model_serializer
from pydantic.functional_validators import AfterValidator, PlainValidator from pydantic.functional_validators import AfterValidator, PlainValidator
from typing import Any, Dict, List, Literal, Optional, Union from typing import Any, Dict, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
@@ -517,43 +517,6 @@ Plugin = Annotated[
] ]
class TraceTypedDict(TypedDict):
r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
trace_id: NotRequired[str]
trace_name: NotRequired[str]
span_name: NotRequired[str]
generation_name: NotRequired[str]
parent_span_id: NotRequired[str]
class Trace(BaseModel):
r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
model_config = ConfigDict(
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
)
__pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False)
trace_id: Optional[str] = None
trace_name: Optional[str] = None
span_name: Optional[str] = None
generation_name: Optional[str] = None
parent_span_id: Optional[str] = None
@property
def additional_properties(self):
return self.__pydantic_extra__
@additional_properties.setter
def additional_properties(self, value):
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
class OpenResponsesRequestTypedDict(TypedDict): class OpenResponsesRequestTypedDict(TypedDict):
r"""Request schema for Responses endpoint""" r"""Request schema for Responses endpoint"""
@@ -601,8 +564,6 @@ class OpenResponsesRequestTypedDict(TypedDict):
r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.""" r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters."""
session_id: NotRequired[str] session_id: NotRequired[str]
r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.""" r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters."""
trace: NotRequired[TraceTypedDict]
r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
class OpenResponsesRequest(BaseModel): class OpenResponsesRequest(BaseModel):
@@ -703,9 +664,6 @@ class OpenResponsesRequest(BaseModel):
session_id: Optional[str] = None session_id: Optional[str] = None
r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.""" r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters."""
trace: Optional[Trace] = None
r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations."""
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
optional_fields = [ optional_fields = [
@@ -743,7 +701,6 @@ class OpenResponsesRequest(BaseModel):
"plugins", "plugins",
"user", "user",
"session_id", "session_id",
"trace",
] ]
nullable_fields = [ nullable_fields = [
"instructions", "instructions",
@@ -42,7 +42,6 @@ ProviderName = Union[
"Inceptron", "Inceptron",
"InferenceNet", "InferenceNet",
"Infermatic", "Infermatic",
"Io Net",
"Inflection", "Inflection",
"Liquid", "Liquid",
"Mara", "Mara",
@@ -1,10 +1,6 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations from __future__ import annotations
from .chatmessagecontentitemcachecontrol import (
ChatMessageContentItemCacheControl,
ChatMessageContentItemCacheControlTypedDict,
)
from openrouter.types import ( from openrouter.types import (
BaseModel, BaseModel,
Nullable, Nullable,
@@ -70,7 +66,6 @@ class ToolDefinitionJSONFunction(BaseModel):
class ToolDefinitionJSONTypedDict(TypedDict): class ToolDefinitionJSONTypedDict(TypedDict):
function: ToolDefinitionJSONFunctionTypedDict function: ToolDefinitionJSONFunctionTypedDict
type: Literal["function"] type: Literal["function"]
cache_control: NotRequired[ChatMessageContentItemCacheControlTypedDict]
class ToolDefinitionJSON(BaseModel): class ToolDefinitionJSON(BaseModel):
@@ -80,5 +75,3 @@ class ToolDefinitionJSON(BaseModel):
Annotated[Literal["function"], AfterValidator(validate_const("function"))], Annotated[Literal["function"], AfterValidator(validate_const("function"))],
pydantic.Field(alias="type"), pydantic.Field(alias="type"),
] = "function" ] = "function"
cache_control: Optional[ChatMessageContentItemCacheControl] = None
+2 -2
View File
@@ -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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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 -26
View File
@@ -26,7 +26,7 @@ class Guardrails(BaseSDK):
) -> operations.ListGuardrailsResponse: ) -> operations.ListGuardrailsResponse:
r"""List guardrails r"""List guardrails
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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. [Management key](/docs/guides/overview/auth/management-api-keys) required. Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-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
-12
View File
@@ -297,8 +297,6 @@ class OAuth(BaseSDK):
] = None, ] = None,
limit: Optional[float] = None, limit: Optional[float] = None,
expires_at: OptionalNullable[datetime] = UNSET, expires_at: OptionalNullable[datetime] = UNSET,
key_label: Optional[str] = None,
usage_limit_type: Optional[operations.UsageLimitType] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -318,8 +316,6 @@ class OAuth(BaseSDK):
:param code_challenge_method: The method used to generate the code challenge :param code_challenge_method: The method used to generate the code challenge
:param limit: Credit limit for the API key to be created :param limit: Credit limit for the API key to be created
:param expires_at: Optional expiration time for the API key to be created :param expires_at: Optional expiration time for the API key to be created
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
:param usage_limit_type: Optional credit limit reset interval. When set, the credit limit resets on this interval.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -344,8 +340,6 @@ class OAuth(BaseSDK):
code_challenge_method=code_challenge_method, code_challenge_method=code_challenge_method,
limit=limit, limit=limit,
expires_at=expires_at, expires_at=expires_at,
key_label=key_label,
usage_limit_type=usage_limit_type,
), ),
) )
@@ -445,8 +439,6 @@ class OAuth(BaseSDK):
] = None, ] = None,
limit: Optional[float] = None, limit: Optional[float] = None,
expires_at: OptionalNullable[datetime] = UNSET, expires_at: OptionalNullable[datetime] = UNSET,
key_label: Optional[str] = None,
usage_limit_type: Optional[operations.UsageLimitType] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -466,8 +458,6 @@ class OAuth(BaseSDK):
:param code_challenge_method: The method used to generate the code challenge :param code_challenge_method: The method used to generate the code challenge
:param limit: Credit limit for the API key to be created :param limit: Credit limit for the API key to be created
:param expires_at: Optional expiration time for the API key to be created :param expires_at: Optional expiration time for the API key to be created
:param key_label: Optional custom label for the API key. Defaults to the app name if not provided.
:param usage_limit_type: Optional credit limit reset interval. When set, the credit limit resets on this interval.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -492,8 +482,6 @@ class OAuth(BaseSDK):
code_challenge_method=code_challenge_method, code_challenge_method=code_challenge_method,
limit=limit, limit=limit,
expires_at=expires_at, expires_at=expires_at,
key_label=key_label,
usage_limit_type=usage_limit_type,
), ),
) )
-3
View File
@@ -58,7 +58,6 @@ if TYPE_CHECKING:
CreateAuthKeysCodeRequestTypedDict, CreateAuthKeysCodeRequestTypedDict,
CreateAuthKeysCodeResponse, CreateAuthKeysCodeResponse,
CreateAuthKeysCodeResponseTypedDict, CreateAuthKeysCodeResponseTypedDict,
UsageLimitType,
) )
from .createcoinbasecharge import ( from .createcoinbasecharge import (
CallData, CallData,
@@ -708,7 +707,6 @@ __all__ = [
"UpdateKeysResponse", "UpdateKeysResponse",
"UpdateKeysResponseTypedDict", "UpdateKeysResponseTypedDict",
"Usage", "Usage",
"UsageLimitType",
"UsageTypedDict", "UsageTypedDict",
"Web3Data", "Web3Data",
"Web3DataTypedDict", "Web3DataTypedDict",
@@ -758,7 +756,6 @@ _dynamic_imports: dict[str, str] = {
"CreateAuthKeysCodeRequestTypedDict": ".createauthkeyscode", "CreateAuthKeysCodeRequestTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeResponse": ".createauthkeyscode", "CreateAuthKeysCodeResponse": ".createauthkeyscode",
"CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode", "CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
"UsageLimitType": ".createauthkeyscode",
"CallData": ".createcoinbasecharge", "CallData": ".createcoinbasecharge",
"CallDataTypedDict": ".createcoinbasecharge", "CallDataTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeData": ".createcoinbasecharge", "CreateCoinbaseChargeData": ".createcoinbasecharge",
@@ -66,17 +66,6 @@ CreateAuthKeysCodeCodeChallengeMethod = Union[
r"""The method used to generate the code challenge""" r"""The method used to generate the code challenge"""
UsageLimitType = Union[
Literal[
"daily",
"weekly",
"monthly",
],
UnrecognizedStr,
]
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict): class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
callback_url: str callback_url: str
r"""The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed.""" r"""The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed."""
@@ -88,10 +77,6 @@ class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
r"""Credit limit for the API key to be created""" r"""Credit limit for the API key to be created"""
expires_at: NotRequired[Nullable[datetime]] expires_at: NotRequired[Nullable[datetime]]
r"""Optional expiration time for the API key to be created""" r"""Optional expiration time for the API key to be created"""
key_label: NotRequired[str]
r"""Optional custom label for the API key. Defaults to the app name if not provided."""
usage_limit_type: NotRequired[UsageLimitType]
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
class CreateAuthKeysCodeRequestBody(BaseModel): class CreateAuthKeysCodeRequestBody(BaseModel):
@@ -113,14 +98,6 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
expires_at: OptionalNullable[datetime] = UNSET expires_at: OptionalNullable[datetime] = UNSET
r"""Optional expiration time for the API key to be created""" r"""Optional expiration time for the API key to be created"""
key_label: Optional[str] = None
r"""Optional custom label for the API key. Defaults to the app name if not provided."""
usage_limit_type: Annotated[
Optional[UsageLimitType], PlainValidator(validate_open_enum(False))
] = None
r"""Optional credit limit reset interval. When set, the credit limit resets on this interval."""
@model_serializer(mode="wrap") @model_serializer(mode="wrap")
def serialize_model(self, handler): def serialize_model(self, handler):
optional_fields = [ optional_fields = [
@@ -128,8 +105,6 @@ class CreateAuthKeysCodeRequestBody(BaseModel):
"code_challenge_method", "code_challenge_method",
"limit", "limit",
"expires_at", "expires_at",
"key_label",
"usage_limit_type",
] ]
nullable_fields = ["expires_at"] nullable_fields = ["expires_at"]
null_default_fields = [] null_default_fields = []
+3 -13
View File
@@ -137,10 +137,8 @@ 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 management key""" r"""Whether this is a provisioning 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]
@@ -189,16 +187,8 @@ 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_management_key: bool is_provisioning_key: bool
r"""Whether this is a management key""" r"""Whether this is a provisioning 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"""
@@ -161,7 +161,6 @@ ProviderName = Union[
"Inceptron", "Inceptron",
"InferenceNet", "InferenceNet",
"Infermatic", "Infermatic",
"Io Net",
"Inflection", "Inflection",
"Liquid", "Liquid",
"Mara", "Mara",
-14
View File
@@ -93,7 +93,6 @@ class Responses(BaseSDK):
] = None, ] = None,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[Union[components.Trace, components.TraceTypedDict]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -141,7 +140,6 @@ class Responses(BaseSDK):
:param plugins: Plugins you want to enable for this request, including their settings. :param plugins: Plugins you want to enable for this request, including their settings.
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -224,7 +222,6 @@ class Responses(BaseSDK):
] = None, ] = None,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[Union[components.Trace, components.TraceTypedDict]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -272,7 +269,6 @@ class Responses(BaseSDK):
:param plugins: Plugins you want to enable for this request, including their settings. :param plugins: Plugins you want to enable for this request, including their settings.
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -354,7 +350,6 @@ class Responses(BaseSDK):
] = None, ] = None,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[Union[components.Trace, components.TraceTypedDict]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -402,7 +397,6 @@ class Responses(BaseSDK):
:param plugins: Plugins you want to enable for this request, including their settings. :param plugins: Plugins you want to enable for this request, including their settings.
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -472,7 +466,6 @@ class Responses(BaseSDK):
), ),
user=user, user=user,
session_id=session_id, session_id=session_id,
trace=utils.get_pydantic_model(trace, Optional[components.Trace]),
), ),
) )
@@ -748,7 +741,6 @@ class Responses(BaseSDK):
] = None, ] = None,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[Union[components.Trace, components.TraceTypedDict]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -796,7 +788,6 @@ class Responses(BaseSDK):
:param plugins: Plugins you want to enable for this request, including their settings. :param plugins: Plugins you want to enable for this request, including their settings.
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -879,7 +870,6 @@ class Responses(BaseSDK):
] = None, ] = None,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[Union[components.Trace, components.TraceTypedDict]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -927,7 +917,6 @@ class Responses(BaseSDK):
:param plugins: Plugins you want to enable for this request, including their settings. :param plugins: Plugins you want to enable for this request, including their settings.
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1009,7 +998,6 @@ class Responses(BaseSDK):
] = None, ] = None,
user: Optional[str] = None, user: Optional[str] = None,
session_id: Optional[str] = None, session_id: Optional[str] = None,
trace: Optional[Union[components.Trace, components.TraceTypedDict]] = None,
retries: OptionalNullable[utils.RetryConfig] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET,
server_url: Optional[str] = None, server_url: Optional[str] = None,
timeout_ms: Optional[int] = None, timeout_ms: Optional[int] = None,
@@ -1057,7 +1045,6 @@ class Responses(BaseSDK):
:param plugins: Plugins you want to enable for this request, including their settings. :param plugins: Plugins you want to enable for this request, including their settings.
:param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
:param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
:param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
:param retries: Override the default retry configuration for this method :param retries: Override the default retry configuration for this method
:param server_url: Override the default server URL for this method :param server_url: Override the default server URL for this method
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -1127,7 +1114,6 @@ class Responses(BaseSDK):
), ),
user=user, user=user,
session_id=session_id, session_id=session_id,
trace=utils.get_pydantic_model(trace, Optional[components.Trace]),
), ),
) )
Generated
+1 -1
View File
@@ -211,7 +211,7 @@ wheels = [
[[package]] [[package]]
name = "openrouter" name = "openrouter"
version = "0.7.3" version = "0.2.0"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "httpcore" }, { name = "httpcore" },