Commits included in this export:

- 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
  - 4779741b6ba710b1299612b82e8544516bd9dd6a
  - 22083fcc8f58884d8212d6f3314b231c4ddd21cd
  - a925a620f97196d509e073a163caac053bd82316
  - 5c05d8829784601ffd151acef1a6978c266f913d
  - 6f4fff535fbf4274255c255ae23620b8e00e614f
  - ef358e96cb01e469b77d44683603a602b0813116
  - e6299b4ebfe5c2eed6c598771f0fd99f84555401
  - 24d3f0ee1c2aa19a62f7902836034080b9246813
  - 68922847c2969b773887310eb7aa9a814e199c5a
  - 729ee2338c39df22461526153e7f4ba868fd498e
  - e1074ff86fccf5e48406b7595298873106d3cc5a
  - 123bbdaf841d299162a82ee2573adfbb70a45b8f
  - ac457b8a8dad98fdf5ddcae8dd4711361cea3084
  - ea825199f4c59dd68fec01cf8d18a582963c9f25
  - 4d48e4f6bb936e785787314a965298da6b78fea0
  - 718729a573ee98893a4408d5a52ab4686661fe54
  - b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
This commit is contained in:
OpenRouter Team
2026-02-05 23:15:21 +00:00
parent 0c791b04d1
commit 1cad51abb6
247 changed files with 8079 additions and 4566 deletions
+322 -2
View File
@@ -7,6 +7,8 @@ import sys
if TYPE_CHECKING:
from .bulkassignkeystoguardrail import (
BulkAssignKeysToGuardrailGlobals,
BulkAssignKeysToGuardrailGlobalsTypedDict,
BulkAssignKeysToGuardrailRequest,
BulkAssignKeysToGuardrailRequestBody,
BulkAssignKeysToGuardrailRequestBodyTypedDict,
@@ -15,6 +17,8 @@ if TYPE_CHECKING:
BulkAssignKeysToGuardrailResponseTypedDict,
)
from .bulkassignmemberstoguardrail import (
BulkAssignMembersToGuardrailGlobals,
BulkAssignMembersToGuardrailGlobalsTypedDict,
BulkAssignMembersToGuardrailRequest,
BulkAssignMembersToGuardrailRequestBody,
BulkAssignMembersToGuardrailRequestBodyTypedDict,
@@ -23,6 +27,8 @@ if TYPE_CHECKING:
BulkAssignMembersToGuardrailResponseTypedDict,
)
from .bulkunassignkeysfromguardrail import (
BulkUnassignKeysFromGuardrailGlobals,
BulkUnassignKeysFromGuardrailGlobalsTypedDict,
BulkUnassignKeysFromGuardrailRequest,
BulkUnassignKeysFromGuardrailRequestBody,
BulkUnassignKeysFromGuardrailRequestBodyTypedDict,
@@ -31,6 +37,8 @@ if TYPE_CHECKING:
BulkUnassignKeysFromGuardrailResponseTypedDict,
)
from .bulkunassignmembersfromguardrail import (
BulkUnassignMembersFromGuardrailGlobals,
BulkUnassignMembersFromGuardrailGlobalsTypedDict,
BulkUnassignMembersFromGuardrailRequest,
BulkUnassignMembersFromGuardrailRequestBody,
BulkUnassignMembersFromGuardrailRequestBodyTypedDict,
@@ -42,7 +50,11 @@ if TYPE_CHECKING:
CreateAuthKeysCodeCodeChallengeMethod,
CreateAuthKeysCodeData,
CreateAuthKeysCodeDataTypedDict,
CreateAuthKeysCodeGlobals,
CreateAuthKeysCodeGlobalsTypedDict,
CreateAuthKeysCodeRequest,
CreateAuthKeysCodeRequestBody,
CreateAuthKeysCodeRequestBodyTypedDict,
CreateAuthKeysCodeRequestTypedDict,
CreateAuthKeysCodeResponse,
CreateAuthKeysCodeResponseTypedDict,
@@ -52,6 +64,10 @@ if TYPE_CHECKING:
CallDataTypedDict,
CreateCoinbaseChargeData,
CreateCoinbaseChargeDataTypedDict,
CreateCoinbaseChargeGlobals,
CreateCoinbaseChargeGlobalsTypedDict,
CreateCoinbaseChargeRequest,
CreateCoinbaseChargeRequestTypedDict,
CreateCoinbaseChargeResponse,
CreateCoinbaseChargeResponseTypedDict,
CreateCoinbaseChargeSecurity,
@@ -72,7 +88,11 @@ if TYPE_CHECKING:
ContentTypedDict,
CreateEmbeddingsData,
CreateEmbeddingsDataTypedDict,
CreateEmbeddingsGlobals,
CreateEmbeddingsGlobalsTypedDict,
CreateEmbeddingsRequest,
CreateEmbeddingsRequestBody,
CreateEmbeddingsRequestBodyTypedDict,
CreateEmbeddingsRequestTypedDict,
CreateEmbeddingsResponse,
CreateEmbeddingsResponseBody,
@@ -97,7 +117,11 @@ if TYPE_CHECKING:
from .createguardrail import (
CreateGuardrailData,
CreateGuardrailDataTypedDict,
CreateGuardrailGlobals,
CreateGuardrailGlobalsTypedDict,
CreateGuardrailRequest,
CreateGuardrailRequestBody,
CreateGuardrailRequestBodyTypedDict,
CreateGuardrailRequestTypedDict,
CreateGuardrailResetIntervalRequest,
CreateGuardrailResetIntervalResponse,
@@ -107,25 +131,37 @@ if TYPE_CHECKING:
from .createkeys import (
CreateKeysData,
CreateKeysDataTypedDict,
CreateKeysGlobals,
CreateKeysGlobalsTypedDict,
CreateKeysLimitReset,
CreateKeysRequest,
CreateKeysRequestBody,
CreateKeysRequestBodyTypedDict,
CreateKeysRequestTypedDict,
CreateKeysResponse,
CreateKeysResponseTypedDict,
)
from .createresponses import (
CreateResponsesGlobals,
CreateResponsesGlobalsTypedDict,
CreateResponsesRequest,
CreateResponsesRequestTypedDict,
CreateResponsesResponse,
CreateResponsesResponseBody,
CreateResponsesResponseBodyTypedDict,
CreateResponsesResponseTypedDict,
)
from .deleteguardrail import (
DeleteGuardrailGlobals,
DeleteGuardrailGlobalsTypedDict,
DeleteGuardrailRequest,
DeleteGuardrailRequestTypedDict,
DeleteGuardrailResponse,
DeleteGuardrailResponseTypedDict,
)
from .deletekeys import (
DeleteKeysGlobals,
DeleteKeysGlobalsTypedDict,
DeleteKeysRequest,
DeleteKeysRequestTypedDict,
DeleteKeysResponse,
@@ -133,7 +169,11 @@ if TYPE_CHECKING:
)
from .exchangeauthcodeforapikey import (
ExchangeAuthCodeForAPIKeyCodeChallengeMethod,
ExchangeAuthCodeForAPIKeyGlobals,
ExchangeAuthCodeForAPIKeyGlobalsTypedDict,
ExchangeAuthCodeForAPIKeyRequest,
ExchangeAuthCodeForAPIKeyRequestBody,
ExchangeAuthCodeForAPIKeyRequestBodyTypedDict,
ExchangeAuthCodeForAPIKeyRequestTypedDict,
ExchangeAuthCodeForAPIKeyResponse,
ExchangeAuthCodeForAPIKeyResponseTypedDict,
@@ -141,12 +181,20 @@ if TYPE_CHECKING:
from .getcredits import (
GetCreditsData,
GetCreditsDataTypedDict,
GetCreditsGlobals,
GetCreditsGlobalsTypedDict,
GetCreditsRequest,
GetCreditsRequestTypedDict,
GetCreditsResponse,
GetCreditsResponseTypedDict,
)
from .getcurrentkey import (
GetCurrentKeyData,
GetCurrentKeyDataTypedDict,
GetCurrentKeyGlobals,
GetCurrentKeyGlobalsTypedDict,
GetCurrentKeyRequest,
GetCurrentKeyRequestTypedDict,
GetCurrentKeyResponse,
GetCurrentKeyResponseTypedDict,
RateLimit,
@@ -156,14 +204,21 @@ if TYPE_CHECKING:
APIType,
GetGenerationData,
GetGenerationDataTypedDict,
GetGenerationGlobals,
GetGenerationGlobalsTypedDict,
GetGenerationRequest,
GetGenerationRequestTypedDict,
GetGenerationResponse,
GetGenerationResponseTypedDict,
ProviderName,
ProviderResponse,
ProviderResponseTypedDict,
)
from .getguardrail import (
GetGuardrailData,
GetGuardrailDataTypedDict,
GetGuardrailGlobals,
GetGuardrailGlobalsTypedDict,
GetGuardrailRequest,
GetGuardrailRequestTypedDict,
GetGuardrailResetInterval,
@@ -173,13 +228,23 @@ if TYPE_CHECKING:
from .getkey import (
GetKeyData,
GetKeyDataTypedDict,
GetKeyGlobals,
GetKeyGlobalsTypedDict,
GetKeyRequest,
GetKeyRequestTypedDict,
GetKeyResponse,
GetKeyResponseTypedDict,
)
from .getmodels import Category, GetModelsRequest, GetModelsRequestTypedDict
from .getmodels import (
Category,
GetModelsGlobals,
GetModelsGlobalsTypedDict,
GetModelsRequest,
GetModelsRequestTypedDict,
)
from .getuseractivity import (
GetUserActivityGlobals,
GetUserActivityGlobalsTypedDict,
GetUserActivityRequest,
GetUserActivityRequestTypedDict,
GetUserActivityResponse,
@@ -188,24 +253,40 @@ if TYPE_CHECKING:
from .list import (
ListData,
ListDataTypedDict,
ListGlobals,
ListGlobalsTypedDict,
ListRequest,
ListRequestTypedDict,
ListResponse,
ListResponseTypedDict,
)
from .listembeddingsmodels import (
ListEmbeddingsModelsGlobals,
ListEmbeddingsModelsGlobalsTypedDict,
ListEmbeddingsModelsRequest,
ListEmbeddingsModelsRequestTypedDict,
)
from .listendpoints import (
ListEndpointsGlobals,
ListEndpointsGlobalsTypedDict,
ListEndpointsRequest,
ListEndpointsRequestTypedDict,
ListEndpointsResponse,
ListEndpointsResponseTypedDict,
)
from .listendpointszdr import (
ListEndpointsZdrGlobals,
ListEndpointsZdrGlobalsTypedDict,
ListEndpointsZdrRequest,
ListEndpointsZdrRequestTypedDict,
ListEndpointsZdrResponse,
ListEndpointsZdrResponseTypedDict,
)
from .listguardrailkeyassignments import (
ListGuardrailKeyAssignmentsData,
ListGuardrailKeyAssignmentsDataTypedDict,
ListGuardrailKeyAssignmentsGlobals,
ListGuardrailKeyAssignmentsGlobalsTypedDict,
ListGuardrailKeyAssignmentsRequest,
ListGuardrailKeyAssignmentsRequestTypedDict,
ListGuardrailKeyAssignmentsResponse,
@@ -214,6 +295,8 @@ if TYPE_CHECKING:
from .listguardrailmemberassignments import (
ListGuardrailMemberAssignmentsData,
ListGuardrailMemberAssignmentsDataTypedDict,
ListGuardrailMemberAssignmentsGlobals,
ListGuardrailMemberAssignmentsGlobalsTypedDict,
ListGuardrailMemberAssignmentsRequest,
ListGuardrailMemberAssignmentsRequestTypedDict,
ListGuardrailMemberAssignmentsResponse,
@@ -222,6 +305,8 @@ if TYPE_CHECKING:
from .listguardrails import (
ListGuardrailsData,
ListGuardrailsDataTypedDict,
ListGuardrailsGlobals,
ListGuardrailsGlobalsTypedDict,
ListGuardrailsRequest,
ListGuardrailsRequestTypedDict,
ListGuardrailsResetInterval,
@@ -231,6 +316,8 @@ if TYPE_CHECKING:
from .listkeyassignments import (
ListKeyAssignmentsData,
ListKeyAssignmentsDataTypedDict,
ListKeyAssignmentsGlobals,
ListKeyAssignmentsGlobalsTypedDict,
ListKeyAssignmentsRequest,
ListKeyAssignmentsRequestTypedDict,
ListKeyAssignmentsResponse,
@@ -239,25 +326,50 @@ if TYPE_CHECKING:
from .listmemberassignments import (
ListMemberAssignmentsData,
ListMemberAssignmentsDataTypedDict,
ListMemberAssignmentsGlobals,
ListMemberAssignmentsGlobalsTypedDict,
ListMemberAssignmentsRequest,
ListMemberAssignmentsRequestTypedDict,
ListMemberAssignmentsResponse,
ListMemberAssignmentsResponseTypedDict,
)
from .listmodelsuser import ListModelsUserSecurity, ListModelsUserSecurityTypedDict
from .listmodelscount import (
ListModelsCountGlobals,
ListModelsCountGlobalsTypedDict,
ListModelsCountRequest,
ListModelsCountRequestTypedDict,
)
from .listmodelsuser import (
ListModelsUserGlobals,
ListModelsUserGlobalsTypedDict,
ListModelsUserRequest,
ListModelsUserRequestTypedDict,
ListModelsUserSecurity,
ListModelsUserSecurityTypedDict,
)
from .listproviders import (
ListProvidersData,
ListProvidersDataTypedDict,
ListProvidersGlobals,
ListProvidersGlobalsTypedDict,
ListProvidersRequest,
ListProvidersRequestTypedDict,
ListProvidersResponse,
ListProvidersResponseTypedDict,
)
from .sendchatcompletionrequest import (
SendChatCompletionRequestGlobals,
SendChatCompletionRequestGlobalsTypedDict,
SendChatCompletionRequestRequest,
SendChatCompletionRequestRequestTypedDict,
SendChatCompletionRequestResponse,
SendChatCompletionRequestResponseTypedDict,
)
from .updateguardrail import (
UpdateGuardrailData,
UpdateGuardrailDataTypedDict,
UpdateGuardrailGlobals,
UpdateGuardrailGlobalsTypedDict,
UpdateGuardrailRequest,
UpdateGuardrailRequestBody,
UpdateGuardrailRequestBodyTypedDict,
@@ -270,6 +382,8 @@ if TYPE_CHECKING:
from .updatekeys import (
UpdateKeysData,
UpdateKeysDataTypedDict,
UpdateKeysGlobals,
UpdateKeysGlobalsTypedDict,
UpdateKeysLimitReset,
UpdateKeysRequest,
UpdateKeysRequestBody,
@@ -281,24 +395,32 @@ if TYPE_CHECKING:
__all__ = [
"APIType",
"BulkAssignKeysToGuardrailGlobals",
"BulkAssignKeysToGuardrailGlobalsTypedDict",
"BulkAssignKeysToGuardrailRequest",
"BulkAssignKeysToGuardrailRequestBody",
"BulkAssignKeysToGuardrailRequestBodyTypedDict",
"BulkAssignKeysToGuardrailRequestTypedDict",
"BulkAssignKeysToGuardrailResponse",
"BulkAssignKeysToGuardrailResponseTypedDict",
"BulkAssignMembersToGuardrailGlobals",
"BulkAssignMembersToGuardrailGlobalsTypedDict",
"BulkAssignMembersToGuardrailRequest",
"BulkAssignMembersToGuardrailRequestBody",
"BulkAssignMembersToGuardrailRequestBodyTypedDict",
"BulkAssignMembersToGuardrailRequestTypedDict",
"BulkAssignMembersToGuardrailResponse",
"BulkAssignMembersToGuardrailResponseTypedDict",
"BulkUnassignKeysFromGuardrailGlobals",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict",
"BulkUnassignKeysFromGuardrailRequest",
"BulkUnassignKeysFromGuardrailRequestBody",
"BulkUnassignKeysFromGuardrailRequestBodyTypedDict",
"BulkUnassignKeysFromGuardrailRequestTypedDict",
"BulkUnassignKeysFromGuardrailResponse",
"BulkUnassignKeysFromGuardrailResponseTypedDict",
"BulkUnassignMembersFromGuardrailGlobals",
"BulkUnassignMembersFromGuardrailGlobalsTypedDict",
"BulkUnassignMembersFromGuardrailRequest",
"BulkUnassignMembersFromGuardrailRequestBody",
"BulkUnassignMembersFromGuardrailRequestBodyTypedDict",
@@ -317,19 +439,31 @@ __all__ = [
"CreateAuthKeysCodeCodeChallengeMethod",
"CreateAuthKeysCodeData",
"CreateAuthKeysCodeDataTypedDict",
"CreateAuthKeysCodeGlobals",
"CreateAuthKeysCodeGlobalsTypedDict",
"CreateAuthKeysCodeRequest",
"CreateAuthKeysCodeRequestBody",
"CreateAuthKeysCodeRequestBodyTypedDict",
"CreateAuthKeysCodeRequestTypedDict",
"CreateAuthKeysCodeResponse",
"CreateAuthKeysCodeResponseTypedDict",
"CreateCoinbaseChargeData",
"CreateCoinbaseChargeDataTypedDict",
"CreateCoinbaseChargeGlobals",
"CreateCoinbaseChargeGlobalsTypedDict",
"CreateCoinbaseChargeRequest",
"CreateCoinbaseChargeRequestTypedDict",
"CreateCoinbaseChargeResponse",
"CreateCoinbaseChargeResponseTypedDict",
"CreateCoinbaseChargeSecurity",
"CreateCoinbaseChargeSecurityTypedDict",
"CreateEmbeddingsData",
"CreateEmbeddingsDataTypedDict",
"CreateEmbeddingsGlobals",
"CreateEmbeddingsGlobalsTypedDict",
"CreateEmbeddingsRequest",
"CreateEmbeddingsRequestBody",
"CreateEmbeddingsRequestBodyTypedDict",
"CreateEmbeddingsRequestTypedDict",
"CreateEmbeddingsResponse",
"CreateEmbeddingsResponseBody",
@@ -337,7 +471,11 @@ __all__ = [
"CreateEmbeddingsResponseTypedDict",
"CreateGuardrailData",
"CreateGuardrailDataTypedDict",
"CreateGuardrailGlobals",
"CreateGuardrailGlobalsTypedDict",
"CreateGuardrailRequest",
"CreateGuardrailRequestBody",
"CreateGuardrailRequestBodyTypedDict",
"CreateGuardrailRequestTypedDict",
"CreateGuardrailResetIntervalRequest",
"CreateGuardrailResetIntervalResponse",
@@ -345,19 +483,31 @@ __all__ = [
"CreateGuardrailResponseTypedDict",
"CreateKeysData",
"CreateKeysDataTypedDict",
"CreateKeysGlobals",
"CreateKeysGlobalsTypedDict",
"CreateKeysLimitReset",
"CreateKeysRequest",
"CreateKeysRequestBody",
"CreateKeysRequestBodyTypedDict",
"CreateKeysRequestTypedDict",
"CreateKeysResponse",
"CreateKeysResponseTypedDict",
"CreateResponsesGlobals",
"CreateResponsesGlobalsTypedDict",
"CreateResponsesRequest",
"CreateResponsesRequestTypedDict",
"CreateResponsesResponse",
"CreateResponsesResponseBody",
"CreateResponsesResponseBodyTypedDict",
"CreateResponsesResponseTypedDict",
"DeleteGuardrailGlobals",
"DeleteGuardrailGlobalsTypedDict",
"DeleteGuardrailRequest",
"DeleteGuardrailRequestTypedDict",
"DeleteGuardrailResponse",
"DeleteGuardrailResponseTypedDict",
"DeleteKeysGlobals",
"DeleteKeysGlobalsTypedDict",
"DeleteKeysRequest",
"DeleteKeysRequestTypedDict",
"DeleteKeysResponse",
@@ -366,26 +516,42 @@ __all__ = [
"EmbeddingTypedDict",
"EncodingFormat",
"ExchangeAuthCodeForAPIKeyCodeChallengeMethod",
"ExchangeAuthCodeForAPIKeyGlobals",
"ExchangeAuthCodeForAPIKeyGlobalsTypedDict",
"ExchangeAuthCodeForAPIKeyRequest",
"ExchangeAuthCodeForAPIKeyRequestBody",
"ExchangeAuthCodeForAPIKeyRequestBodyTypedDict",
"ExchangeAuthCodeForAPIKeyRequestTypedDict",
"ExchangeAuthCodeForAPIKeyResponse",
"ExchangeAuthCodeForAPIKeyResponseTypedDict",
"GetCreditsData",
"GetCreditsDataTypedDict",
"GetCreditsGlobals",
"GetCreditsGlobalsTypedDict",
"GetCreditsRequest",
"GetCreditsRequestTypedDict",
"GetCreditsResponse",
"GetCreditsResponseTypedDict",
"GetCurrentKeyData",
"GetCurrentKeyDataTypedDict",
"GetCurrentKeyGlobals",
"GetCurrentKeyGlobalsTypedDict",
"GetCurrentKeyRequest",
"GetCurrentKeyRequestTypedDict",
"GetCurrentKeyResponse",
"GetCurrentKeyResponseTypedDict",
"GetGenerationData",
"GetGenerationDataTypedDict",
"GetGenerationGlobals",
"GetGenerationGlobalsTypedDict",
"GetGenerationRequest",
"GetGenerationRequestTypedDict",
"GetGenerationResponse",
"GetGenerationResponseTypedDict",
"GetGuardrailData",
"GetGuardrailDataTypedDict",
"GetGuardrailGlobals",
"GetGuardrailGlobalsTypedDict",
"GetGuardrailRequest",
"GetGuardrailRequestTypedDict",
"GetGuardrailResetInterval",
@@ -393,12 +559,18 @@ __all__ = [
"GetGuardrailResponseTypedDict",
"GetKeyData",
"GetKeyDataTypedDict",
"GetKeyGlobals",
"GetKeyGlobalsTypedDict",
"GetKeyRequest",
"GetKeyRequestTypedDict",
"GetKeyResponse",
"GetKeyResponseTypedDict",
"GetModelsGlobals",
"GetModelsGlobalsTypedDict",
"GetModelsRequest",
"GetModelsRequestTypedDict",
"GetUserActivityGlobals",
"GetUserActivityGlobalsTypedDict",
"GetUserActivityRequest",
"GetUserActivityRequestTypedDict",
"GetUserActivityResponse",
@@ -411,26 +583,44 @@ __all__ = [
"InputUnionTypedDict",
"ListData",
"ListDataTypedDict",
"ListEmbeddingsModelsGlobals",
"ListEmbeddingsModelsGlobalsTypedDict",
"ListEmbeddingsModelsRequest",
"ListEmbeddingsModelsRequestTypedDict",
"ListEndpointsGlobals",
"ListEndpointsGlobalsTypedDict",
"ListEndpointsRequest",
"ListEndpointsRequestTypedDict",
"ListEndpointsResponse",
"ListEndpointsResponseTypedDict",
"ListEndpointsZdrGlobals",
"ListEndpointsZdrGlobalsTypedDict",
"ListEndpointsZdrRequest",
"ListEndpointsZdrRequestTypedDict",
"ListEndpointsZdrResponse",
"ListEndpointsZdrResponseTypedDict",
"ListGlobals",
"ListGlobalsTypedDict",
"ListGuardrailKeyAssignmentsData",
"ListGuardrailKeyAssignmentsDataTypedDict",
"ListGuardrailKeyAssignmentsGlobals",
"ListGuardrailKeyAssignmentsGlobalsTypedDict",
"ListGuardrailKeyAssignmentsRequest",
"ListGuardrailKeyAssignmentsRequestTypedDict",
"ListGuardrailKeyAssignmentsResponse",
"ListGuardrailKeyAssignmentsResponseTypedDict",
"ListGuardrailMemberAssignmentsData",
"ListGuardrailMemberAssignmentsDataTypedDict",
"ListGuardrailMemberAssignmentsGlobals",
"ListGuardrailMemberAssignmentsGlobalsTypedDict",
"ListGuardrailMemberAssignmentsRequest",
"ListGuardrailMemberAssignmentsRequestTypedDict",
"ListGuardrailMemberAssignmentsResponse",
"ListGuardrailMemberAssignmentsResponseTypedDict",
"ListGuardrailsData",
"ListGuardrailsDataTypedDict",
"ListGuardrailsGlobals",
"ListGuardrailsGlobalsTypedDict",
"ListGuardrailsRequest",
"ListGuardrailsRequestTypedDict",
"ListGuardrailsResetInterval",
@@ -438,20 +628,36 @@ __all__ = [
"ListGuardrailsResponseTypedDict",
"ListKeyAssignmentsData",
"ListKeyAssignmentsDataTypedDict",
"ListKeyAssignmentsGlobals",
"ListKeyAssignmentsGlobalsTypedDict",
"ListKeyAssignmentsRequest",
"ListKeyAssignmentsRequestTypedDict",
"ListKeyAssignmentsResponse",
"ListKeyAssignmentsResponseTypedDict",
"ListMemberAssignmentsData",
"ListMemberAssignmentsDataTypedDict",
"ListMemberAssignmentsGlobals",
"ListMemberAssignmentsGlobalsTypedDict",
"ListMemberAssignmentsRequest",
"ListMemberAssignmentsRequestTypedDict",
"ListMemberAssignmentsResponse",
"ListMemberAssignmentsResponseTypedDict",
"ListModelsCountGlobals",
"ListModelsCountGlobalsTypedDict",
"ListModelsCountRequest",
"ListModelsCountRequestTypedDict",
"ListModelsUserGlobals",
"ListModelsUserGlobalsTypedDict",
"ListModelsUserRequest",
"ListModelsUserRequestTypedDict",
"ListModelsUserSecurity",
"ListModelsUserSecurityTypedDict",
"ListProvidersData",
"ListProvidersDataTypedDict",
"ListProvidersGlobals",
"ListProvidersGlobalsTypedDict",
"ListProvidersRequest",
"ListProvidersRequestTypedDict",
"ListProvidersResponse",
"ListProvidersResponseTypedDict",
"ListRequest",
@@ -462,8 +668,15 @@ __all__ = [
"MetadataTypedDict",
"Object",
"ObjectEmbedding",
"ProviderName",
"ProviderResponse",
"ProviderResponseTypedDict",
"RateLimit",
"RateLimitTypedDict",
"SendChatCompletionRequestGlobals",
"SendChatCompletionRequestGlobalsTypedDict",
"SendChatCompletionRequestRequest",
"SendChatCompletionRequestRequestTypedDict",
"SendChatCompletionRequestResponse",
"SendChatCompletionRequestResponseTypedDict",
"TransferIntent",
@@ -472,6 +685,8 @@ __all__ = [
"TypeText",
"UpdateGuardrailData",
"UpdateGuardrailDataTypedDict",
"UpdateGuardrailGlobals",
"UpdateGuardrailGlobalsTypedDict",
"UpdateGuardrailRequest",
"UpdateGuardrailRequestBody",
"UpdateGuardrailRequestBodyTypedDict",
@@ -482,6 +697,8 @@ __all__ = [
"UpdateGuardrailResponseTypedDict",
"UpdateKeysData",
"UpdateKeysDataTypedDict",
"UpdateKeysGlobals",
"UpdateKeysGlobalsTypedDict",
"UpdateKeysLimitReset",
"UpdateKeysRequest",
"UpdateKeysRequestBody",
@@ -496,24 +713,32 @@ __all__ = [
]
_dynamic_imports: dict[str, str] = {
"BulkAssignKeysToGuardrailGlobals": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailGlobalsTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequest": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequestBody": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequestBodyTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailRequestTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailResponse": ".bulkassignkeystoguardrail",
"BulkAssignKeysToGuardrailResponseTypedDict": ".bulkassignkeystoguardrail",
"BulkAssignMembersToGuardrailGlobals": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailGlobalsTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequest": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequestBody": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequestBodyTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailRequestTypedDict": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailResponse": ".bulkassignmemberstoguardrail",
"BulkAssignMembersToGuardrailResponseTypedDict": ".bulkassignmemberstoguardrail",
"BulkUnassignKeysFromGuardrailGlobals": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailGlobalsTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequest": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequestBody": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequestBodyTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailRequestTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailResponse": ".bulkunassignkeysfromguardrail",
"BulkUnassignKeysFromGuardrailResponseTypedDict": ".bulkunassignkeysfromguardrail",
"BulkUnassignMembersFromGuardrailGlobals": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailGlobalsTypedDict": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequest": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequestBody": ".bulkunassignmembersfromguardrail",
"BulkUnassignMembersFromGuardrailRequestBodyTypedDict": ".bulkunassignmembersfromguardrail",
@@ -523,7 +748,11 @@ _dynamic_imports: dict[str, str] = {
"CreateAuthKeysCodeCodeChallengeMethod": ".createauthkeyscode",
"CreateAuthKeysCodeData": ".createauthkeyscode",
"CreateAuthKeysCodeDataTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeGlobals": ".createauthkeyscode",
"CreateAuthKeysCodeGlobalsTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeRequest": ".createauthkeyscode",
"CreateAuthKeysCodeRequestBody": ".createauthkeyscode",
"CreateAuthKeysCodeRequestBodyTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeRequestTypedDict": ".createauthkeyscode",
"CreateAuthKeysCodeResponse": ".createauthkeyscode",
"CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
@@ -531,6 +760,10 @@ _dynamic_imports: dict[str, str] = {
"CallDataTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeData": ".createcoinbasecharge",
"CreateCoinbaseChargeDataTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeGlobals": ".createcoinbasecharge",
"CreateCoinbaseChargeGlobalsTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeRequest": ".createcoinbasecharge",
"CreateCoinbaseChargeRequestTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeResponse": ".createcoinbasecharge",
"CreateCoinbaseChargeResponseTypedDict": ".createcoinbasecharge",
"CreateCoinbaseChargeSecurity": ".createcoinbasecharge",
@@ -549,7 +782,11 @@ _dynamic_imports: dict[str, str] = {
"ContentTypedDict": ".createembeddings",
"CreateEmbeddingsData": ".createembeddings",
"CreateEmbeddingsDataTypedDict": ".createembeddings",
"CreateEmbeddingsGlobals": ".createembeddings",
"CreateEmbeddingsGlobalsTypedDict": ".createembeddings",
"CreateEmbeddingsRequest": ".createembeddings",
"CreateEmbeddingsRequestBody": ".createembeddings",
"CreateEmbeddingsRequestBodyTypedDict": ".createembeddings",
"CreateEmbeddingsRequestTypedDict": ".createembeddings",
"CreateEmbeddingsResponse": ".createembeddings",
"CreateEmbeddingsResponseBody": ".createembeddings",
@@ -572,7 +809,11 @@ _dynamic_imports: dict[str, str] = {
"UsageTypedDict": ".createembeddings",
"CreateGuardrailData": ".createguardrail",
"CreateGuardrailDataTypedDict": ".createguardrail",
"CreateGuardrailGlobals": ".createguardrail",
"CreateGuardrailGlobalsTypedDict": ".createguardrail",
"CreateGuardrailRequest": ".createguardrail",
"CreateGuardrailRequestBody": ".createguardrail",
"CreateGuardrailRequestBodyTypedDict": ".createguardrail",
"CreateGuardrailRequestTypedDict": ".createguardrail",
"CreateGuardrailResetIntervalRequest": ".createguardrail",
"CreateGuardrailResetIntervalResponse": ".createguardrail",
@@ -580,34 +821,58 @@ _dynamic_imports: dict[str, str] = {
"CreateGuardrailResponseTypedDict": ".createguardrail",
"CreateKeysData": ".createkeys",
"CreateKeysDataTypedDict": ".createkeys",
"CreateKeysGlobals": ".createkeys",
"CreateKeysGlobalsTypedDict": ".createkeys",
"CreateKeysLimitReset": ".createkeys",
"CreateKeysRequest": ".createkeys",
"CreateKeysRequestBody": ".createkeys",
"CreateKeysRequestBodyTypedDict": ".createkeys",
"CreateKeysRequestTypedDict": ".createkeys",
"CreateKeysResponse": ".createkeys",
"CreateKeysResponseTypedDict": ".createkeys",
"CreateResponsesGlobals": ".createresponses",
"CreateResponsesGlobalsTypedDict": ".createresponses",
"CreateResponsesRequest": ".createresponses",
"CreateResponsesRequestTypedDict": ".createresponses",
"CreateResponsesResponse": ".createresponses",
"CreateResponsesResponseBody": ".createresponses",
"CreateResponsesResponseBodyTypedDict": ".createresponses",
"CreateResponsesResponseTypedDict": ".createresponses",
"DeleteGuardrailGlobals": ".deleteguardrail",
"DeleteGuardrailGlobalsTypedDict": ".deleteguardrail",
"DeleteGuardrailRequest": ".deleteguardrail",
"DeleteGuardrailRequestTypedDict": ".deleteguardrail",
"DeleteGuardrailResponse": ".deleteguardrail",
"DeleteGuardrailResponseTypedDict": ".deleteguardrail",
"DeleteKeysGlobals": ".deletekeys",
"DeleteKeysGlobalsTypedDict": ".deletekeys",
"DeleteKeysRequest": ".deletekeys",
"DeleteKeysRequestTypedDict": ".deletekeys",
"DeleteKeysResponse": ".deletekeys",
"DeleteKeysResponseTypedDict": ".deletekeys",
"ExchangeAuthCodeForAPIKeyCodeChallengeMethod": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyGlobals": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyGlobalsTypedDict": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyRequest": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyRequestBody": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyRequestBodyTypedDict": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyRequestTypedDict": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyResponse": ".exchangeauthcodeforapikey",
"ExchangeAuthCodeForAPIKeyResponseTypedDict": ".exchangeauthcodeforapikey",
"GetCreditsData": ".getcredits",
"GetCreditsDataTypedDict": ".getcredits",
"GetCreditsGlobals": ".getcredits",
"GetCreditsGlobalsTypedDict": ".getcredits",
"GetCreditsRequest": ".getcredits",
"GetCreditsRequestTypedDict": ".getcredits",
"GetCreditsResponse": ".getcredits",
"GetCreditsResponseTypedDict": ".getcredits",
"GetCurrentKeyData": ".getcurrentkey",
"GetCurrentKeyDataTypedDict": ".getcurrentkey",
"GetCurrentKeyGlobals": ".getcurrentkey",
"GetCurrentKeyGlobalsTypedDict": ".getcurrentkey",
"GetCurrentKeyRequest": ".getcurrentkey",
"GetCurrentKeyRequestTypedDict": ".getcurrentkey",
"GetCurrentKeyResponse": ".getcurrentkey",
"GetCurrentKeyResponseTypedDict": ".getcurrentkey",
"RateLimit": ".getcurrentkey",
@@ -615,12 +880,19 @@ _dynamic_imports: dict[str, str] = {
"APIType": ".getgeneration",
"GetGenerationData": ".getgeneration",
"GetGenerationDataTypedDict": ".getgeneration",
"GetGenerationGlobals": ".getgeneration",
"GetGenerationGlobalsTypedDict": ".getgeneration",
"GetGenerationRequest": ".getgeneration",
"GetGenerationRequestTypedDict": ".getgeneration",
"GetGenerationResponse": ".getgeneration",
"GetGenerationResponseTypedDict": ".getgeneration",
"ProviderName": ".getgeneration",
"ProviderResponse": ".getgeneration",
"ProviderResponseTypedDict": ".getgeneration",
"GetGuardrailData": ".getguardrail",
"GetGuardrailDataTypedDict": ".getguardrail",
"GetGuardrailGlobals": ".getguardrail",
"GetGuardrailGlobalsTypedDict": ".getguardrail",
"GetGuardrailRequest": ".getguardrail",
"GetGuardrailRequestTypedDict": ".getguardrail",
"GetGuardrailResetInterval": ".getguardrail",
@@ -628,43 +900,67 @@ _dynamic_imports: dict[str, str] = {
"GetGuardrailResponseTypedDict": ".getguardrail",
"GetKeyData": ".getkey",
"GetKeyDataTypedDict": ".getkey",
"GetKeyGlobals": ".getkey",
"GetKeyGlobalsTypedDict": ".getkey",
"GetKeyRequest": ".getkey",
"GetKeyRequestTypedDict": ".getkey",
"GetKeyResponse": ".getkey",
"GetKeyResponseTypedDict": ".getkey",
"Category": ".getmodels",
"GetModelsGlobals": ".getmodels",
"GetModelsGlobalsTypedDict": ".getmodels",
"GetModelsRequest": ".getmodels",
"GetModelsRequestTypedDict": ".getmodels",
"GetUserActivityGlobals": ".getuseractivity",
"GetUserActivityGlobalsTypedDict": ".getuseractivity",
"GetUserActivityRequest": ".getuseractivity",
"GetUserActivityRequestTypedDict": ".getuseractivity",
"GetUserActivityResponse": ".getuseractivity",
"GetUserActivityResponseTypedDict": ".getuseractivity",
"ListData": ".list",
"ListDataTypedDict": ".list",
"ListGlobals": ".list",
"ListGlobalsTypedDict": ".list",
"ListRequest": ".list",
"ListRequestTypedDict": ".list",
"ListResponse": ".list",
"ListResponseTypedDict": ".list",
"ListEmbeddingsModelsGlobals": ".listembeddingsmodels",
"ListEmbeddingsModelsGlobalsTypedDict": ".listembeddingsmodels",
"ListEmbeddingsModelsRequest": ".listembeddingsmodels",
"ListEmbeddingsModelsRequestTypedDict": ".listembeddingsmodels",
"ListEndpointsGlobals": ".listendpoints",
"ListEndpointsGlobalsTypedDict": ".listendpoints",
"ListEndpointsRequest": ".listendpoints",
"ListEndpointsRequestTypedDict": ".listendpoints",
"ListEndpointsResponse": ".listendpoints",
"ListEndpointsResponseTypedDict": ".listendpoints",
"ListEndpointsZdrGlobals": ".listendpointszdr",
"ListEndpointsZdrGlobalsTypedDict": ".listendpointszdr",
"ListEndpointsZdrRequest": ".listendpointszdr",
"ListEndpointsZdrRequestTypedDict": ".listendpointszdr",
"ListEndpointsZdrResponse": ".listendpointszdr",
"ListEndpointsZdrResponseTypedDict": ".listendpointszdr",
"ListGuardrailKeyAssignmentsData": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsDataTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsGlobals": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsGlobalsTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsRequest": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsRequestTypedDict": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsResponse": ".listguardrailkeyassignments",
"ListGuardrailKeyAssignmentsResponseTypedDict": ".listguardrailkeyassignments",
"ListGuardrailMemberAssignmentsData": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsDataTypedDict": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsGlobals": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsGlobalsTypedDict": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsRequest": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsRequestTypedDict": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsResponse": ".listguardrailmemberassignments",
"ListGuardrailMemberAssignmentsResponseTypedDict": ".listguardrailmemberassignments",
"ListGuardrailsData": ".listguardrails",
"ListGuardrailsDataTypedDict": ".listguardrails",
"ListGuardrailsGlobals": ".listguardrails",
"ListGuardrailsGlobalsTypedDict": ".listguardrails",
"ListGuardrailsRequest": ".listguardrails",
"ListGuardrailsRequestTypedDict": ".listguardrails",
"ListGuardrailsResetInterval": ".listguardrails",
@@ -672,26 +968,48 @@ _dynamic_imports: dict[str, str] = {
"ListGuardrailsResponseTypedDict": ".listguardrails",
"ListKeyAssignmentsData": ".listkeyassignments",
"ListKeyAssignmentsDataTypedDict": ".listkeyassignments",
"ListKeyAssignmentsGlobals": ".listkeyassignments",
"ListKeyAssignmentsGlobalsTypedDict": ".listkeyassignments",
"ListKeyAssignmentsRequest": ".listkeyassignments",
"ListKeyAssignmentsRequestTypedDict": ".listkeyassignments",
"ListKeyAssignmentsResponse": ".listkeyassignments",
"ListKeyAssignmentsResponseTypedDict": ".listkeyassignments",
"ListMemberAssignmentsData": ".listmemberassignments",
"ListMemberAssignmentsDataTypedDict": ".listmemberassignments",
"ListMemberAssignmentsGlobals": ".listmemberassignments",
"ListMemberAssignmentsGlobalsTypedDict": ".listmemberassignments",
"ListMemberAssignmentsRequest": ".listmemberassignments",
"ListMemberAssignmentsRequestTypedDict": ".listmemberassignments",
"ListMemberAssignmentsResponse": ".listmemberassignments",
"ListMemberAssignmentsResponseTypedDict": ".listmemberassignments",
"ListModelsCountGlobals": ".listmodelscount",
"ListModelsCountGlobalsTypedDict": ".listmodelscount",
"ListModelsCountRequest": ".listmodelscount",
"ListModelsCountRequestTypedDict": ".listmodelscount",
"ListModelsUserGlobals": ".listmodelsuser",
"ListModelsUserGlobalsTypedDict": ".listmodelsuser",
"ListModelsUserRequest": ".listmodelsuser",
"ListModelsUserRequestTypedDict": ".listmodelsuser",
"ListModelsUserSecurity": ".listmodelsuser",
"ListModelsUserSecurityTypedDict": ".listmodelsuser",
"ListProvidersData": ".listproviders",
"ListProvidersDataTypedDict": ".listproviders",
"ListProvidersGlobals": ".listproviders",
"ListProvidersGlobalsTypedDict": ".listproviders",
"ListProvidersRequest": ".listproviders",
"ListProvidersRequestTypedDict": ".listproviders",
"ListProvidersResponse": ".listproviders",
"ListProvidersResponseTypedDict": ".listproviders",
"SendChatCompletionRequestGlobals": ".sendchatcompletionrequest",
"SendChatCompletionRequestGlobalsTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequest": ".sendchatcompletionrequest",
"SendChatCompletionRequestRequestTypedDict": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponse": ".sendchatcompletionrequest",
"SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest",
"UpdateGuardrailData": ".updateguardrail",
"UpdateGuardrailDataTypedDict": ".updateguardrail",
"UpdateGuardrailGlobals": ".updateguardrail",
"UpdateGuardrailGlobalsTypedDict": ".updateguardrail",
"UpdateGuardrailRequest": ".updateguardrail",
"UpdateGuardrailRequestBody": ".updateguardrail",
"UpdateGuardrailRequestBodyTypedDict": ".updateguardrail",
@@ -702,6 +1020,8 @@ _dynamic_imports: dict[str, str] = {
"UpdateGuardrailResponseTypedDict": ".updateguardrail",
"UpdateKeysData": ".updatekeys",
"UpdateKeysDataTypedDict": ".updatekeys",
"UpdateKeysGlobals": ".updatekeys",
"UpdateKeysGlobalsTypedDict": ".updatekeys",
"UpdateKeysLimitReset": ".updatekeys",
"UpdateKeysRequest": ".updatekeys",
"UpdateKeysRequestBody": ".updatekeys",
@@ -2,9 +2,48 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import List
from typing_extensions import Annotated, TypedDict
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
)
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class BulkAssignKeysToGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignKeysToGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignKeysToGuardrailRequestBodyTypedDict(TypedDict):
@@ -21,6 +60,15 @@ class BulkAssignKeysToGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
request_body: BulkAssignKeysToGuardrailRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignKeysToGuardrailRequest(BaseModel):
@@ -34,6 +82,25 @@ class BulkAssignKeysToGuardrailRequest(BaseModel):
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignKeysToGuardrailResponseTypedDict(TypedDict):
r"""Assignment result"""
@@ -2,9 +2,48 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import List
from typing_extensions import Annotated, TypedDict
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
)
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class BulkAssignMembersToGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignMembersToGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignMembersToGuardrailRequestBodyTypedDict(TypedDict):
@@ -21,6 +60,15 @@ class BulkAssignMembersToGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
request_body: BulkAssignMembersToGuardrailRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignMembersToGuardrailRequest(BaseModel):
@@ -34,6 +82,25 @@ class BulkAssignMembersToGuardrailRequest(BaseModel):
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkAssignMembersToGuardrailResponseTypedDict(TypedDict):
r"""Assignment result"""
@@ -2,9 +2,48 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import List
from typing_extensions import Annotated, TypedDict
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
)
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class BulkUnassignKeysFromGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignKeysFromGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignKeysFromGuardrailRequestBodyTypedDict(TypedDict):
@@ -21,6 +60,15 @@ class BulkUnassignKeysFromGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
request_body: BulkUnassignKeysFromGuardrailRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignKeysFromGuardrailRequest(BaseModel):
@@ -34,6 +82,25 @@ class BulkUnassignKeysFromGuardrailRequest(BaseModel):
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignKeysFromGuardrailResponseTypedDict(TypedDict):
r"""Unassignment result"""
@@ -2,9 +2,48 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import List
from typing_extensions import Annotated, TypedDict
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
)
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class BulkUnassignMembersFromGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignMembersFromGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignMembersFromGuardrailRequestBodyTypedDict(TypedDict):
@@ -21,6 +60,15 @@ class BulkUnassignMembersFromGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
request_body: BulkUnassignMembersFromGuardrailRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignMembersFromGuardrailRequest(BaseModel):
@@ -34,6 +82,25 @@ class BulkUnassignMembersFromGuardrailRequest(BaseModel):
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class BulkUnassignMembersFromGuardrailResponseTypedDict(TypedDict):
r"""Unassignment result"""
@@ -10,13 +10,52 @@ from openrouter.types import (
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class CreateAuthKeysCodeGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateAuthKeysCodeGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
CreateAuthKeysCodeCodeChallengeMethod = Union[
Literal[
"S256",
@@ -27,7 +66,7 @@ CreateAuthKeysCodeCodeChallengeMethod = Union[
r"""The method used to generate the code challenge"""
class CreateAuthKeysCodeRequestTypedDict(TypedDict):
class CreateAuthKeysCodeRequestBodyTypedDict(TypedDict):
callback_url: str
r"""The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed."""
code_challenge: NotRequired[str]
@@ -40,7 +79,7 @@ class CreateAuthKeysCodeRequestTypedDict(TypedDict):
r"""Optional expiration time for the API key to be created"""
class CreateAuthKeysCodeRequest(BaseModel):
class CreateAuthKeysCodeRequestBody(BaseModel):
callback_url: str
r"""The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed."""
@@ -95,6 +134,45 @@ class CreateAuthKeysCodeRequest(BaseModel):
return m
class CreateAuthKeysCodeRequestTypedDict(TypedDict):
request_body: CreateAuthKeysCodeRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateAuthKeysCodeRequest(BaseModel):
request_body: Annotated[
CreateAuthKeysCodeRequestBody,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateAuthKeysCodeDataTypedDict(TypedDict):
r"""Auth code data"""
@@ -1,9 +1,50 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.components import createchargerequest as components_createchargerequest
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, SecurityMetadata
from typing_extensions import Annotated, TypedDict
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
SecurityMetadata,
)
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class CreateCoinbaseChargeGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateCoinbaseChargeGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateCoinbaseChargeSecurityTypedDict(TypedDict):
@@ -24,6 +65,45 @@ class CreateCoinbaseChargeSecurity(BaseModel):
]
class CreateCoinbaseChargeRequestTypedDict(TypedDict):
create_charge_request: components_createchargerequest.CreateChargeRequestTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateCoinbaseChargeRequest(BaseModel):
create_charge_request: Annotated[
components_createchargerequest.CreateChargeRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CallDataTypedDict(TypedDict):
deadline: str
fee_amount: str
+82 -3
View File
@@ -3,13 +3,53 @@
from __future__ import annotations
from openrouter.components import providerpreferences as components_providerpreferences
from openrouter.types import BaseModel, UnrecognizedStr
from openrouter.utils import get_discriminator, validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
get_discriminator,
validate_open_enum,
)
import pydantic
from pydantic import Discriminator, Tag
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class CreateEmbeddingsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateEmbeddingsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
TypeImageURL = Literal["image_url",]
@@ -88,7 +128,7 @@ EncodingFormat = Union[
]
class CreateEmbeddingsRequestTypedDict(TypedDict):
class CreateEmbeddingsRequestBodyTypedDict(TypedDict):
input: InputUnionTypedDict
model: str
encoding_format: NotRequired[EncodingFormat]
@@ -99,7 +139,7 @@ class CreateEmbeddingsRequestTypedDict(TypedDict):
input_type: NotRequired[str]
class CreateEmbeddingsRequest(BaseModel):
class CreateEmbeddingsRequestBody(BaseModel):
input: InputUnion
model: str
@@ -118,6 +158,45 @@ class CreateEmbeddingsRequest(BaseModel):
input_type: Optional[str] = None
class CreateEmbeddingsRequestTypedDict(TypedDict):
request_body: CreateEmbeddingsRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateEmbeddingsRequest(BaseModel):
request_body: Annotated[
CreateEmbeddingsRequestBody,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
Object = Literal["list",]
+82 -4
View File
@@ -9,13 +9,52 @@ from openrouter.types import (
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Union
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class CreateGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
CreateGuardrailResetIntervalRequest = Union[
Literal[
"daily",
@@ -27,7 +66,7 @@ CreateGuardrailResetIntervalRequest = Union[
r"""Interval at which the limit resets (daily, weekly, monthly)"""
class CreateGuardrailRequestTypedDict(TypedDict):
class CreateGuardrailRequestBodyTypedDict(TypedDict):
name: str
r"""Name for the new guardrail"""
description: NotRequired[Nullable[str]]
@@ -44,7 +83,7 @@ class CreateGuardrailRequestTypedDict(TypedDict):
r"""Whether to enforce zero data retention"""
class CreateGuardrailRequest(BaseModel):
class CreateGuardrailRequestBody(BaseModel):
name: str
r"""Name for the new guardrail"""
@@ -114,6 +153,45 @@ class CreateGuardrailRequest(BaseModel):
return m
class CreateGuardrailRequestTypedDict(TypedDict):
request_body: CreateGuardrailRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateGuardrailRequest(BaseModel):
request_body: Annotated[
CreateGuardrailRequestBody,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
CreateGuardrailResetIntervalResponse = Union[
Literal[
"daily",
+81 -3
View File
@@ -10,13 +10,52 @@ from openrouter.types import (
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class CreateKeysGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateKeysGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
CreateKeysLimitReset = Union[
Literal[
"daily",
@@ -28,7 +67,7 @@ CreateKeysLimitReset = Union[
r"""Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday."""
class CreateKeysRequestTypedDict(TypedDict):
class CreateKeysRequestBodyTypedDict(TypedDict):
name: str
r"""Name for the new API key"""
limit: NotRequired[Nullable[float]]
@@ -41,7 +80,7 @@ class CreateKeysRequestTypedDict(TypedDict):
r"""Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected"""
class CreateKeysRequest(BaseModel):
class CreateKeysRequestBody(BaseModel):
name: str
r"""Name for the new API key"""
@@ -96,6 +135,45 @@ class CreateKeysRequest(BaseModel):
return m
class CreateKeysRequestTypedDict(TypedDict):
request_body: CreateKeysRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateKeysRequest(BaseModel):
request_body: Annotated[
CreateKeysRequestBody,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateKeysDataTypedDict(TypedDict):
r"""The created API key information"""
+84 -3
View File
@@ -3,12 +3,93 @@
from __future__ import annotations
from openrouter.components import (
openresponsesnonstreamingresponse as components_openresponsesnonstreamingresponse,
openresponsesrequest as components_openresponsesrequest,
openresponsesstreamevent as components_openresponsesstreamevent,
)
from openrouter.types import BaseModel
from openrouter.utils import eventstreaming
from typing import Union
from typing_extensions import TypeAliasType, TypedDict
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
eventstreaming,
)
import pydantic
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class CreateResponsesGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateResponsesGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateResponsesRequestTypedDict(TypedDict):
open_responses_request: (
components_openresponsesrequest.OpenResponsesRequestTypedDict
)
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateResponsesRequest(BaseModel):
open_responses_request: Annotated[
components_openresponsesrequest.OpenResponsesRequest,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class CreateResponsesResponseBodyTypedDict(TypedDict):
+69 -3
View File
@@ -2,16 +2,63 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata, validate_const
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
validate_const,
)
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class DeleteGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail to delete"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteGuardrailRequest(BaseModel):
@@ -20,6 +67,25 @@ class DeleteGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail to delete"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteGuardrailResponseTypedDict(TypedDict):
r"""Guardrail deleted successfully"""
+69 -3
View File
@@ -2,16 +2,63 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata, validate_const
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
validate_const,
)
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class DeleteKeysGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteKeysGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteKeysRequestTypedDict(TypedDict):
hash: str
r"""The hash identifier of the API key to delete"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteKeysRequest(BaseModel):
@@ -20,6 +67,25 @@ class DeleteKeysRequest(BaseModel):
]
r"""The hash identifier of the API key to delete"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class DeleteKeysResponseTypedDict(TypedDict):
r"""API key deleted successfully"""
@@ -9,13 +9,52 @@ from openrouter.types import (
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class ExchangeAuthCodeForAPIKeyGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ExchangeAuthCodeForAPIKeyGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
ExchangeAuthCodeForAPIKeyCodeChallengeMethod = Union[
Literal[
"S256",
@@ -26,7 +65,7 @@ ExchangeAuthCodeForAPIKeyCodeChallengeMethod = Union[
r"""The method used to generate the code challenge"""
class ExchangeAuthCodeForAPIKeyRequestTypedDict(TypedDict):
class ExchangeAuthCodeForAPIKeyRequestBodyTypedDict(TypedDict):
code: str
r"""The authorization code received from the OAuth redirect"""
code_verifier: NotRequired[str]
@@ -37,7 +76,7 @@ class ExchangeAuthCodeForAPIKeyRequestTypedDict(TypedDict):
r"""The method used to generate the code challenge"""
class ExchangeAuthCodeForAPIKeyRequest(BaseModel):
class ExchangeAuthCodeForAPIKeyRequestBody(BaseModel):
code: str
r"""The authorization code received from the OAuth redirect"""
@@ -81,6 +120,45 @@ class ExchangeAuthCodeForAPIKeyRequest(BaseModel):
return m
class ExchangeAuthCodeForAPIKeyRequestTypedDict(TypedDict):
request_body: ExchangeAuthCodeForAPIKeyRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ExchangeAuthCodeForAPIKeyRequest(BaseModel):
request_body: Annotated[
ExchangeAuthCodeForAPIKeyRequestBody,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ExchangeAuthCodeForAPIKeyResponseTypedDict(TypedDict):
r"""Successfully exchanged code for an API key"""
+70 -1
View File
@@ -2,7 +2,76 @@
from __future__ import annotations
from openrouter.types import BaseModel
from typing_extensions import TypedDict
from openrouter.utils import FieldMetadata, HeaderMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetCreditsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCreditsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCreditsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCreditsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCreditsDataTypedDict(TypedDict):
+81 -3
View File
@@ -9,11 +9,79 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
from openrouter.utils import FieldMetadata, HeaderMetadata
import pydantic
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict, deprecated
class GetCurrentKeyGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCurrentKeyGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCurrentKeyRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetCurrentKeyRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
@deprecated(
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
)
@@ -69,8 +137,10 @@ class GetCurrentKeyDataTypedDict(TypedDict):
r"""External BYOK usage (in USD) for current UTC month"""
is_free_tier: bool
r"""Whether this is a free tier API key"""
is_management_key: bool
r"""Whether this is a management key"""
is_provisioning_key: bool
r"""Whether this is a provisioning key"""
r"""Whether this is a management key"""
limit_remaining: Nullable[float]
r"""Remaining spending limit in USD"""
limit_reset: Nullable[str]
@@ -119,8 +189,16 @@ class GetCurrentKeyData(BaseModel):
is_free_tier: bool
r"""Whether this is a free tier API key"""
is_provisioning_key: bool
r"""Whether this is a provisioning key"""
is_management_key: bool
r"""Whether this is a management key"""
is_provisioning_key: Annotated[
bool,
pydantic.Field(
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
]
r"""Whether this is a management key"""
limit_remaining: Nullable[float]
r"""Remaining spending limit in USD"""
+248 -3
View File
@@ -2,15 +2,63 @@
from __future__ import annotations
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
from openrouter.utils import FieldMetadata, QueryParamMetadata, validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
QueryParamMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Literal, Union
from typing_extensions import Annotated, TypedDict
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class GetGenerationGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetGenerationGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetGenerationRequestTypedDict(TypedDict):
id: str
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetGenerationRequest(BaseModel):
@@ -18,6 +66,25 @@ class GetGenerationRequest(BaseModel):
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
APIType = Union[
Literal[
@@ -29,6 +96,178 @@ APIType = Union[
r"""Type of API used for the generation"""
ProviderName = Union[
Literal[
"AnyScale",
"Atoma",
"Cent-ML",
"CrofAI",
"Enfer",
"GoPomelo",
"HuggingFace",
"Hyperbolic 2",
"InoCloud",
"Kluster",
"Lambda",
"Lepton",
"Lynn 2",
"Lynn",
"Mancer",
"Meta",
"Modal",
"Nineteen",
"OctoAI",
"Recursal",
"Reflection",
"Replicate",
"SambaNova 2",
"SF Compute",
"Targon",
"Together 2",
"Ubicloud",
"01.AI",
"AI21",
"AionLabs",
"Alibaba",
"Ambient",
"Amazon Bedrock",
"Amazon Nova",
"Anthropic",
"Arcee AI",
"AtlasCloud",
"Avian",
"Azure",
"BaseTen",
"BytePlus",
"Black Forest Labs",
"Cerebras",
"Chutes",
"Cirrascale",
"Clarifai",
"Cloudflare",
"Cohere",
"Crusoe",
"DeepInfra",
"DeepSeek",
"Featherless",
"Fireworks",
"Friendli",
"GMICloud",
"Google",
"Google AI Studio",
"Groq",
"Hyperbolic",
"Inception",
"Inceptron",
"InferenceNet",
"Infermatic",
"Inflection",
"Liquid",
"Mara",
"Mancer 2",
"Minimax",
"ModelRun",
"Mistral",
"Modular",
"Moonshot AI",
"Morph",
"NCompass",
"Nebius",
"NextBit",
"Novita",
"Nvidia",
"OpenAI",
"OpenInference",
"Parasail",
"Perplexity",
"Phala",
"Relace",
"SambaNova",
"Seed",
"SiliconFlow",
"Sourceful",
"StepFun",
"Stealth",
"StreamLake",
"Switchpoint",
"Together",
"Upstage",
"Venice",
"WandB",
"Xiaomi",
"xAI",
"Z.AI",
"FakeProvider",
],
UnrecognizedStr,
]
class ProviderResponseTypedDict(TypedDict):
status: Nullable[float]
id: NotRequired[str]
endpoint_id: NotRequired[str]
model_permaslug: NotRequired[str]
provider_name: NotRequired[ProviderName]
latency: NotRequired[float]
is_byok: NotRequired[bool]
class ProviderResponse(BaseModel):
status: Nullable[float]
id: Optional[str] = None
endpoint_id: Optional[str] = None
model_permaslug: Optional[str] = None
provider_name: Annotated[
Optional[ProviderName], PlainValidator(validate_open_enum(False))
] = None
latency: Optional[float] = None
is_byok: Optional[bool] = None
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = [
"id",
"endpoint_id",
"model_permaslug",
"provider_name",
"latency",
"is_byok",
]
nullable_fields = ["status"]
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 GetGenerationDataTypedDict(TypedDict):
r"""Generation data"""
@@ -98,6 +337,8 @@ class GetGenerationDataTypedDict(TypedDict):
r"""Type of API used for the generation"""
router: Nullable[str]
r"""Router used for the request (e.g., openrouter/auto)"""
provider_responses: Nullable[List[ProviderResponseTypedDict]]
r"""List of provider responses for this generation, including fallback attempts"""
class GetGenerationData(BaseModel):
@@ -202,6 +443,9 @@ class GetGenerationData(BaseModel):
router: Nullable[str]
r"""Router used for the request (e.g., openrouter/auto)"""
provider_responses: Nullable[List[ProviderResponse]]
r"""List of provider responses for this generation, including fallback attempts"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = []
@@ -232,6 +476,7 @@ class GetGenerationData(BaseModel):
"external_user",
"api_type",
"router",
"provider_responses",
]
null_default_fields = []
+69 -2
View File
@@ -9,16 +9,64 @@ from openrouter.types import (
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import FieldMetadata, PathParamMetadata, validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Union
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class GetGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail to retrieve"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetGuardrailRequest(BaseModel):
@@ -27,6 +75,25 @@ class GetGuardrailRequest(BaseModel):
]
r"""The unique identifier of the guardrail to retrieve"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
GetGuardrailResetInterval = Union[
Literal[
+64 -1
View File
@@ -9,14 +9,58 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
from openrouter.utils import FieldMetadata, PathParamMetadata
from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
import pydantic
from pydantic import model_serializer
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetKeyGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetKeyGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetKeyRequestTypedDict(TypedDict):
hash: str
r"""The hash identifier of the API key to retrieve"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetKeyRequest(BaseModel):
@@ -25,6 +69,25 @@ class GetKeyRequest(BaseModel):
]
r"""The hash identifier of the API key to retrieve"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetKeyDataTypedDict(TypedDict):
r"""The API key information"""
+68 -1
View File
@@ -2,12 +2,51 @@
from __future__ import annotations
from openrouter.types import BaseModel, UnrecognizedStr
from openrouter.utils import FieldMetadata, QueryParamMetadata, validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
QueryParamMetadata,
validate_open_enum,
)
import pydantic
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class GetModelsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetModelsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
Category = Union[
Literal[
"programming",
@@ -29,12 +68,40 @@ r"""Filter models by use case category"""
class GetModelsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
category: NotRequired[Category]
r"""Filter models by use case category"""
supported_parameters: NotRequired[str]
class GetModelsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
category: Annotated[
Annotated[Optional[Category], PlainValidator(validate_open_enum(False))],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+62 -1
View File
@@ -3,18 +3,79 @@
from __future__ import annotations
from openrouter.components import activityitem as components_activityitem
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, QueryParamMetadata
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class GetUserActivityGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetUserActivityGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class GetUserActivityRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
date_: NotRequired[str]
r"""Filter by a single UTC date in the last 30 days (YYYY-MM-DD format)."""
class GetUserActivityRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
date_: Annotated[
Optional[str],
pydantic.Field(alias="date"),
+63 -1
View File
@@ -9,13 +9,56 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
from openrouter.utils import FieldMetadata, QueryParamMetadata
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
include_disabled: NotRequired[str]
r"""Whether to include disabled API keys in the response"""
offset: NotRequired[str]
@@ -23,6 +66,25 @@ class ListRequestTypedDict(TypedDict):
class ListRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
include_disabled: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -0,0 +1,74 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, HeaderMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListEmbeddingsModelsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEmbeddingsModelsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEmbeddingsModelsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEmbeddingsModelsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
+65 -2
View File
@@ -5,13 +5,57 @@ from openrouter.components import (
listendpointsresponse as components_listendpointsresponse,
)
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, PathParamMetadata
from typing_extensions import Annotated, TypedDict
from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListEndpointsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsRequestTypedDict(TypedDict):
author: str
slug: str
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsRequest(BaseModel):
@@ -23,6 +67,25 @@ class ListEndpointsRequest(BaseModel):
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsResponseTypedDict(TypedDict):
r"""Returns a list of endpoints"""
+70 -2
View File
@@ -3,8 +3,76 @@
from __future__ import annotations
from openrouter.components import publicendpoint as components_publicendpoint
from openrouter.types import BaseModel
from typing import List
from typing_extensions import TypedDict
from openrouter.utils import FieldMetadata, HeaderMetadata
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListEndpointsZdrGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsZdrGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsZdrRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsZdrRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListEndpointsZdrResponseTypedDict(TypedDict):
@@ -2,15 +2,63 @@
from __future__ import annotations
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
from openrouter.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
QueryParamMetadata,
)
import pydantic
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListGuardrailKeyAssignmentsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGuardrailKeyAssignmentsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGuardrailKeyAssignmentsRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: NotRequired[str]
r"""Number of records to skip for pagination"""
limit: NotRequired[str]
@@ -23,6 +71,25 @@ class ListGuardrailKeyAssignmentsRequest(BaseModel):
]
r"""The unique identifier of the guardrail"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -2,15 +2,63 @@
from __future__ import annotations
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
from openrouter.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
QueryParamMetadata,
)
import pydantic
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListGuardrailMemberAssignmentsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGuardrailMemberAssignmentsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGuardrailMemberAssignmentsRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: NotRequired[str]
r"""Number of records to skip for pagination"""
limit: NotRequired[str]
@@ -23,6 +71,25 @@ class ListGuardrailMemberAssignmentsRequest(BaseModel):
]
r"""The unique identifier of the guardrail"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
+68 -1
View File
@@ -9,14 +9,62 @@ from openrouter.types import (
UNSET_SENTINEL,
UnrecognizedStr,
)
from openrouter.utils import FieldMetadata, QueryParamMetadata, validate_open_enum
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
QueryParamMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class ListGuardrailsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGuardrailsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListGuardrailsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: NotRequired[str]
r"""Number of records to skip for pagination"""
limit: NotRequired[str]
@@ -24,6 +72,25 @@ class ListGuardrailsRequestTypedDict(TypedDict):
class ListGuardrailsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -2,13 +2,56 @@
from __future__ import annotations
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
from openrouter.utils import FieldMetadata, QueryParamMetadata
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListKeyAssignmentsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListKeyAssignmentsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListKeyAssignmentsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: NotRequired[str]
r"""Number of records to skip for pagination"""
limit: NotRequired[str]
@@ -16,6 +59,25 @@ class ListKeyAssignmentsRequestTypedDict(TypedDict):
class ListKeyAssignmentsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -2,13 +2,56 @@
from __future__ import annotations
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL
from openrouter.utils import FieldMetadata, QueryParamMetadata
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListMemberAssignmentsGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListMemberAssignmentsGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListMemberAssignmentsRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: NotRequired[str]
r"""Number of records to skip for pagination"""
limit: NotRequired[str]
@@ -16,6 +59,25 @@ class ListMemberAssignmentsRequestTypedDict(TypedDict):
class ListMemberAssignmentsRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
offset: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
@@ -0,0 +1,74 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, HeaderMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListModelsCountGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListModelsCountGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListModelsCountRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListModelsCountRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
+70 -2
View File
@@ -2,8 +2,43 @@
from __future__ import annotations
from openrouter.types import BaseModel
from openrouter.utils import FieldMetadata, SecurityMetadata
from typing_extensions import Annotated, TypedDict
from openrouter.utils import FieldMetadata, HeaderMetadata, SecurityMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListModelsUserGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListModelsUserGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListModelsUserSecurityTypedDict(TypedDict):
@@ -22,3 +57,36 @@ class ListModelsUserSecurity(BaseModel):
)
),
]
class ListModelsUserRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListModelsUserRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
+70 -2
View File
@@ -8,9 +8,77 @@ from openrouter.types import (
UNSET,
UNSET_SENTINEL,
)
from openrouter.utils import FieldMetadata, HeaderMetadata
import pydantic
from pydantic import model_serializer
from typing import List
from typing_extensions import NotRequired, TypedDict
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
class ListProvidersGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListProvidersGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListProvidersRequestTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListProvidersRequest(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class ListProvidersDataTypedDict(TypedDict):
@@ -2,12 +2,96 @@
from __future__ import annotations
from openrouter.components import (
chatgenerationparams as components_chatgenerationparams,
chatresponse as components_chatresponse,
chatstreamingresponsechunk as components_chatstreamingresponsechunk,
)
from openrouter.utils import eventstreaming
from typing import Union
from typing_extensions import TypeAliasType
from openrouter.types import BaseModel
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
RequestMetadata,
eventstreaming,
)
import pydantic
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
class SendChatCompletionRequestGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class SendChatCompletionRequestGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class SendChatCompletionRequestRequestTypedDict(TypedDict):
chat_generation_params: (
components_chatgenerationparams.ChatGenerationParamsTypedDict
)
r"""Chat completion request parameters"""
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class SendChatCompletionRequestRequest(BaseModel):
chat_generation_params: Annotated[
components_chatgenerationparams.ChatGenerationParams,
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
r"""Chat completion request parameters"""
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
SendChatCompletionRequestResponseTypedDict = TypeAliasType(
@@ -11,16 +11,51 @@ from openrouter.types import (
)
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class UpdateGuardrailGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class UpdateGuardrailGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
UpdateGuardrailResetIntervalRequest = Union[
Literal[
"daily",
@@ -124,6 +159,15 @@ class UpdateGuardrailRequestTypedDict(TypedDict):
id: str
r"""The unique identifier of the guardrail to update"""
request_body: UpdateGuardrailRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class UpdateGuardrailRequest(BaseModel):
@@ -137,6 +181,25 @@ class UpdateGuardrailRequest(BaseModel):
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
UpdateGuardrailResetIntervalResponse = Union[
Literal[
+63
View File
@@ -12,16 +12,51 @@ from openrouter.types import (
)
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
PathParamMetadata,
RequestMetadata,
validate_open_enum,
)
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class UpdateKeysGlobalsTypedDict(TypedDict):
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class UpdateKeysGlobals(BaseModel):
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
UpdateKeysLimitReset = Union[
Literal[
"daily",
@@ -106,6 +141,15 @@ class UpdateKeysRequestTypedDict(TypedDict):
hash: str
r"""The hash identifier of the API key to update"""
request_body: UpdateKeysRequestBodyTypedDict
http_referer: NotRequired[str]
r"""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.
"""
x_title: NotRequired[str]
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class UpdateKeysRequest(BaseModel):
@@ -119,6 +163,25 @@ class UpdateKeysRequest(BaseModel):
FieldMetadata(request=RequestMetadata(media_type="application/json")),
]
http_referer: Annotated[
Optional[str],
pydantic.Field(alias="HTTP-Referer"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""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.
"""
x_title: Annotated[
Optional[str],
pydantic.Field(alias="X-Title"),
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
] = None
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
"""
class UpdateKeysDataTypedDict(TypedDict):
r"""The updated API key information"""