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 { NativeTools } from "./nativetools.js"; import { Parameter } from "./parameter.js"; import { PercentileStats } from "./percentilestats.js"; import { PerfLast30mByWorkload } from "./perflast30mbyworkload.js"; import { Pricing } from "./pricing.js"; import { ProviderName } from "./providername.js"; import { PublicServiceTier } from "./publicservicetier.js"; import { Quantization } from "./quantization.js"; import { ToolChoiceSupport } from "./toolchoicesupport.js"; /** * 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; /** * The server tools this endpoint accepts as the provider's own built-in tool (`engine: "native"`) instead of an OpenRouter engine, keyed by canonical `openrouter:*` name. Each value names the provider tool type the request is translated to. Where that tool runs (provider-side, or returned to the client as with Anthropic bash) is documented per tool. Empty when the provider has none. */ nativeTools: { [k: string]: NativeTools; }; /** * 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; /** * The service tier this endpoint sells, or null for a standard endpoint. The same value whether the provider selects the tier with a request parameter or with a dedicated model id. Always the canonical tier: priority covers the fast request alias and the turbo, highspeed, and prime provider model-id spellings, none of which this field reports. */ serviceTier: PublicServiceTier | null; status?: EndpointStatus | undefined; supportedParameters: Array; /** * Whether this STT endpoint can label each transcript segment with a speaker (speaker diarization). For transcription endpoints, derived from the serving STT adapter: true when that adapter supports `diarize: true` for this model. Diarized requests also need `response_format: verbose_json`. */ supportsDiarization: boolean; /** * 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 day: the share of minutes in which at least 80% of provider attempts succeeded, counting only minutes with 10 or more attempts. Rate-limited and caller-caused failures are excluded. Null when no minute had enough traffic. */ uptimeLast1d: number | null; uptimeLast30m: number | null; /** * Uptime percentage over the last 5 minutes: the share of minutes in which at least 80% of provider attempts succeeded, counting only minutes with 10 or more attempts. Rate-limited and caller-caused failures are excluded. Null when no minute had enough traffic. */ uptimeLast5m: number | null; }; /** @internal */ export declare const PublicEndpoint$inboundSchema: z.ZodType; export declare function publicEndpointFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=publicendpoint.d.ts.map