ImageEndpoint - TypeScript SDK
ImageEndpoint - TypeScript SDK
ImageEndpoint type definition
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
An endpoint that serves a given image model.
Example Usage
1 import { ImageEndpoint } from "@openrouter/sdk/models"; 2 3 let value: ImageEndpoint = { 4 allowedPassthroughParameters: [], 5 pricing: [ 6 { 7 billable: "output_image", 8 costUsd: 0.05, 9 unit: "image", 10 }, 11 ], 12 providerName: "Bytedance", 13 providerSlug: "bytedance", 14 providerTag: "bytedance", 15 supportedParameters: { 16 "resolution": { 17 type: "enum", 18 values: [ 19 "1K", 20 "2K", 21 "4K", 22 ], 23 }, 24 "seed": { 25 type: "boolean", 26 }, 27 }, 28 supportsStreaming: false, 29 };
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allowedPassthroughParameters | string[] | ✔️ | Provider-specific options accepted under provider.options[provider_slug]. | [] |
pricing | models.ImagePricingEntry[] | ✔️ | Billable pricing lines for this endpoint. | [{"billable": "output_image","cost_usd": 0.05,"unit": "image"}] |
providerName | string | ✔️ | Provider display name | Bytedance |
providerSlug | string | ✔️ | Provider slug | bytedance |
providerTag | string | ✔️ | Provider tag for request-side selection | bytedance |
supportedParameters | Record<string, *models.CapabilityDescriptor*> | ✔️ | N/A | {"output_compression": {"max": 100,"min": 0,"type": "range"},“resolution”: {"type": "enum","values": ["1K","2K","4K"]},“seed”: {"type": "boolean"}} |
supportsStreaming | boolean | ✔️ | Whether this endpoint supports native SSE streaming (stream: true in the request). | false |