"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from typing import TYPE_CHECKING
from importlib import import_module
import builtins
import sys

if TYPE_CHECKING:
    from .createauthkeyscode import (
        CreateAuthKeysCodeCodeChallengeMethod,
        CreateAuthKeysCodeData,
        CreateAuthKeysCodeDataTypedDict,
        CreateAuthKeysCodeRequest,
        CreateAuthKeysCodeRequestTypedDict,
        CreateAuthKeysCodeResponse,
        CreateAuthKeysCodeResponseTypedDict,
    )
    from .createcoinbasecharge import (
        CallData,
        CallDataTypedDict,
        CreateCoinbaseChargeData,
        CreateCoinbaseChargeDataTypedDict,
        CreateCoinbaseChargeResponse,
        CreateCoinbaseChargeResponseTypedDict,
        CreateCoinbaseChargeSecurity,
        CreateCoinbaseChargeSecurityTypedDict,
        Metadata,
        MetadataTypedDict,
        TransferIntent,
        TransferIntentTypedDict,
        Web3Data,
        Web3DataTypedDict,
    )
    from .createembeddings import (
        Content,
        ContentImageURL,
        ContentImageURLTypedDict,
        ContentText,
        ContentTextTypedDict,
        ContentTypedDict,
        CreateEmbeddingsData,
        CreateEmbeddingsDataTypedDict,
        CreateEmbeddingsRequest,
        CreateEmbeddingsRequestTypedDict,
        CreateEmbeddingsResponse,
        CreateEmbeddingsResponseBody,
        CreateEmbeddingsResponseBodyTypedDict,
        CreateEmbeddingsResponseTypedDict,
        Embedding,
        EmbeddingTypedDict,
        EncodingFormat,
        ImageURL,
        ImageURLTypedDict,
        Input,
        InputTypedDict,
        InputUnion,
        InputUnionTypedDict,
        Object,
        ObjectEmbedding,
        TypeImageURL,
        TypeText,
        Usage,
        UsageTypedDict,
    )
    from .createkeys import (
        CreateKeysData,
        CreateKeysDataTypedDict,
        CreateKeysLimitReset,
        CreateKeysRequest,
        CreateKeysRequestTypedDict,
        CreateKeysResponse,
        CreateKeysResponseTypedDict,
    )
    from .createresponses import (
        CreateResponsesResponse,
        CreateResponsesResponseBody,
        CreateResponsesResponseBodyTypedDict,
        CreateResponsesResponseTypedDict,
    )
    from .deletekeys import (
        DeleteKeysRequest,
        DeleteKeysRequestTypedDict,
        DeleteKeysResponse,
        DeleteKeysResponseTypedDict,
    )
    from .exchangeauthcodeforapikey import (
        ExchangeAuthCodeForAPIKeyCodeChallengeMethod,
        ExchangeAuthCodeForAPIKeyRequest,
        ExchangeAuthCodeForAPIKeyRequestTypedDict,
        ExchangeAuthCodeForAPIKeyResponse,
        ExchangeAuthCodeForAPIKeyResponseTypedDict,
    )
    from .getcredits import (
        GetCreditsData,
        GetCreditsDataTypedDict,
        GetCreditsResponse,
        GetCreditsResponseTypedDict,
    )
    from .getcurrentkey import (
        GetCurrentKeyData,
        GetCurrentKeyDataTypedDict,
        GetCurrentKeyResponse,
        GetCurrentKeyResponseTypedDict,
        RateLimit,
        RateLimitTypedDict,
    )
    from .getgeneration import (
        APIType,
        GetGenerationData,
        GetGenerationDataTypedDict,
        GetGenerationRequest,
        GetGenerationRequestTypedDict,
        GetGenerationResponse,
        GetGenerationResponseTypedDict,
    )
    from .getkey import (
        GetKeyData,
        GetKeyDataTypedDict,
        GetKeyRequest,
        GetKeyRequestTypedDict,
        GetKeyResponse,
        GetKeyResponseTypedDict,
    )
    from .getmodels import GetModelsRequest, GetModelsRequestTypedDict
    from .getparameters import (
        GetParametersData,
        GetParametersDataTypedDict,
        GetParametersRequest,
        GetParametersRequestTypedDict,
        GetParametersResponse,
        GetParametersResponseTypedDict,
        GetParametersSecurity,
        GetParametersSecurityTypedDict,
        SupportedParameter,
    )
    from .getuseractivity import (
        GetUserActivityRequest,
        GetUserActivityRequestTypedDict,
        GetUserActivityResponse,
        GetUserActivityResponseTypedDict,
    )
    from .list import (
        ListData,
        ListDataTypedDict,
        ListRequest,
        ListRequestTypedDict,
        ListResponse,
        ListResponseTypedDict,
    )
    from .listendpoints import (
        ListEndpointsRequest,
        ListEndpointsRequestTypedDict,
        ListEndpointsResponse,
        ListEndpointsResponseTypedDict,
    )
    from .listendpointszdr import (
        ListEndpointsZdrResponse,
        ListEndpointsZdrResponseTypedDict,
    )
    from .listmodelsuser import ListModelsUserSecurity, ListModelsUserSecurityTypedDict
    from .listproviders import (
        ListProvidersData,
        ListProvidersDataTypedDict,
        ListProvidersResponse,
        ListProvidersResponseTypedDict,
    )
    from .sendchatcompletionrequest import (
        SendChatCompletionRequestResponse,
        SendChatCompletionRequestResponseTypedDict,
    )
    from .updatekeys import (
        UpdateKeysData,
        UpdateKeysDataTypedDict,
        UpdateKeysLimitReset,
        UpdateKeysRequest,
        UpdateKeysRequestBody,
        UpdateKeysRequestBodyTypedDict,
        UpdateKeysRequestTypedDict,
        UpdateKeysResponse,
        UpdateKeysResponseTypedDict,
    )

__all__ = [
    "APIType",
    "CallData",
    "CallDataTypedDict",
    "Content",
    "ContentImageURL",
    "ContentImageURLTypedDict",
    "ContentText",
    "ContentTextTypedDict",
    "ContentTypedDict",
    "CreateAuthKeysCodeCodeChallengeMethod",
    "CreateAuthKeysCodeData",
    "CreateAuthKeysCodeDataTypedDict",
    "CreateAuthKeysCodeRequest",
    "CreateAuthKeysCodeRequestTypedDict",
    "CreateAuthKeysCodeResponse",
    "CreateAuthKeysCodeResponseTypedDict",
    "CreateCoinbaseChargeData",
    "CreateCoinbaseChargeDataTypedDict",
    "CreateCoinbaseChargeResponse",
    "CreateCoinbaseChargeResponseTypedDict",
    "CreateCoinbaseChargeSecurity",
    "CreateCoinbaseChargeSecurityTypedDict",
    "CreateEmbeddingsData",
    "CreateEmbeddingsDataTypedDict",
    "CreateEmbeddingsRequest",
    "CreateEmbeddingsRequestTypedDict",
    "CreateEmbeddingsResponse",
    "CreateEmbeddingsResponseBody",
    "CreateEmbeddingsResponseBodyTypedDict",
    "CreateEmbeddingsResponseTypedDict",
    "CreateKeysData",
    "CreateKeysDataTypedDict",
    "CreateKeysLimitReset",
    "CreateKeysRequest",
    "CreateKeysRequestTypedDict",
    "CreateKeysResponse",
    "CreateKeysResponseTypedDict",
    "CreateResponsesResponse",
    "CreateResponsesResponseBody",
    "CreateResponsesResponseBodyTypedDict",
    "CreateResponsesResponseTypedDict",
    "DeleteKeysRequest",
    "DeleteKeysRequestTypedDict",
    "DeleteKeysResponse",
    "DeleteKeysResponseTypedDict",
    "Embedding",
    "EmbeddingTypedDict",
    "EncodingFormat",
    "ExchangeAuthCodeForAPIKeyCodeChallengeMethod",
    "ExchangeAuthCodeForAPIKeyRequest",
    "ExchangeAuthCodeForAPIKeyRequestTypedDict",
    "ExchangeAuthCodeForAPIKeyResponse",
    "ExchangeAuthCodeForAPIKeyResponseTypedDict",
    "GetCreditsData",
    "GetCreditsDataTypedDict",
    "GetCreditsResponse",
    "GetCreditsResponseTypedDict",
    "GetCurrentKeyData",
    "GetCurrentKeyDataTypedDict",
    "GetCurrentKeyResponse",
    "GetCurrentKeyResponseTypedDict",
    "GetGenerationData",
    "GetGenerationDataTypedDict",
    "GetGenerationRequest",
    "GetGenerationRequestTypedDict",
    "GetGenerationResponse",
    "GetGenerationResponseTypedDict",
    "GetKeyData",
    "GetKeyDataTypedDict",
    "GetKeyRequest",
    "GetKeyRequestTypedDict",
    "GetKeyResponse",
    "GetKeyResponseTypedDict",
    "GetModelsRequest",
    "GetModelsRequestTypedDict",
    "GetParametersData",
    "GetParametersDataTypedDict",
    "GetParametersRequest",
    "GetParametersRequestTypedDict",
    "GetParametersResponse",
    "GetParametersResponseTypedDict",
    "GetParametersSecurity",
    "GetParametersSecurityTypedDict",
    "GetUserActivityRequest",
    "GetUserActivityRequestTypedDict",
    "GetUserActivityResponse",
    "GetUserActivityResponseTypedDict",
    "ImageURL",
    "ImageURLTypedDict",
    "Input",
    "InputTypedDict",
    "InputUnion",
    "InputUnionTypedDict",
    "ListData",
    "ListDataTypedDict",
    "ListEndpointsRequest",
    "ListEndpointsRequestTypedDict",
    "ListEndpointsResponse",
    "ListEndpointsResponseTypedDict",
    "ListEndpointsZdrResponse",
    "ListEndpointsZdrResponseTypedDict",
    "ListModelsUserSecurity",
    "ListModelsUserSecurityTypedDict",
    "ListProvidersData",
    "ListProvidersDataTypedDict",
    "ListProvidersResponse",
    "ListProvidersResponseTypedDict",
    "ListRequest",
    "ListRequestTypedDict",
    "ListResponse",
    "ListResponseTypedDict",
    "Metadata",
    "MetadataTypedDict",
    "Object",
    "ObjectEmbedding",
    "RateLimit",
    "RateLimitTypedDict",
    "SendChatCompletionRequestResponse",
    "SendChatCompletionRequestResponseTypedDict",
    "SupportedParameter",
    "TransferIntent",
    "TransferIntentTypedDict",
    "TypeImageURL",
    "TypeText",
    "UpdateKeysData",
    "UpdateKeysDataTypedDict",
    "UpdateKeysLimitReset",
    "UpdateKeysRequest",
    "UpdateKeysRequestBody",
    "UpdateKeysRequestBodyTypedDict",
    "UpdateKeysRequestTypedDict",
    "UpdateKeysResponse",
    "UpdateKeysResponseTypedDict",
    "Usage",
    "UsageTypedDict",
    "Web3Data",
    "Web3DataTypedDict",
]

_dynamic_imports: dict[str, str] = {
    "CreateAuthKeysCodeCodeChallengeMethod": ".createauthkeyscode",
    "CreateAuthKeysCodeData": ".createauthkeyscode",
    "CreateAuthKeysCodeDataTypedDict": ".createauthkeyscode",
    "CreateAuthKeysCodeRequest": ".createauthkeyscode",
    "CreateAuthKeysCodeRequestTypedDict": ".createauthkeyscode",
    "CreateAuthKeysCodeResponse": ".createauthkeyscode",
    "CreateAuthKeysCodeResponseTypedDict": ".createauthkeyscode",
    "CallData": ".createcoinbasecharge",
    "CallDataTypedDict": ".createcoinbasecharge",
    "CreateCoinbaseChargeData": ".createcoinbasecharge",
    "CreateCoinbaseChargeDataTypedDict": ".createcoinbasecharge",
    "CreateCoinbaseChargeResponse": ".createcoinbasecharge",
    "CreateCoinbaseChargeResponseTypedDict": ".createcoinbasecharge",
    "CreateCoinbaseChargeSecurity": ".createcoinbasecharge",
    "CreateCoinbaseChargeSecurityTypedDict": ".createcoinbasecharge",
    "Metadata": ".createcoinbasecharge",
    "MetadataTypedDict": ".createcoinbasecharge",
    "TransferIntent": ".createcoinbasecharge",
    "TransferIntentTypedDict": ".createcoinbasecharge",
    "Web3Data": ".createcoinbasecharge",
    "Web3DataTypedDict": ".createcoinbasecharge",
    "Content": ".createembeddings",
    "ContentImageURL": ".createembeddings",
    "ContentImageURLTypedDict": ".createembeddings",
    "ContentText": ".createembeddings",
    "ContentTextTypedDict": ".createembeddings",
    "ContentTypedDict": ".createembeddings",
    "CreateEmbeddingsData": ".createembeddings",
    "CreateEmbeddingsDataTypedDict": ".createembeddings",
    "CreateEmbeddingsRequest": ".createembeddings",
    "CreateEmbeddingsRequestTypedDict": ".createembeddings",
    "CreateEmbeddingsResponse": ".createembeddings",
    "CreateEmbeddingsResponseBody": ".createembeddings",
    "CreateEmbeddingsResponseBodyTypedDict": ".createembeddings",
    "CreateEmbeddingsResponseTypedDict": ".createembeddings",
    "Embedding": ".createembeddings",
    "EmbeddingTypedDict": ".createembeddings",
    "EncodingFormat": ".createembeddings",
    "ImageURL": ".createembeddings",
    "ImageURLTypedDict": ".createembeddings",
    "Input": ".createembeddings",
    "InputTypedDict": ".createembeddings",
    "InputUnion": ".createembeddings",
    "InputUnionTypedDict": ".createembeddings",
    "Object": ".createembeddings",
    "ObjectEmbedding": ".createembeddings",
    "TypeImageURL": ".createembeddings",
    "TypeText": ".createembeddings",
    "Usage": ".createembeddings",
    "UsageTypedDict": ".createembeddings",
    "CreateKeysData": ".createkeys",
    "CreateKeysDataTypedDict": ".createkeys",
    "CreateKeysLimitReset": ".createkeys",
    "CreateKeysRequest": ".createkeys",
    "CreateKeysRequestTypedDict": ".createkeys",
    "CreateKeysResponse": ".createkeys",
    "CreateKeysResponseTypedDict": ".createkeys",
    "CreateResponsesResponse": ".createresponses",
    "CreateResponsesResponseBody": ".createresponses",
    "CreateResponsesResponseBodyTypedDict": ".createresponses",
    "CreateResponsesResponseTypedDict": ".createresponses",
    "DeleteKeysRequest": ".deletekeys",
    "DeleteKeysRequestTypedDict": ".deletekeys",
    "DeleteKeysResponse": ".deletekeys",
    "DeleteKeysResponseTypedDict": ".deletekeys",
    "ExchangeAuthCodeForAPIKeyCodeChallengeMethod": ".exchangeauthcodeforapikey",
    "ExchangeAuthCodeForAPIKeyRequest": ".exchangeauthcodeforapikey",
    "ExchangeAuthCodeForAPIKeyRequestTypedDict": ".exchangeauthcodeforapikey",
    "ExchangeAuthCodeForAPIKeyResponse": ".exchangeauthcodeforapikey",
    "ExchangeAuthCodeForAPIKeyResponseTypedDict": ".exchangeauthcodeforapikey",
    "GetCreditsData": ".getcredits",
    "GetCreditsDataTypedDict": ".getcredits",
    "GetCreditsResponse": ".getcredits",
    "GetCreditsResponseTypedDict": ".getcredits",
    "GetCurrentKeyData": ".getcurrentkey",
    "GetCurrentKeyDataTypedDict": ".getcurrentkey",
    "GetCurrentKeyResponse": ".getcurrentkey",
    "GetCurrentKeyResponseTypedDict": ".getcurrentkey",
    "RateLimit": ".getcurrentkey",
    "RateLimitTypedDict": ".getcurrentkey",
    "APIType": ".getgeneration",
    "GetGenerationData": ".getgeneration",
    "GetGenerationDataTypedDict": ".getgeneration",
    "GetGenerationRequest": ".getgeneration",
    "GetGenerationRequestTypedDict": ".getgeneration",
    "GetGenerationResponse": ".getgeneration",
    "GetGenerationResponseTypedDict": ".getgeneration",
    "GetKeyData": ".getkey",
    "GetKeyDataTypedDict": ".getkey",
    "GetKeyRequest": ".getkey",
    "GetKeyRequestTypedDict": ".getkey",
    "GetKeyResponse": ".getkey",
    "GetKeyResponseTypedDict": ".getkey",
    "GetModelsRequest": ".getmodels",
    "GetModelsRequestTypedDict": ".getmodels",
    "GetParametersData": ".getparameters",
    "GetParametersDataTypedDict": ".getparameters",
    "GetParametersRequest": ".getparameters",
    "GetParametersRequestTypedDict": ".getparameters",
    "GetParametersResponse": ".getparameters",
    "GetParametersResponseTypedDict": ".getparameters",
    "GetParametersSecurity": ".getparameters",
    "GetParametersSecurityTypedDict": ".getparameters",
    "SupportedParameter": ".getparameters",
    "GetUserActivityRequest": ".getuseractivity",
    "GetUserActivityRequestTypedDict": ".getuseractivity",
    "GetUserActivityResponse": ".getuseractivity",
    "GetUserActivityResponseTypedDict": ".getuseractivity",
    "ListData": ".list",
    "ListDataTypedDict": ".list",
    "ListRequest": ".list",
    "ListRequestTypedDict": ".list",
    "ListResponse": ".list",
    "ListResponseTypedDict": ".list",
    "ListEndpointsRequest": ".listendpoints",
    "ListEndpointsRequestTypedDict": ".listendpoints",
    "ListEndpointsResponse": ".listendpoints",
    "ListEndpointsResponseTypedDict": ".listendpoints",
    "ListEndpointsZdrResponse": ".listendpointszdr",
    "ListEndpointsZdrResponseTypedDict": ".listendpointszdr",
    "ListModelsUserSecurity": ".listmodelsuser",
    "ListModelsUserSecurityTypedDict": ".listmodelsuser",
    "ListProvidersData": ".listproviders",
    "ListProvidersDataTypedDict": ".listproviders",
    "ListProvidersResponse": ".listproviders",
    "ListProvidersResponseTypedDict": ".listproviders",
    "SendChatCompletionRequestResponse": ".sendchatcompletionrequest",
    "SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest",
    "UpdateKeysData": ".updatekeys",
    "UpdateKeysDataTypedDict": ".updatekeys",
    "UpdateKeysLimitReset": ".updatekeys",
    "UpdateKeysRequest": ".updatekeys",
    "UpdateKeysRequestBody": ".updatekeys",
    "UpdateKeysRequestBodyTypedDict": ".updatekeys",
    "UpdateKeysRequestTypedDict": ".updatekeys",
    "UpdateKeysResponse": ".updatekeys",
    "UpdateKeysResponseTypedDict": ".updatekeys",
}


def dynamic_import(modname, retries=3):
    for attempt in range(retries):
        try:
            return import_module(modname, __package__)
        except KeyError:
            # Clear any half-initialized module and retry
            sys.modules.pop(modname, None)
            if attempt == retries - 1:
                break
    raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")


def __getattr__(attr_name: str) -> object:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(
            f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
        )

    try:
        module = dynamic_import(module_name)
        result = getattr(module, attr_name)
        return result
    except ImportError as e:
        raise ImportError(
            f"Failed to import {attr_name} from {module_name}: {e}"
        ) from e
    except AttributeError as e:
        raise AttributeError(
            f"Failed to get {attr_name} from {module_name}: {e}"
        ) from e


def __dir__():
    lazy_attrs = builtins.list(_dynamic_imports.keys())
    return builtins.sorted(lazy_attrs)
