mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
chore: 🐝 Update SDK - Generate 0.9.2 (#205)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
speakeasybot
speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent
0c735989c1
commit
0f116c9792
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,121 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
bulkaddworkspacemembersrequest as components_bulkaddworkspacemembersrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class BulkAddWorkspaceMembersGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BulkAddWorkspaceMembersGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BulkAddWorkspaceMembersRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
bulk_add_workspace_members_request: components_bulkaddworkspacemembersrequest.BulkAddWorkspaceMembersRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BulkAddWorkspaceMembersRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
|
||||
bulk_add_workspace_members_request: Annotated[
|
||||
components_bulkaddworkspacemembersrequest.BulkAddWorkspaceMembersRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,121 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
bulkremoveworkspacemembersrequest as components_bulkremoveworkspacemembersrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class BulkRemoveWorkspaceMembersGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BulkRemoveWorkspaceMembersGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BulkRemoveWorkspaceMembersRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
bulk_remove_workspace_members_request: components_bulkremoveworkspacemembersrequest.BulkRemoveWorkspaceMembersRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BulkRemoveWorkspaceMembersRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
|
||||
bulk_remove_workspace_members_request: Annotated[
|
||||
components_bulkremoveworkspacemembersrequest.BulkRemoveWorkspaceMembersRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import speechrequest as components_speechrequest
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreateAudioSpeechGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateAudioSpeechGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateAudioSpeechRequestTypedDict(TypedDict):
|
||||
speech_request: components_speechrequest.SpeechRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateAudioSpeechRequest(BaseModel):
|
||||
speech_request: Annotated[
|
||||
components_speechrequest.SpeechRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import sttrequest as components_sttrequest
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreateAudioTranscriptionsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateAudioTranscriptionsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateAudioTranscriptionsRequestTypedDict(TypedDict):
|
||||
stt_request: components_sttrequest.STTRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateAudioTranscriptionsRequest(BaseModel):
|
||||
stt_request: Annotated[
|
||||
components_sttrequest.STTRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,111 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
createbyokkeyrequest as components_createbyokkeyrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreateBYOKKeyGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateBYOKKeyGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateBYOKKeyRequestTypedDict(TypedDict):
|
||||
create_byok_key_request: (
|
||||
components_createbyokkeyrequest.CreateBYOKKeyRequestTypedDict
|
||||
)
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateBYOKKeyRequest(BaseModel):
|
||||
create_byok_key_request: Annotated[
|
||||
components_createbyokkeyrequest.CreateBYOKKeyRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -1,7 +1,12 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import providerpreferences as components_providerpreferences
|
||||
from openrouter.components import (
|
||||
contentpartinputaudio as components_contentpartinputaudio,
|
||||
contentpartinputfile as components_contentpartinputfile,
|
||||
contentpartinputvideo as components_contentpartinputvideo,
|
||||
providerpreferences as components_providerpreferences,
|
||||
)
|
||||
from openrouter.types import (
|
||||
BaseModel,
|
||||
Nullable,
|
||||
@@ -117,7 +122,14 @@ class ContentText(BaseModel):
|
||||
|
||||
|
||||
ContentTypedDict = TypeAliasType(
|
||||
"ContentTypedDict", Union[ContentTextTypedDict, ContentImageURLTypedDict]
|
||||
"ContentTypedDict",
|
||||
Union[
|
||||
ContentTextTypedDict,
|
||||
ContentImageURLTypedDict,
|
||||
components_contentpartinputaudio.ContentPartInputAudioTypedDict,
|
||||
components_contentpartinputvideo.ContentPartInputVideoTypedDict,
|
||||
components_contentpartinputfile.ContentPartInputFileTypedDict,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -125,6 +137,15 @@ Content = Annotated[
|
||||
Union[
|
||||
Annotated[ContentText, Tag("text")],
|
||||
Annotated[ContentImageURL, Tag("image_url")],
|
||||
Annotated[
|
||||
components_contentpartinputaudio.ContentPartInputAudio, Tag("input_audio")
|
||||
],
|
||||
Annotated[
|
||||
components_contentpartinputvideo.ContentPartInputVideo, Tag("input_video")
|
||||
],
|
||||
Annotated[
|
||||
components_contentpartinputfile.ContentPartInputFile, Tag("input_file")
|
||||
],
|
||||
],
|
||||
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||
]
|
||||
@@ -323,6 +344,40 @@ class CreateEmbeddingsData(BaseModel):
|
||||
Object = Literal["list",]
|
||||
|
||||
|
||||
class PromptTokensDetailsTypedDict(TypedDict):
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
audio_tokens: NotRequired[int]
|
||||
r"""Number of audio tokens in the input"""
|
||||
file_tokens: NotRequired[int]
|
||||
r"""Number of file/document tokens in the input"""
|
||||
image_tokens: NotRequired[int]
|
||||
r"""Number of image tokens in the input"""
|
||||
text_tokens: NotRequired[int]
|
||||
r"""Number of text tokens in the input"""
|
||||
video_tokens: NotRequired[int]
|
||||
r"""Number of video tokens in the input"""
|
||||
|
||||
|
||||
class PromptTokensDetails(BaseModel):
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
audio_tokens: Optional[int] = None
|
||||
r"""Number of audio tokens in the input"""
|
||||
|
||||
file_tokens: Optional[int] = None
|
||||
r"""Number of file/document tokens in the input"""
|
||||
|
||||
image_tokens: Optional[int] = None
|
||||
r"""Number of image tokens in the input"""
|
||||
|
||||
text_tokens: Optional[int] = None
|
||||
r"""Number of text tokens in the input"""
|
||||
|
||||
video_tokens: Optional[int] = None
|
||||
r"""Number of video tokens in the input"""
|
||||
|
||||
|
||||
class CreateEmbeddingsUsageTypedDict(TypedDict):
|
||||
r"""Token usage statistics"""
|
||||
|
||||
@@ -332,6 +387,8 @@ class CreateEmbeddingsUsageTypedDict(TypedDict):
|
||||
r"""Total number of tokens used"""
|
||||
cost: NotRequired[float]
|
||||
r"""Cost of the request in credits"""
|
||||
prompt_tokens_details: NotRequired[PromptTokensDetailsTypedDict]
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
|
||||
class CreateEmbeddingsUsage(BaseModel):
|
||||
@@ -346,6 +403,9 @@ class CreateEmbeddingsUsage(BaseModel):
|
||||
cost: Optional[float] = None
|
||||
r"""Cost of the request in credits"""
|
||||
|
||||
prompt_tokens_details: Optional[PromptTokensDetails] = None
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
|
||||
class CreateEmbeddingsResponseBodyTypedDict(TypedDict):
|
||||
r"""Embeddings response containing embedding vectors"""
|
||||
|
||||
@@ -93,6 +93,8 @@ class CreateKeysRequestBodyTypedDict(TypedDict):
|
||||
r"""Optional spending limit for the API key in USD"""
|
||||
limit_reset: NotRequired[Nullable[CreateKeysLimitReset]]
|
||||
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."""
|
||||
workspace_id: NotRequired[str]
|
||||
r"""The workspace to create the API key in. Defaults to the default workspace if not provided."""
|
||||
|
||||
|
||||
class CreateKeysRequestBody(BaseModel):
|
||||
@@ -117,6 +119,9 @@ class CreateKeysRequestBody(BaseModel):
|
||||
] = UNSET
|
||||
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."""
|
||||
|
||||
workspace_id: Optional[str] = None
|
||||
r"""The workspace to create the API key in. Defaults to the default workspace if not provided."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = [
|
||||
@@ -125,6 +130,7 @@ class CreateKeysRequestBody(BaseModel):
|
||||
"include_byok_in_limit",
|
||||
"limit",
|
||||
"limit_reset",
|
||||
"workspace_id",
|
||||
]
|
||||
nullable_fields = ["creator_user_id", "expires_at", "limit", "limit_reset"]
|
||||
null_default_fields = []
|
||||
@@ -247,6 +253,8 @@ class CreateKeysDataTypedDict(TypedDict):
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC month"""
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
expires_at: NotRequired[Nullable[datetime]]
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
@@ -311,6 +319,9 @@ class CreateKeysData(BaseModel):
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
|
||||
expires_at: OptionalNullable[datetime] = UNSET
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
createobservabilitydestinationrequest as components_createobservabilitydestinationrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreateObservabilityDestinationGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateObservabilityDestinationGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateObservabilityDestinationRequestTypedDict(TypedDict):
|
||||
create_observability_destination_request: components_createobservabilitydestinationrequest.CreateObservabilityDestinationRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateObservabilityDestinationRequest(BaseModel):
|
||||
create_observability_destination_request: Annotated[
|
||||
components_createobservabilitydestinationrequest.CreateObservabilityDestinationRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,119 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import chatrequest as components_chatrequest
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreatePresetsChatCompletionsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsChatCompletionsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsChatCompletionsRequestTypedDict(TypedDict):
|
||||
slug: str
|
||||
r"""URL-safe slug identifying the preset. Created if it does not exist."""
|
||||
chat_request: components_chatrequest.ChatRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsChatCompletionsRequest(BaseModel):
|
||||
slug: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""URL-safe slug identifying the preset. Created if it does not exist."""
|
||||
|
||||
chat_request: Annotated[
|
||||
components_chatrequest.ChatRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,119 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import messagesrequest as components_messagesrequest
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreatePresetsMessagesGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsMessagesGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsMessagesRequestTypedDict(TypedDict):
|
||||
slug: str
|
||||
r"""URL-safe slug identifying the preset. Created if it does not exist."""
|
||||
messages_request: components_messagesrequest.MessagesRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsMessagesRequest(BaseModel):
|
||||
slug: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""URL-safe slug identifying the preset. Created if it does not exist."""
|
||||
|
||||
messages_request: Annotated[
|
||||
components_messagesrequest.MessagesRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,119 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import responsesrequest as components_responsesrequest
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreatePresetsResponsesGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsResponsesGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsResponsesRequestTypedDict(TypedDict):
|
||||
slug: str
|
||||
r"""URL-safe slug identifying the preset. Created if it does not exist."""
|
||||
responses_request: components_responsesrequest.ResponsesRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreatePresetsResponsesRequest(BaseModel):
|
||||
slug: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""URL-safe slug identifying the preset. Created if it does not exist."""
|
||||
|
||||
responses_request: Annotated[
|
||||
components_responsesrequest.ResponsesRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -62,11 +62,40 @@ class CreateRerankGlobals(BaseModel):
|
||||
"""
|
||||
|
||||
|
||||
class DocumentRequestTypedDict(TypedDict):
|
||||
r"""A structured document with optional text and/or image content. At least one of `text` or `image` must be provided."""
|
||||
|
||||
image: NotRequired[str]
|
||||
r"""An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...)."""
|
||||
text: NotRequired[str]
|
||||
r"""The document text"""
|
||||
|
||||
|
||||
class DocumentRequest(BaseModel):
|
||||
r"""A structured document with optional text and/or image content. At least one of `text` or `image` must be provided."""
|
||||
|
||||
image: Optional[str] = None
|
||||
r"""An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...)."""
|
||||
|
||||
text: Optional[str] = None
|
||||
r"""The document text"""
|
||||
|
||||
|
||||
DocumentTypedDict = TypeAliasType(
|
||||
"DocumentTypedDict", Union[DocumentRequestTypedDict, str]
|
||||
)
|
||||
r"""A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`."""
|
||||
|
||||
|
||||
Document = TypeAliasType("Document", Union[DocumentRequest, str])
|
||||
r"""A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`."""
|
||||
|
||||
|
||||
class CreateRerankRequestBodyTypedDict(TypedDict):
|
||||
r"""Rerank request input"""
|
||||
|
||||
documents: List[str]
|
||||
r"""The list of documents to rerank"""
|
||||
documents: List[DocumentTypedDict]
|
||||
r"""The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models."""
|
||||
model: str
|
||||
r"""The rerank model to use"""
|
||||
query: str
|
||||
@@ -81,8 +110,8 @@ class CreateRerankRequestBodyTypedDict(TypedDict):
|
||||
class CreateRerankRequestBody(BaseModel):
|
||||
r"""Rerank request input"""
|
||||
|
||||
documents: List[str]
|
||||
r"""The list of documents to rerank"""
|
||||
documents: List[Document]
|
||||
r"""The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models."""
|
||||
|
||||
model: str
|
||||
r"""The rerank model to use"""
|
||||
@@ -180,25 +209,30 @@ class CreateRerankRequest(BaseModel):
|
||||
"""
|
||||
|
||||
|
||||
class DocumentTypedDict(TypedDict):
|
||||
r"""The document object containing the original text"""
|
||||
class DocumentResponseTypedDict(TypedDict):
|
||||
r"""The document object echoing the original input (text and/or image)"""
|
||||
|
||||
text: str
|
||||
image: NotRequired[str]
|
||||
r"""The image (URL or data URI) from the original document"""
|
||||
text: NotRequired[str]
|
||||
r"""The document text"""
|
||||
|
||||
|
||||
class Document(BaseModel):
|
||||
r"""The document object containing the original text"""
|
||||
class DocumentResponse(BaseModel):
|
||||
r"""The document object echoing the original input (text and/or image)"""
|
||||
|
||||
text: str
|
||||
image: Optional[str] = None
|
||||
r"""The image (URL or data URI) from the original document"""
|
||||
|
||||
text: Optional[str] = None
|
||||
r"""The document text"""
|
||||
|
||||
|
||||
class ResultTypedDict(TypedDict):
|
||||
r"""A single rerank result"""
|
||||
|
||||
document: DocumentTypedDict
|
||||
r"""The document object containing the original text"""
|
||||
document: DocumentResponseTypedDict
|
||||
r"""The document object echoing the original input (text and/or image)"""
|
||||
index: int
|
||||
r"""Index of the document in the original input list"""
|
||||
relevance_score: float
|
||||
@@ -208,8 +242,8 @@ class ResultTypedDict(TypedDict):
|
||||
class Result(BaseModel):
|
||||
r"""A single rerank result"""
|
||||
|
||||
document: Document
|
||||
r"""The document object containing the original text"""
|
||||
document: DocumentResponse
|
||||
r"""The document object echoing the original input (text and/or image)"""
|
||||
|
||||
index: int
|
||||
r"""Index of the document in the original input list"""
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
metadatalevel as components_metadatalevel,
|
||||
openresponsesresult as components_openresponsesresult,
|
||||
responsesrequest as components_responsesrequest,
|
||||
streamevents as components_streamevents,
|
||||
@@ -12,8 +13,10 @@ from openrouter.utils import (
|
||||
HeaderMetadata,
|
||||
RequestMetadata,
|
||||
eventstreaming,
|
||||
validate_open_enum,
|
||||
)
|
||||
import pydantic
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||
|
||||
@@ -79,6 +82,8 @@ class CreateResponsesRequestTypedDict(TypedDict):
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
x_open_router_metadata: NotRequired[components_metadatalevel.MetadataLevel]
|
||||
r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
|
||||
|
||||
|
||||
class CreateResponsesRequest(BaseModel):
|
||||
@@ -115,19 +120,15 @@ class CreateResponsesRequest(BaseModel):
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateResponsesResponseBodyTypedDict(TypedDict):
|
||||
r"""Successful response"""
|
||||
|
||||
data: components_streamevents.StreamEventsTypedDict
|
||||
r"""Union of all possible event types emitted during response streaming"""
|
||||
|
||||
|
||||
class CreateResponsesResponseBody(BaseModel):
|
||||
r"""Successful response"""
|
||||
|
||||
data: components_streamevents.StreamEvents
|
||||
r"""Union of all possible event types emitted during response streaming"""
|
||||
x_open_router_metadata: Annotated[
|
||||
Annotated[
|
||||
Optional[components_metadatalevel.MetadataLevel],
|
||||
PlainValidator(validate_open_enum(False)),
|
||||
],
|
||||
pydantic.Field(alias="X-OpenRouter-Metadata"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
|
||||
|
||||
|
||||
CreateResponsesResponseTypedDict = TypeAliasType(
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
createworkspacerequest as components_createworkspacerequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class CreateWorkspaceGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateWorkspaceGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateWorkspaceRequestTypedDict(TypedDict):
|
||||
create_workspace_request: (
|
||||
components_createworkspacerequest.CreateWorkspaceRequestTypedDict
|
||||
)
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class CreateWorkspaceRequest(BaseModel):
|
||||
create_workspace_request: Annotated[
|
||||
components_createworkspacerequest.CreateWorkspaceRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class DeleteBYOKKeyGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteBYOKKeyGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteBYOKKeyRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The BYOK credential ID (UUID)."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteBYOKKeyRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The BYOK credential ID (UUID)."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class DeleteObservabilityDestinationGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteObservabilityDestinationGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteObservabilityDestinationRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The destination ID (UUID)."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteObservabilityDestinationRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The destination ID (UUID)."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class DeleteWorkspaceGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteWorkspaceGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteWorkspaceRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DeleteWorkspaceRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,252 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.types import BaseModel, UnrecognizedStr
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, validate_open_enum
|
||||
import pydantic
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import List, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetAnalyticsMetaGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetAnalyticsMetaGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetAnalyticsMetaRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetAnalyticsMetaRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class DimensionTypedDict(TypedDict):
|
||||
display_label: str
|
||||
r"""Human-readable label"""
|
||||
name: str
|
||||
r"""Dimension identifier used in query requests"""
|
||||
|
||||
|
||||
class Dimension(BaseModel):
|
||||
display_label: str
|
||||
r"""Human-readable label"""
|
||||
|
||||
name: str
|
||||
r"""Dimension identifier used in query requests"""
|
||||
|
||||
|
||||
GranularityName = Union[
|
||||
Literal[
|
||||
"minute",
|
||||
"hour",
|
||||
"day",
|
||||
"week",
|
||||
"month",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Granularity identifier"""
|
||||
|
||||
|
||||
class GranularityTypedDict(TypedDict):
|
||||
display_label: str
|
||||
r"""Human-readable label"""
|
||||
name: GranularityName
|
||||
r"""Granularity identifier"""
|
||||
|
||||
|
||||
class Granularity(BaseModel):
|
||||
display_label: str
|
||||
r"""Human-readable label"""
|
||||
|
||||
name: Annotated[GranularityName, PlainValidator(validate_open_enum(False))]
|
||||
r"""Granularity identifier"""
|
||||
|
||||
|
||||
DisplayFormat = Union[
|
||||
Literal[
|
||||
"number",
|
||||
"currency",
|
||||
"percent",
|
||||
"latency",
|
||||
"throughput",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"""
|
||||
|
||||
|
||||
class MetricTypedDict(TypedDict):
|
||||
display_format: DisplayFormat
|
||||
r"""How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"""
|
||||
display_label: str
|
||||
r"""Human-readable label"""
|
||||
is_rate: bool
|
||||
r"""Whether this metric is a rate/ratio (averaged, not summed)"""
|
||||
name: str
|
||||
r"""Metric identifier used in query requests"""
|
||||
|
||||
|
||||
class Metric(BaseModel):
|
||||
display_format: Annotated[DisplayFormat, PlainValidator(validate_open_enum(False))]
|
||||
r"""How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)"""
|
||||
|
||||
display_label: str
|
||||
r"""Human-readable label"""
|
||||
|
||||
is_rate: bool
|
||||
r"""Whether this metric is a rate/ratio (averaged, not summed)"""
|
||||
|
||||
name: str
|
||||
r"""Metric identifier used in query requests"""
|
||||
|
||||
|
||||
OperatorName = Union[
|
||||
Literal[
|
||||
"eq",
|
||||
"neq",
|
||||
"in",
|
||||
"not_in",
|
||||
"gt",
|
||||
"gte",
|
||||
"lt",
|
||||
"lte",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Operator identifier used in filter definitions"""
|
||||
|
||||
|
||||
ValueType = Union[
|
||||
Literal[
|
||||
"scalar",
|
||||
"array",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Whether the operator expects a single value or an array"""
|
||||
|
||||
|
||||
class OperatorTypedDict(TypedDict):
|
||||
name: OperatorName
|
||||
r"""Operator identifier used in filter definitions"""
|
||||
value_type: ValueType
|
||||
r"""Whether the operator expects a single value or an array"""
|
||||
|
||||
|
||||
class Operator(BaseModel):
|
||||
name: Annotated[OperatorName, PlainValidator(validate_open_enum(False))]
|
||||
r"""Operator identifier used in filter definitions"""
|
||||
|
||||
value_type: Annotated[ValueType, PlainValidator(validate_open_enum(False))]
|
||||
r"""Whether the operator expects a single value or an array"""
|
||||
|
||||
|
||||
class GetAnalyticsMetaDataTypedDict(TypedDict):
|
||||
dimensions: List[DimensionTypedDict]
|
||||
granularities: List[GranularityTypedDict]
|
||||
metrics: List[MetricTypedDict]
|
||||
operators: List[OperatorTypedDict]
|
||||
|
||||
|
||||
class GetAnalyticsMetaData(BaseModel):
|
||||
dimensions: List[Dimension]
|
||||
|
||||
granularities: List[Granularity]
|
||||
|
||||
metrics: List[Metric]
|
||||
|
||||
operators: List[Operator]
|
||||
|
||||
|
||||
class GetAnalyticsMetaResponseTypedDict(TypedDict):
|
||||
r"""Returns analytics query metadata"""
|
||||
|
||||
data: GetAnalyticsMetaDataTypedDict
|
||||
|
||||
|
||||
class GetAnalyticsMetaResponse(BaseModel):
|
||||
r"""Returns analytics query metadata"""
|
||||
|
||||
data: GetAnalyticsMetaData
|
||||
@@ -0,0 +1,225 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import apprankingsresponse as components_apprankingsresponse
|
||||
from openrouter.types import BaseModel, UnrecognizedStr
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
QueryParamMetadata,
|
||||
validate_open_enum,
|
||||
)
|
||||
import pydantic
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import Awaitable, Callable, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetAppRankingsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetAppRankingsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
GetAppRankingsCategory = Union[
|
||||
Literal[
|
||||
"coding",
|
||||
"creative",
|
||||
"productivity",
|
||||
"entertainment",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group."""
|
||||
|
||||
|
||||
Subcategory = Union[
|
||||
Literal[
|
||||
"cli-agent",
|
||||
"ide-extension",
|
||||
"cloud-agent",
|
||||
"programming-app",
|
||||
"native-app-builder",
|
||||
"creative-writing",
|
||||
"video-gen",
|
||||
"image-gen",
|
||||
"audio-gen",
|
||||
"roleplay",
|
||||
"game",
|
||||
"writing-assistant",
|
||||
"general-chat",
|
||||
"personal-agent",
|
||||
"legal",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent."""
|
||||
|
||||
|
||||
GetAppRankingsSort = Union[
|
||||
Literal[
|
||||
"popular",
|
||||
"trending",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""`popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results."""
|
||||
|
||||
|
||||
class GetAppRankingsRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
category: NotRequired[GetAppRankingsCategory]
|
||||
r"""Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group."""
|
||||
subcategory: NotRequired[Subcategory]
|
||||
r"""Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent."""
|
||||
sort: NotRequired[GetAppRankingsSort]
|
||||
r"""`popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results."""
|
||||
start_date: NotRequired[str]
|
||||
r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
|
||||
end_date: NotRequired[str]
|
||||
r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of apps to return (1-100). Defaults to 50."""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`."""
|
||||
|
||||
|
||||
class GetAppRankingsRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
category: Annotated[
|
||||
Annotated[
|
||||
Optional[GetAppRankingsCategory], PlainValidator(validate_open_enum(False))
|
||||
],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Marketplace category group to filter by (e.g. `coding`). Only apps tagged with a subcategory inside this group are returned. Mutually combinable with `subcategory` — when both are supplied the `subcategory` must belong to the `category` group."""
|
||||
|
||||
subcategory: Annotated[
|
||||
Annotated[Optional[Subcategory], PlainValidator(validate_open_enum(False))],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Marketplace subcategory to filter by (e.g. `cli-agent`). Takes precedence over `category` for the actual filter; when `category` is also supplied the pair must be consistent."""
|
||||
|
||||
sort: Annotated[
|
||||
Annotated[
|
||||
Optional[GetAppRankingsSort], PlainValidator(validate_open_enum(False))
|
||||
],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = "popular"
|
||||
r"""`popular` ranks apps by total token volume inside the date window. `trending` ranks apps by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted from `trending` results."""
|
||||
|
||||
start_date: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
|
||||
|
||||
end_date: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
|
||||
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = 50
|
||||
r"""Maximum number of apps to return (1-100). Defaults to 50."""
|
||||
|
||||
offset: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = 0
|
||||
r"""Number of ranked apps to skip before the first returned row (0-100). Defaults to 0. `rank` stays absolute, so the first row of `offset=50` is `rank: 51`."""
|
||||
|
||||
|
||||
class GetAppRankingsResponseTypedDict(TypedDict):
|
||||
result: components_apprankingsresponse.AppRankingsResponseTypedDict
|
||||
|
||||
|
||||
class GetAppRankingsResponse(BaseModel):
|
||||
next: Union[
|
||||
Callable[[], Optional[GetAppRankingsResponse]],
|
||||
Callable[[], Awaitable[Optional[GetAppRankingsResponse]]],
|
||||
]
|
||||
|
||||
result: components_apprankingsresponse.AppRankingsResponse
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetBYOKKeyGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetBYOKKeyGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetBYOKKeyRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The BYOK credential ID (UUID)."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetBYOKKeyRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The BYOK credential ID (UUID)."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -1,25 +1,10 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import providerresponse as components_providerresponse
|
||||
from openrouter.types import (
|
||||
BaseModel,
|
||||
Nullable,
|
||||
OptionalNullable,
|
||||
UNSET,
|
||||
UNSET_SENTINEL,
|
||||
UnrecognizedStr,
|
||||
)
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
QueryParamMetadata,
|
||||
validate_open_enum,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
||||
import pydantic
|
||||
from pydantic import model_serializer
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import List, Literal, Optional, Union
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
@@ -120,292 +105,3 @@ class GetGenerationRequest(BaseModel):
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
APIType = Union[
|
||||
Literal[
|
||||
"completions",
|
||||
"embeddings",
|
||||
"rerank",
|
||||
"video",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Type of API used for the generation"""
|
||||
|
||||
|
||||
class GetGenerationDataTypedDict(TypedDict):
|
||||
r"""Generation data"""
|
||||
|
||||
api_type: Nullable[APIType]
|
||||
r"""Type of API used for the generation"""
|
||||
app_id: Nullable[int]
|
||||
r"""ID of the app that made the request"""
|
||||
cache_discount: Nullable[float]
|
||||
r"""Discount applied due to caching"""
|
||||
cancelled: Nullable[bool]
|
||||
r"""Whether the generation was cancelled"""
|
||||
created_at: str
|
||||
r"""ISO 8601 timestamp of when the generation was created"""
|
||||
external_user: Nullable[str]
|
||||
r"""External user identifier"""
|
||||
finish_reason: Nullable[str]
|
||||
r"""Reason the generation finished"""
|
||||
generation_time: Nullable[float]
|
||||
r"""Time taken for generation in milliseconds"""
|
||||
http_referer: Nullable[str]
|
||||
r"""Referer header from the request"""
|
||||
id: str
|
||||
r"""Unique identifier for the generation"""
|
||||
is_byok: bool
|
||||
r"""Whether this used bring-your-own-key"""
|
||||
latency: Nullable[float]
|
||||
r"""Total latency in milliseconds"""
|
||||
model: str
|
||||
r"""Model used for the generation"""
|
||||
moderation_latency: Nullable[float]
|
||||
r"""Moderation latency in milliseconds"""
|
||||
native_finish_reason: Nullable[str]
|
||||
r"""Native finish reason as reported by provider"""
|
||||
native_tokens_cached: Nullable[int]
|
||||
r"""Native cached tokens as reported by provider"""
|
||||
native_tokens_completion: Nullable[int]
|
||||
r"""Native completion tokens as reported by provider"""
|
||||
native_tokens_completion_images: Nullable[int]
|
||||
r"""Native completion image tokens as reported by provider"""
|
||||
native_tokens_prompt: Nullable[int]
|
||||
r"""Native prompt tokens as reported by provider"""
|
||||
native_tokens_reasoning: Nullable[int]
|
||||
r"""Native reasoning tokens as reported by provider"""
|
||||
num_input_audio_prompt: Nullable[int]
|
||||
r"""Number of audio inputs in the prompt"""
|
||||
num_media_completion: Nullable[int]
|
||||
r"""Number of media items in the completion"""
|
||||
num_media_prompt: Nullable[int]
|
||||
r"""Number of media items in the prompt"""
|
||||
num_search_results: Nullable[int]
|
||||
r"""Number of search results included"""
|
||||
origin: str
|
||||
r"""Origin URL of the request"""
|
||||
provider_name: Nullable[str]
|
||||
r"""Name of the provider that served the request"""
|
||||
provider_responses: Nullable[
|
||||
List[components_providerresponse.ProviderResponseTypedDict]
|
||||
]
|
||||
r"""List of provider responses for this generation, including fallback attempts"""
|
||||
router: Nullable[str]
|
||||
r"""Router used for the request (e.g., openrouter/auto)"""
|
||||
streamed: Nullable[bool]
|
||||
r"""Whether the response was streamed"""
|
||||
tokens_completion: Nullable[int]
|
||||
r"""Number of tokens in the completion"""
|
||||
tokens_prompt: Nullable[int]
|
||||
r"""Number of tokens in the prompt"""
|
||||
total_cost: float
|
||||
r"""Total cost of the generation in USD"""
|
||||
upstream_id: Nullable[str]
|
||||
r"""Upstream provider's identifier for this generation"""
|
||||
upstream_inference_cost: Nullable[float]
|
||||
r"""Cost charged by the upstream provider"""
|
||||
usage: float
|
||||
r"""Usage amount in USD"""
|
||||
user_agent: Nullable[str]
|
||||
r"""User-Agent header from the request"""
|
||||
request_id: NotRequired[Nullable[str]]
|
||||
r"""Unique identifier grouping all generations from a single API request"""
|
||||
session_id: NotRequired[Nullable[str]]
|
||||
r"""Session identifier grouping multiple generations in the same session"""
|
||||
|
||||
|
||||
class GetGenerationData(BaseModel):
|
||||
r"""Generation data"""
|
||||
|
||||
api_type: Annotated[Nullable[APIType], PlainValidator(validate_open_enum(False))]
|
||||
r"""Type of API used for the generation"""
|
||||
|
||||
app_id: Nullable[int]
|
||||
r"""ID of the app that made the request"""
|
||||
|
||||
cache_discount: Nullable[float]
|
||||
r"""Discount applied due to caching"""
|
||||
|
||||
cancelled: Nullable[bool]
|
||||
r"""Whether the generation was cancelled"""
|
||||
|
||||
created_at: str
|
||||
r"""ISO 8601 timestamp of when the generation was created"""
|
||||
|
||||
external_user: Nullable[str]
|
||||
r"""External user identifier"""
|
||||
|
||||
finish_reason: Nullable[str]
|
||||
r"""Reason the generation finished"""
|
||||
|
||||
generation_time: Nullable[float]
|
||||
r"""Time taken for generation in milliseconds"""
|
||||
|
||||
http_referer: Nullable[str]
|
||||
r"""Referer header from the request"""
|
||||
|
||||
id: str
|
||||
r"""Unique identifier for the generation"""
|
||||
|
||||
is_byok: bool
|
||||
r"""Whether this used bring-your-own-key"""
|
||||
|
||||
latency: Nullable[float]
|
||||
r"""Total latency in milliseconds"""
|
||||
|
||||
model: str
|
||||
r"""Model used for the generation"""
|
||||
|
||||
moderation_latency: Nullable[float]
|
||||
r"""Moderation latency in milliseconds"""
|
||||
|
||||
native_finish_reason: Nullable[str]
|
||||
r"""Native finish reason as reported by provider"""
|
||||
|
||||
native_tokens_cached: Nullable[int]
|
||||
r"""Native cached tokens as reported by provider"""
|
||||
|
||||
native_tokens_completion: Nullable[int]
|
||||
r"""Native completion tokens as reported by provider"""
|
||||
|
||||
native_tokens_completion_images: Nullable[int]
|
||||
r"""Native completion image tokens as reported by provider"""
|
||||
|
||||
native_tokens_prompt: Nullable[int]
|
||||
r"""Native prompt tokens as reported by provider"""
|
||||
|
||||
native_tokens_reasoning: Nullable[int]
|
||||
r"""Native reasoning tokens as reported by provider"""
|
||||
|
||||
num_input_audio_prompt: Nullable[int]
|
||||
r"""Number of audio inputs in the prompt"""
|
||||
|
||||
num_media_completion: Nullable[int]
|
||||
r"""Number of media items in the completion"""
|
||||
|
||||
num_media_prompt: Nullable[int]
|
||||
r"""Number of media items in the prompt"""
|
||||
|
||||
num_search_results: Nullable[int]
|
||||
r"""Number of search results included"""
|
||||
|
||||
origin: str
|
||||
r"""Origin URL of the request"""
|
||||
|
||||
provider_name: Nullable[str]
|
||||
r"""Name of the provider that served the request"""
|
||||
|
||||
provider_responses: Nullable[List[components_providerresponse.ProviderResponse]]
|
||||
r"""List of provider responses for this generation, including fallback attempts"""
|
||||
|
||||
router: Nullable[str]
|
||||
r"""Router used for the request (e.g., openrouter/auto)"""
|
||||
|
||||
streamed: Nullable[bool]
|
||||
r"""Whether the response was streamed"""
|
||||
|
||||
tokens_completion: Nullable[int]
|
||||
r"""Number of tokens in the completion"""
|
||||
|
||||
tokens_prompt: Nullable[int]
|
||||
r"""Number of tokens in the prompt"""
|
||||
|
||||
total_cost: float
|
||||
r"""Total cost of the generation in USD"""
|
||||
|
||||
upstream_id: Nullable[str]
|
||||
r"""Upstream provider's identifier for this generation"""
|
||||
|
||||
upstream_inference_cost: Nullable[float]
|
||||
r"""Cost charged by the upstream provider"""
|
||||
|
||||
usage: float
|
||||
r"""Usage amount in USD"""
|
||||
|
||||
user_agent: Nullable[str]
|
||||
r"""User-Agent header from the request"""
|
||||
|
||||
request_id: OptionalNullable[str] = UNSET
|
||||
r"""Unique identifier grouping all generations from a single API request"""
|
||||
|
||||
session_id: OptionalNullable[str] = UNSET
|
||||
r"""Session identifier grouping multiple generations in the same session"""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["request_id", "session_id"]
|
||||
nullable_fields = [
|
||||
"api_type",
|
||||
"app_id",
|
||||
"cache_discount",
|
||||
"cancelled",
|
||||
"external_user",
|
||||
"finish_reason",
|
||||
"generation_time",
|
||||
"http_referer",
|
||||
"latency",
|
||||
"moderation_latency",
|
||||
"native_finish_reason",
|
||||
"native_tokens_cached",
|
||||
"native_tokens_completion",
|
||||
"native_tokens_completion_images",
|
||||
"native_tokens_prompt",
|
||||
"native_tokens_reasoning",
|
||||
"num_input_audio_prompt",
|
||||
"num_media_completion",
|
||||
"num_media_prompt",
|
||||
"num_search_results",
|
||||
"provider_name",
|
||||
"provider_responses",
|
||||
"request_id",
|
||||
"router",
|
||||
"session_id",
|
||||
"streamed",
|
||||
"tokens_completion",
|
||||
"tokens_prompt",
|
||||
"upstream_id",
|
||||
"upstream_inference_cost",
|
||||
"user_agent",
|
||||
]
|
||||
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 GetGenerationResponseTypedDict(TypedDict):
|
||||
r"""Generation response"""
|
||||
|
||||
data: GetGenerationDataTypedDict
|
||||
r"""Generation data"""
|
||||
|
||||
|
||||
class GetGenerationResponse(BaseModel):
|
||||
r"""Generation response"""
|
||||
|
||||
data: GetGenerationData
|
||||
r"""Generation data"""
|
||||
|
||||
@@ -156,6 +156,8 @@ class GetKeyDataTypedDict(TypedDict):
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC month"""
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
expires_at: NotRequired[Nullable[datetime]]
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
@@ -220,6 +222,9 @@ class GetKeyData(BaseModel):
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
|
||||
expires_at: OptionalNullable[datetime] = UNSET
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class GetModelsGlobals(BaseModel):
|
||||
"""
|
||||
|
||||
|
||||
Category = Union[
|
||||
GetModelsCategory = Union[
|
||||
Literal[
|
||||
"programming",
|
||||
"roleplay",
|
||||
@@ -80,6 +80,22 @@ Category = Union[
|
||||
r"""Filter models by use case category"""
|
||||
|
||||
|
||||
GetModelsSort = Union[
|
||||
Literal[
|
||||
"most-popular",
|
||||
"newest",
|
||||
"top-weekly",
|
||||
"pricing-low-to-high",
|
||||
"pricing-high-to-low",
|
||||
"context-high-to-low",
|
||||
"throughput-high-to-low",
|
||||
"latency-low-to-high",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved."""
|
||||
|
||||
|
||||
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.
|
||||
@@ -94,12 +110,14 @@ class GetModelsRequestTypedDict(TypedDict):
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
category: NotRequired[Category]
|
||||
category: NotRequired[GetModelsCategory]
|
||||
r"""Filter models by use case category"""
|
||||
supported_parameters: NotRequired[str]
|
||||
r"""Filter models by supported parameter (comma-separated)"""
|
||||
output_modalities: NotRequired[str]
|
||||
r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."""
|
||||
sort: NotRequired[GetModelsSort]
|
||||
r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved."""
|
||||
|
||||
|
||||
class GetModelsRequest(BaseModel):
|
||||
@@ -132,7 +150,9 @@ class GetModelsRequest(BaseModel):
|
||||
"""
|
||||
|
||||
category: Annotated[
|
||||
Annotated[Optional[Category], PlainValidator(validate_open_enum(False))],
|
||||
Annotated[
|
||||
Optional[GetModelsCategory], PlainValidator(validate_open_enum(False))
|
||||
],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Filter models by use case category"""
|
||||
@@ -148,3 +168,9 @@ class GetModelsRequest(BaseModel):
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\"."""
|
||||
|
||||
sort: Annotated[
|
||||
Annotated[Optional[GetModelsSort], PlainValidator(validate_open_enum(False))],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved."""
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetObservabilityDestinationGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetObservabilityDestinationGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetObservabilityDestinationRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The destination ID (UUID)."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetObservabilityDestinationRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The destination ID (UUID)."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetPresetGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetPresetGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetPresetRequestTypedDict(TypedDict):
|
||||
slug: str
|
||||
r"""URL-safe slug identifying the preset."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetPresetRequest(BaseModel):
|
||||
slug: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""URL-safe slug identifying the preset."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,114 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetPresetVersionGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetPresetVersionGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetPresetVersionRequestTypedDict(TypedDict):
|
||||
slug: str
|
||||
r"""URL-safe slug identifying the preset."""
|
||||
version: str
|
||||
r"""Version number of the preset."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetPresetVersionRequest(BaseModel):
|
||||
slug: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""URL-safe slug identifying the preset."""
|
||||
|
||||
version: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""Version number of the preset."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,116 @@
|
||||
"""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, QueryParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetRankingsDailyGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetRankingsDailyGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetRankingsDailyRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
start_date: NotRequired[str]
|
||||
r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
|
||||
end_date: NotRequired[str]
|
||||
r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
|
||||
|
||||
|
||||
class GetRankingsDailyRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
start_date: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Start of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to 30 days before `end_date`. The dataset begins at 2025-01-01; earlier values are clamped forward to that floor and the resolved value is echoed in `meta.start_date`."""
|
||||
|
||||
end_date: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""End of the date window in YYYY-MM-DD (UTC), inclusive. Defaults to the most recent completed UTC day. Must be on or after 2025-01-01; earlier values are rejected with a 400."""
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, PathParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class GetWorkspaceGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetWorkspaceGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetWorkspaceRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class GetWorkspaceRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -80,6 +80,8 @@ class ListRequestTypedDict(TypedDict):
|
||||
r"""Whether to include disabled API keys in the response"""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of API keys to skip for pagination"""
|
||||
workspace_id: NotRequired[str]
|
||||
r"""Filter API keys by workspace ID. By default, keys in the default workspace are returned."""
|
||||
|
||||
|
||||
class ListRequest(BaseModel):
|
||||
@@ -123,6 +125,12 @@ class ListRequest(BaseModel):
|
||||
] = None
|
||||
r"""Number of API keys to skip for pagination"""
|
||||
|
||||
workspace_id: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Filter API keys by workspace ID. By default, keys in the default workspace are returned."""
|
||||
|
||||
|
||||
class ListDataTypedDict(TypedDict):
|
||||
byok_usage: float
|
||||
@@ -163,6 +171,8 @@ class ListDataTypedDict(TypedDict):
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC month"""
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
expires_at: NotRequired[Nullable[datetime]]
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
@@ -225,6 +235,9 @@ class ListData(BaseModel):
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
|
||||
expires_at: OptionalNullable[datetime] = UNSET
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
listbyokkeysresponse as components_listbyokkeysresponse,
|
||||
)
|
||||
from openrouter.types import BaseModel, UnrecognizedStr
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
QueryParamMetadata,
|
||||
validate_open_enum,
|
||||
)
|
||||
import pydantic
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import Awaitable, Callable, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class ListBYOKKeysGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListBYOKKeysGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
Provider = Union[
|
||||
Literal[
|
||||
"ai21",
|
||||
"aion-labs",
|
||||
"akashml",
|
||||
"alibaba",
|
||||
"amazon-bedrock",
|
||||
"amazon-nova",
|
||||
"ambient",
|
||||
"anthropic",
|
||||
"arcee-ai",
|
||||
"atlas-cloud",
|
||||
"avian",
|
||||
"azure",
|
||||
"baidu",
|
||||
"baseten",
|
||||
"black-forest-labs",
|
||||
"byteplus",
|
||||
"cerebras",
|
||||
"chutes",
|
||||
"cirrascale",
|
||||
"clarifai",
|
||||
"cloudflare",
|
||||
"cohere",
|
||||
"crusoe",
|
||||
"darkbloom",
|
||||
"decart",
|
||||
"deepinfra",
|
||||
"deepseek",
|
||||
"dekallm",
|
||||
"digitalocean",
|
||||
"featherless",
|
||||
"fireworks",
|
||||
"friendli",
|
||||
"gmicloud",
|
||||
"google-ai-studio",
|
||||
"google-vertex",
|
||||
"groq",
|
||||
"inception",
|
||||
"inceptron",
|
||||
"inference-net",
|
||||
"infermatic",
|
||||
"inflection",
|
||||
"io-net",
|
||||
"ionstream",
|
||||
"liquid",
|
||||
"mancer",
|
||||
"mara",
|
||||
"minimax",
|
||||
"mistral",
|
||||
"modelrun",
|
||||
"modular",
|
||||
"moonshotai",
|
||||
"morph",
|
||||
"ncompass",
|
||||
"nebius",
|
||||
"nex-agi",
|
||||
"nextbit",
|
||||
"novita",
|
||||
"nvidia",
|
||||
"open-inference",
|
||||
"openai",
|
||||
"parasail",
|
||||
"perceptron",
|
||||
"perplexity",
|
||||
"phala",
|
||||
"poolside",
|
||||
"recraft",
|
||||
"reka",
|
||||
"relace",
|
||||
"sambanova",
|
||||
"seed",
|
||||
"siliconflow",
|
||||
"sourceful",
|
||||
"stepfun",
|
||||
"streamlake",
|
||||
"switchpoint",
|
||||
"together",
|
||||
"upstage",
|
||||
"venice",
|
||||
"wafer",
|
||||
"wandb",
|
||||
"xai",
|
||||
"xiaomi",
|
||||
"z-ai",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
|
||||
|
||||
|
||||
class ListBYOKKeysRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of records to skip for pagination"""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
workspace_id: NotRequired[str]
|
||||
r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
|
||||
provider: NotRequired[Provider]
|
||||
r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
|
||||
|
||||
|
||||
class ListBYOKKeysRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
offset: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Number of records to skip for pagination"""
|
||||
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
workspace_id: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
|
||||
|
||||
provider: Annotated[
|
||||
Annotated[Optional[Provider], PlainValidator(validate_open_enum(False))],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`)."""
|
||||
|
||||
|
||||
class ListBYOKKeysResponseTypedDict(TypedDict):
|
||||
result: components_listbyokkeysresponse.ListBYOKKeysResponseTypedDict
|
||||
|
||||
|
||||
class ListBYOKKeysResponse(BaseModel):
|
||||
next: Union[
|
||||
Callable[[], Optional[ListBYOKKeysResponse]],
|
||||
Callable[[], Awaitable[Optional[ListBYOKKeysResponse]]],
|
||||
]
|
||||
|
||||
result: components_listbyokkeysresponse.ListBYOKKeysResponse
|
||||
@@ -0,0 +1,107 @@
|
||||
"""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, QueryParamMetadata
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class ListGenerationContentGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListGenerationContentGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListGenerationContentRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The generation ID"""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListGenerationContentRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
||||
]
|
||||
r"""The generation ID"""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -75,6 +75,8 @@ class ListGuardrailsRequestTypedDict(TypedDict):
|
||||
r"""Number of records to skip for pagination"""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
workspace_id: NotRequired[str]
|
||||
r"""Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned."""
|
||||
|
||||
|
||||
class ListGuardrailsRequest(BaseModel):
|
||||
@@ -118,6 +120,12 @@ class ListGuardrailsRequest(BaseModel):
|
||||
] = None
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
workspace_id: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned."""
|
||||
|
||||
|
||||
class ListGuardrailsResponseTypedDict(TypedDict):
|
||||
result: components_listguardrailsresponse.ListGuardrailsResponseTypedDict
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
listobservabilitydestinationsresponse as components_listobservabilitydestinationsresponse,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
||||
import pydantic
|
||||
from typing import Awaitable, Callable, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class ListObservabilityDestinationsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListObservabilityDestinationsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListObservabilityDestinationsRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of records to skip for pagination"""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
workspace_id: NotRequired[str]
|
||||
r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
|
||||
|
||||
|
||||
class ListObservabilityDestinationsRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
offset: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Number of records to skip for pagination"""
|
||||
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
workspace_id: Annotated[
|
||||
Optional[str],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Optional workspace ID to filter by. Defaults to the authenticated entity's default workspace."""
|
||||
|
||||
|
||||
class ListObservabilityDestinationsResponseTypedDict(TypedDict):
|
||||
result: components_listobservabilitydestinationsresponse.ListObservabilityDestinationsResponseTypedDict
|
||||
|
||||
|
||||
class ListObservabilityDestinationsResponse(BaseModel):
|
||||
next: Union[
|
||||
Callable[[], Optional[ListObservabilityDestinationsResponse]],
|
||||
Callable[[], Awaitable[Optional[ListObservabilityDestinationsResponse]]],
|
||||
]
|
||||
|
||||
result: components_listobservabilitydestinationsresponse.ListObservabilityDestinationsResponse
|
||||
@@ -0,0 +1,130 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import listpresetsresponse as components_listpresetsresponse
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
||||
import pydantic
|
||||
from typing import Awaitable, Callable, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class ListPresetsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListPresetsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListPresetsRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of records to skip for pagination"""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
|
||||
class ListPresetsRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
offset: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Number of records to skip for pagination"""
|
||||
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
|
||||
class ListPresetsResponseTypedDict(TypedDict):
|
||||
result: components_listpresetsresponse.ListPresetsResponseTypedDict
|
||||
|
||||
|
||||
class ListPresetsResponse(BaseModel):
|
||||
next: Union[
|
||||
Callable[[], Optional[ListPresetsResponse]],
|
||||
Callable[[], Awaitable[Optional[ListPresetsResponse]]],
|
||||
]
|
||||
|
||||
result: components_listpresetsresponse.ListPresetsResponse
|
||||
@@ -0,0 +1,144 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
listpresetversionsresponse as components_listpresetversionsresponse,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
QueryParamMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Awaitable, Callable, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class ListPresetVersionsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListPresetVersionsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListPresetVersionsRequestTypedDict(TypedDict):
|
||||
slug: str
|
||||
r"""URL-safe slug identifying the preset."""
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of records to skip for pagination"""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
|
||||
class ListPresetVersionsRequest(BaseModel):
|
||||
slug: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""URL-safe slug identifying the preset."""
|
||||
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
offset: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Number of records to skip for pagination"""
|
||||
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
|
||||
class ListPresetVersionsResponseTypedDict(TypedDict):
|
||||
result: components_listpresetversionsresponse.ListPresetVersionsResponseTypedDict
|
||||
|
||||
|
||||
class ListPresetVersionsResponse(BaseModel):
|
||||
next: Union[
|
||||
Callable[[], Optional[ListPresetVersionsResponse]],
|
||||
Callable[[], Awaitable[Optional[ListPresetVersionsResponse]]],
|
||||
]
|
||||
|
||||
result: components_listpresetversionsresponse.ListPresetVersionsResponse
|
||||
@@ -0,0 +1,132 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
listworkspacesresponse as components_listworkspacesresponse,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
||||
import pydantic
|
||||
from typing import Awaitable, Callable, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class ListWorkspacesGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListWorkspacesGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class ListWorkspacesRequestTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
offset: NotRequired[int]
|
||||
r"""Number of records to skip for pagination"""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
|
||||
class ListWorkspacesRequest(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
offset: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Number of records to skip for pagination"""
|
||||
|
||||
limit: Annotated[
|
||||
Optional[int],
|
||||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||||
] = None
|
||||
r"""Maximum number of records to return (max 100)"""
|
||||
|
||||
|
||||
class ListWorkspacesResponseTypedDict(TypedDict):
|
||||
result: components_listworkspacesresponse.ListWorkspacesResponseTypedDict
|
||||
|
||||
|
||||
class ListWorkspacesResponse(BaseModel):
|
||||
next: Union[
|
||||
Callable[[], Optional[ListWorkspacesResponse]],
|
||||
Callable[[], Awaitable[Optional[ListWorkspacesResponse]]],
|
||||
]
|
||||
|
||||
result: components_listworkspacesresponse.ListWorkspacesResponse
|
||||
@@ -0,0 +1,265 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from datetime import datetime
|
||||
from openrouter.types import BaseModel, UnrecognizedStr
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
RequestMetadata,
|
||||
validate_open_enum,
|
||||
)
|
||||
import pydantic
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import List, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||
|
||||
|
||||
class QueryAnalyticsGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class QueryAnalyticsGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
Value2TypedDict = TypeAliasType("Value2TypedDict", Union[str, float])
|
||||
|
||||
|
||||
Value2 = TypeAliasType("Value2", Union[str, float])
|
||||
|
||||
|
||||
Value1TypedDict = TypeAliasType(
|
||||
"Value1TypedDict", Union[str, float, List[Value2TypedDict]]
|
||||
)
|
||||
r"""Filter value (scalar or array depending on operator)"""
|
||||
|
||||
|
||||
Value1 = TypeAliasType("Value1", Union[str, float, List[Value2]])
|
||||
r"""Filter value (scalar or array depending on operator)"""
|
||||
|
||||
|
||||
class FilterTypedDict(TypedDict):
|
||||
field: str
|
||||
r"""Dimension to filter on"""
|
||||
operator: str
|
||||
r"""Filter operator"""
|
||||
value: Value1TypedDict
|
||||
r"""Filter value (scalar or array depending on operator)"""
|
||||
|
||||
|
||||
class Filter(BaseModel):
|
||||
field: str
|
||||
r"""Dimension to filter on"""
|
||||
|
||||
operator: str
|
||||
r"""Filter operator"""
|
||||
|
||||
value: Value1
|
||||
r"""Filter value (scalar or array depending on operator)"""
|
||||
|
||||
|
||||
Direction = Union[
|
||||
Literal[
|
||||
"asc",
|
||||
"desc",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
|
||||
|
||||
class OrderByTypedDict(TypedDict):
|
||||
direction: Direction
|
||||
field: str
|
||||
r"""Field to order by"""
|
||||
|
||||
|
||||
class OrderBy(BaseModel):
|
||||
direction: Annotated[Direction, PlainValidator(validate_open_enum(False))]
|
||||
|
||||
field: str
|
||||
r"""Field to order by"""
|
||||
|
||||
|
||||
class TimeRangeTypedDict(TypedDict):
|
||||
end: datetime
|
||||
start: datetime
|
||||
|
||||
|
||||
class TimeRange(BaseModel):
|
||||
end: datetime
|
||||
|
||||
start: datetime
|
||||
|
||||
|
||||
class QueryAnalyticsRequestBodyTypedDict(TypedDict):
|
||||
metrics: List[str]
|
||||
dimensions: NotRequired[List[str]]
|
||||
filters: NotRequired[List[FilterTypedDict]]
|
||||
granularity: NotRequired[str]
|
||||
r"""Time granularity"""
|
||||
group_limit: NotRequired[int]
|
||||
r"""Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified."""
|
||||
limit: NotRequired[int]
|
||||
r"""Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations."""
|
||||
order_by: NotRequired[OrderByTypedDict]
|
||||
time_range: NotRequired[TimeRangeTypedDict]
|
||||
|
||||
|
||||
class QueryAnalyticsRequestBody(BaseModel):
|
||||
metrics: List[str]
|
||||
|
||||
dimensions: Optional[List[str]] = None
|
||||
|
||||
filters: Optional[List[Filter]] = None
|
||||
|
||||
granularity: Optional[str] = None
|
||||
r"""Time granularity"""
|
||||
|
||||
group_limit: Optional[int] = None
|
||||
r"""Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified."""
|
||||
|
||||
limit: Optional[int] = None
|
||||
r"""Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations."""
|
||||
|
||||
order_by: Optional[OrderBy] = None
|
||||
|
||||
time_range: Optional[TimeRange] = None
|
||||
|
||||
|
||||
class QueryAnalyticsRequestTypedDict(TypedDict):
|
||||
request_body: QueryAnalyticsRequestBodyTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class QueryAnalyticsRequest(BaseModel):
|
||||
request_body: Annotated[
|
||||
QueryAnalyticsRequestBody,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class QueryAnalyticsData1TypedDict(TypedDict):
|
||||
r"""A row of analytics data with metric/dimension values"""
|
||||
|
||||
|
||||
class QueryAnalyticsData1(BaseModel):
|
||||
r"""A row of analytics data with metric/dimension values"""
|
||||
|
||||
|
||||
class MetadataTypedDict(TypedDict):
|
||||
query_time_ms: float
|
||||
row_count: int
|
||||
truncated: bool
|
||||
|
||||
|
||||
class Metadata(BaseModel):
|
||||
query_time_ms: float
|
||||
|
||||
row_count: int
|
||||
|
||||
truncated: bool
|
||||
|
||||
|
||||
class QueryAnalyticsData2TypedDict(TypedDict):
|
||||
data: List[QueryAnalyticsData1TypedDict]
|
||||
metadata: MetadataTypedDict
|
||||
cached_at: NotRequired[float]
|
||||
|
||||
|
||||
class QueryAnalyticsData2(BaseModel):
|
||||
data: List[QueryAnalyticsData1]
|
||||
|
||||
metadata: Metadata
|
||||
|
||||
cached_at: Annotated[Optional[float], pydantic.Field(alias="cachedAt")] = None
|
||||
|
||||
|
||||
class QueryAnalyticsResponseTypedDict(TypedDict):
|
||||
r"""Analytics query results"""
|
||||
|
||||
data: QueryAnalyticsData2TypedDict
|
||||
|
||||
|
||||
class QueryAnalyticsResponse(BaseModel):
|
||||
r"""Analytics query results"""
|
||||
|
||||
data: QueryAnalyticsData2
|
||||
@@ -5,6 +5,7 @@ from openrouter.components import (
|
||||
chatrequest as components_chatrequest,
|
||||
chatresult as components_chatresult,
|
||||
chatstreamchunk as components_chatstreamchunk,
|
||||
metadatalevel as components_metadatalevel,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
@@ -12,8 +13,10 @@ from openrouter.utils import (
|
||||
HeaderMetadata,
|
||||
RequestMetadata,
|
||||
eventstreaming,
|
||||
validate_open_enum,
|
||||
)
|
||||
import pydantic
|
||||
from pydantic.functional_validators import PlainValidator
|
||||
from typing import Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||
|
||||
@@ -79,6 +82,8 @@ class SendChatCompletionRequestRequestTypedDict(TypedDict):
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
x_open_router_metadata: NotRequired[components_metadatalevel.MetadataLevel]
|
||||
r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
|
||||
|
||||
|
||||
class SendChatCompletionRequestRequest(BaseModel):
|
||||
@@ -115,19 +120,15 @@ class SendChatCompletionRequestRequest(BaseModel):
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class SendChatCompletionRequestResponseBodyTypedDict(TypedDict):
|
||||
r"""Successful chat completion response"""
|
||||
|
||||
data: components_chatstreamchunk.ChatStreamChunkTypedDict
|
||||
r"""Streaming chat completion chunk"""
|
||||
|
||||
|
||||
class SendChatCompletionRequestResponseBody(BaseModel):
|
||||
r"""Successful chat completion response"""
|
||||
|
||||
data: components_chatstreamchunk.ChatStreamChunk
|
||||
r"""Streaming chat completion chunk"""
|
||||
x_open_router_metadata: Annotated[
|
||||
Annotated[
|
||||
Optional[components_metadatalevel.MetadataLevel],
|
||||
PlainValidator(validate_open_enum(False)),
|
||||
],
|
||||
pydantic.Field(alias="X-OpenRouter-Metadata"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility."""
|
||||
|
||||
|
||||
SendChatCompletionRequestResponseTypedDict = TypeAliasType(
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
updatebyokkeyrequest as components_updatebyokkeyrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class UpdateBYOKKeyGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateBYOKKeyGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateBYOKKeyRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The BYOK credential ID (UUID)."""
|
||||
update_byok_key_request: (
|
||||
components_updatebyokkeyrequest.UpdateBYOKKeyRequestTypedDict
|
||||
)
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateBYOKKeyRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The BYOK credential ID (UUID)."""
|
||||
|
||||
update_byok_key_request: Annotated[
|
||||
components_updatebyokkeyrequest.UpdateBYOKKeyRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -250,6 +250,8 @@ class UpdateKeysDataTypedDict(TypedDict):
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC month"""
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
expires_at: NotRequired[Nullable[datetime]]
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
@@ -314,6 +316,9 @@ class UpdateKeysData(BaseModel):
|
||||
usage_weekly: float
|
||||
r"""OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)"""
|
||||
|
||||
workspace_id: str
|
||||
r"""The workspace ID this API key belongs to."""
|
||||
|
||||
expires_at: OptionalNullable[datetime] = UNSET
|
||||
r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration"""
|
||||
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
updateobservabilitydestinationrequest as components_updateobservabilitydestinationrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class UpdateObservabilityDestinationGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateObservabilityDestinationGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateObservabilityDestinationRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The destination ID (UUID)."""
|
||||
update_observability_destination_request: components_updateobservabilitydestinationrequest.UpdateObservabilityDestinationRequestTypedDict
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateObservabilityDestinationRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The destination ID (UUID)."""
|
||||
|
||||
update_observability_destination_request: Annotated[
|
||||
components_updateobservabilitydestinationrequest.UpdateObservabilityDestinationRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,123 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
updateworkspacerequest as components_updateworkspacerequest,
|
||||
)
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import (
|
||||
FieldMetadata,
|
||||
HeaderMetadata,
|
||||
PathParamMetadata,
|
||||
RequestMetadata,
|
||||
)
|
||||
import pydantic
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class UpdateWorkspaceGlobalsTypedDict(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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateWorkspaceGlobals(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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateWorkspaceRequestTypedDict(TypedDict):
|
||||
id: str
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
update_workspace_request: (
|
||||
components_updateworkspacerequest.UpdateWorkspaceRequestTypedDict
|
||||
)
|
||||
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_open_router_title: NotRequired[str]
|
||||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
"""
|
||||
x_open_router_categories: NotRequired[str]
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UpdateWorkspaceRequest(BaseModel):
|
||||
id: Annotated[
|
||||
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
||||
]
|
||||
r"""The workspace ID (UUID) or slug"""
|
||||
|
||||
update_workspace_request: Annotated[
|
||||
components_updateworkspacerequest.UpdateWorkspaceRequest,
|
||||
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_open_router_title: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-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.
|
||||
|
||||
"""
|
||||
|
||||
x_open_router_categories: Annotated[
|
||||
Optional[str],
|
||||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||||
] = None
|
||||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||||
|
||||
"""
|
||||
Reference in New Issue
Block a user