"""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, RequestMetadata, ) import pydantic from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict class BulkUnassignKeysFromGuardrailGlobalsTypedDict(TypedDict): http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ class BulkUnassignKeysFromGuardrailGlobals(BaseModel): http_referer: Annotated[ Optional[str], pydantic.Field(alias="HTTP-Referer"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_title: Annotated[ Optional[str], pydantic.Field(alias="X-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ class BulkUnassignKeysFromGuardrailRequestBodyTypedDict(TypedDict): key_hashes: List[str] r"""Array of API key hashes to unassign from the guardrail""" class BulkUnassignKeysFromGuardrailRequestBody(BaseModel): key_hashes: List[str] r"""Array of API key hashes to unassign from the guardrail""" class BulkUnassignKeysFromGuardrailRequestTypedDict(TypedDict): id: str r"""The unique identifier of the guardrail""" request_body: BulkUnassignKeysFromGuardrailRequestBodyTypedDict http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ class BulkUnassignKeysFromGuardrailRequest(BaseModel): id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] r"""The unique identifier of the guardrail""" request_body: Annotated[ BulkUnassignKeysFromGuardrailRequestBody, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] http_referer: Annotated[ Optional[str], pydantic.Field(alias="HTTP-Referer"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ x_title: Annotated[ Optional[str], pydantic.Field(alias="X-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ class BulkUnassignKeysFromGuardrailResponseTypedDict(TypedDict): r"""Unassignment result""" unassigned_count: float r"""Number of keys successfully unassigned""" class BulkUnassignKeysFromGuardrailResponse(BaseModel): r"""Unassignment result""" unassigned_count: float r"""Number of keys successfully unassigned"""