import * as z from "zod/v4"; import { Result as SafeParseResult } from "../types/fp.js"; import { EndpointStatus } from "./endpointstatus.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { Parameter } from "./parameter.js"; import { PercentileStats } from "./percentilestats.js"; import { PricingOverride } from "./pricingoverride.js"; import { ProviderName } from "./providername.js"; import { Quantization } from "./quantization.js"; import { ToolChoiceSupport } from "./toolchoicesupport.js"; export type Decisions = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type Embeddings = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type ImageGeneration = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type Rerank = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type STT = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type TextGeneration = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type TTS = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type Unknown = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; export type VideoGeneration = { latency: PercentileStats | null; /** * Total requests admitted for this workload in the window. */ requestCount: number | null; throughput: PercentileStats | null; }; /** * Endpoint performance over the last 30 minutes, keyed by the kind of request served (e.g. `text_generation`, `image_generation`). Additive to the legacy singular latency and throughput fields; image and video generation report end-to-end latency. Only visible when authenticated with an API key or cookie. */ export type PerfLast30mByWorkload = { decisions?: Decisions | undefined; embeddings?: Embeddings | undefined; imageGeneration?: ImageGeneration | undefined; rerank?: Rerank | undefined; stt?: STT | undefined; textGeneration?: TextGeneration | undefined; tts?: TTS | undefined; unknown?: Unknown | undefined; videoGeneration?: VideoGeneration | undefined; }; export type Pricing = { /** * Price in USD per audio input token */ audio?: string | undefined; /** * Price in USD per audio output token */ audioOutput?: string | undefined; /** * Price in USD per token for completion (output) generation */ completion: string; /** * Fractional discount applied to this endpoint's pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) */ discount?: number | undefined; /** * Price in USD per input image */ image?: string | undefined; /** * Price in USD per output image */ imageOutput?: string | undefined; /** * Price in USD per image token */ imageToken?: string | undefined; /** * Price in USD per cached audio input token */ inputAudioCache?: string | undefined; /** * Price in USD per cached input token (read) */ inputCacheRead?: string | undefined; /** * Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. */ inputCacheWrite?: string | undefined; /** * Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. */ inputCacheWrite1h?: string | undefined; /** * Price in USD per internal reasoning token */ internalReasoning?: string | undefined; /** * Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions. */ overrides?: Array | undefined; /** * Price in USD per token for prompt (input) processing */ prompt: string; /** * Price in USD per request */ request?: string | undefined; /** * Price in USD per web search */ webSearch?: string | undefined; }; /** * Information about a specific model endpoint */ export type PublicEndpoint = { contextLength: number; /** * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. */ latencyLast30m: PercentileStats | null; /** * Maximum completion tokens for this endpoint. Input and output tokens share the context window, so the effective maximum output for a request is further limited by the context remaining after input tokens. */ maxCompletionTokens: number | null; maxPromptTokens: number | null; /** * The unique identifier for the model (permaslug) */ modelId: string; modelName: string; name: string; /** * Endpoint performance over the last 30 minutes, keyed by the kind of request served (e.g. `text_generation`, `image_generation`). Additive to the legacy singular latency and throughput fields; image and video generation report end-to-end latency. Only visible when authenticated with an API key or cookie. */ perfLast30mByWorkload?: PerfLast30mByWorkload | undefined; pricing: Pricing; providerName: ProviderName; quantization: Quantization | null; status?: EndpointStatus | undefined; supportedParameters: Array; /** * Whether this TTS endpoint accepts an `image_url` reference describing the desired voice. Requests carrying an image reference are only routed to endpoints where this is true. */ supportsImageReference: boolean; supportsImplicitCaching: boolean; /** * Whether this TTS endpoint accepts more than one `input_audio` reference clip per request. Requests carrying several clips are only routed to endpoints where this is true. */ supportsMultipleAudioReferences: boolean; /** * Per-variant `tool_choice` support. `tool_choice` in `supported_parameters` only says the parameter is accepted; these flags say which of its values passed testing. */ supportsToolChoice: ToolChoiceSupport; /** * Whether this TTS endpoint accepts inline reference audio (`input_references`) for stateless voice cloning. Requests carrying reference audio are only routed to endpoints where this is true. */ supportsVoiceCloning: boolean; tag: string; throughputLast30m: PercentileStats | null; /** * Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. */ uptimeLast1d: number | null; uptimeLast30m: number | null; /** * Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. */ uptimeLast5m: number | null; }; /** @internal */ export declare const Decisions$inboundSchema: z.ZodType; export declare function decisionsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Embeddings$inboundSchema: z.ZodType; export declare function embeddingsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ImageGeneration$inboundSchema: z.ZodType; export declare function imageGenerationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Rerank$inboundSchema: z.ZodType; export declare function rerankFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const STT$inboundSchema: z.ZodType; export declare function sttFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TextGeneration$inboundSchema: z.ZodType; export declare function textGenerationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TTS$inboundSchema: z.ZodType; export declare function ttsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Unknown$inboundSchema: z.ZodType; export declare function unknownFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const VideoGeneration$inboundSchema: z.ZodType; export declare function videoGenerationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PerfLast30mByWorkload$inboundSchema: z.ZodType; export declare function perfLast30mByWorkloadFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Pricing$inboundSchema: z.ZodType; export declare function pricingFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PublicEndpoint$inboundSchema: z.ZodType; export declare function publicEndpointFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=publicendpoint.d.ts.map