ProviderResponse - TypeScript SDK

ProviderResponse type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Details of a provider response for a generation attempt

Example Usage

1import { ProviderResponse } from "@openrouter/sdk/models";
2
3let value: ProviderResponse = {
4 status: 200,
5};

Fields

FieldTypeRequiredDescriptionExample
idstringUpstream provider response identifierchatcmpl-abc123
endpointIdstringInternal endpoint identifierep_abc123
modelPermaslugstringCanonical model slugopenai/gpt-4
providerNamemodels.ProviderResponseProviderNameName of the providerOpenAI
statusnumber✔️HTTP status code from the provider200
latencynumberResponse latency in milliseconds1200
isByokbooleanWhether the request used a bring-your-own-keyfalse