Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Details of a provider response for a generation attempt

Example Usage

import { ProviderResponse } from "@openrouter/sdk/models";

let value: ProviderResponse = {
  status: 200,
};

Fields

FieldTypeRequiredDescriptionExample
endpointIdstring:heavy_minus_sign:Internal endpoint identifierep_abc123
idstring:heavy_minus_sign:Upstream provider response identifierchatcmpl-abc123
isByokboolean:heavy_minus_sign:Whether the request used a bring-your-own-keyfalse
latencynumber:heavy_minus_sign:Response latency in milliseconds1200
modelPermaslugstring:heavy_minus_sign:Canonical model slugopenai/gpt-4
providerNamemodels.ProviderResponseProviderName:heavy_minus_sign:Name of the providerOpenAI
statusnumber:heavy_check_mark:HTTP status code from the provider200