"""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, QueryParamMetadata, validate_open_enum, ) import pydantic from pydantic.functional_validators import PlainValidator from typing import Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict class GetModelsGlobalsTypedDict(TypedDict): http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_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 GetModelsGlobals(BaseModel): http_referer: Annotated[ Optional[str], pydantic.Field(alias="HTTP-Referer"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_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 = Union[ Literal[ "programming", "roleplay", "marketing", "marketing/seo", "technology", "science", "translation", "legal", "finance", "health", "trivia", "academia", ], UnrecognizedStr, ] r"""Filter models by use case category""" class GetModelsRequestTypedDict(TypedDict): http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_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[Category] r"""Filter models by use case category""" supported_parameters: NotRequired[str] 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\".""" class GetModelsRequest(BaseModel): http_referer: Annotated[ Optional[str], pydantic.Field(alias="HTTP-Referer"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_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[Category], PlainValidator(validate_open_enum(False))], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""Filter models by use case category""" supported_parameters: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None output_modalities: Annotated[ Optional[str], 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\"."""