Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 232 additions & 21 deletions .speakeasy/in.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5345,6 +5345,21 @@ components:
required:
- 'url'
type: 'object'
BatchImageGenerationMissingImage:
description: 'An image the provider returned that OpenRouter could not store. It is not billed.'
properties:
index:
description: 'Position of the image among the images returned for this request, from 0'
example: 1
type: 'integer'
message:
description: 'Why the image is missing'
example: 'The provider returned this image without readable image data.'
type: 'string'
required:
- 'index'
- 'message'
type: 'object'
BatchImageGenerationResponse:
description: 'Image generation result of a batch request: image links and when they expire'
properties:
Expand All @@ -5364,6 +5379,11 @@ components:
description: 'Generation ID of this request. Look up its cost and details with `GET /api/v1/generation?id=<id>`.'
example: 'gen-batch-1748372400-3f1c9b2e7a5d4c8e0b61'
type: 'string'
missing_images:
description: 'Images the provider returned without usable image data. Present only when some images of the request are missing; `data` lists the rest.'
items:
$ref: '#/components/schemas/BatchImageGenerationMissingImage'
type: 'array'
usage:
$ref: '#/components/schemas/ImageGenerationUsage'
required:
Expand Down Expand Up @@ -6499,6 +6519,23 @@ components:
items:
$ref: '#/components/schemas/ORAnthropicContentBlock'
type: 'array'
context_management:
properties:
applied_edits:
items:
additionalProperties: {}
properties:
type:
type: 'string'
required:
- 'type'
type: 'object'
type: 'array'
required:
- 'applied_edits'
type:
- 'object'
- 'null'
id:
type: 'string'
input_transformations:
Expand All @@ -6509,10 +6546,20 @@ components:
- 'null'
model:
type: 'string'
openrouter_metadata:
$ref: '#/components/schemas/OpenRouterMetadata'
provider:
type: 'string'
role:
enum:
- 'assistant'
type: 'string'
safeguard_results:
items:
$ref: '#/components/schemas/AnthropicSafeguardResult'
type:
- 'array'
- 'null'
stop_details:
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
stop_reason:
Expand All @@ -6526,26 +6573,81 @@ components:
- 'message'
type: 'string'
usage:
allOf:
- $ref: '#/components/schemas/AnthropicUsage'
- properties:
iterations:
items:
$ref: '#/components/schemas/AnthropicUsageIteration'
type: 'array'
speed:
$ref: '#/components/schemas/AnthropicSpeed'
properties:
cache_creation:
$ref: '#/components/schemas/AnthropicCacheCreation'
cache_creation_input_tokens:
type:
- 'integer'
- 'null'
cache_read_input_tokens:
type:
- 'integer'
- 'null'
cost:
format: 'double'
type:
- 'number'
- 'null'
cost_details:
$ref: '#/components/schemas/CostDetails'
deferred_tools_details:
properties:
completion_tokens:
description: 'Completion tokens summed over every upstream call'
type: 'integer'
prompt_tokens:
description: 'Prompt tokens summed over every upstream call'
type: 'integer'
total_tokens:
description: 'Sum of the above two fields'
type: 'integer'
turns:
description: 'Upstream model calls the run made'
exclusiveMinimum: true
minimum: 0
type: 'integer'
required:
- 'turns'
- 'prompt_tokens'
- 'completion_tokens'
- 'total_tokens'
type: 'object'
example:
cache_creation: null
cache_creation_input_tokens: null
cache_read_input_tokens: null
inference_geo: null
input_tokens: 100
output_tokens: 50
output_tokens_details: null
server_tool_use: null
service_tier: 'standard'
inference_geo:
type:
- 'string'
- 'null'
input_tokens:
type: 'integer'
is_byok:
type: 'boolean'
iterations:
items:
$ref: '#/components/schemas/AnthropicUsageIteration'
type: 'array'
output_tokens:
type: 'integer'
output_tokens_details:
$ref: '#/components/schemas/AnthropicOutputTokensDetails'
server_tool_use:
$ref: '#/components/schemas/ORAnthropicServerToolUsage'
service_tier:
type:
- 'string'
- 'null'
speed:
$ref: '#/components/schemas/AnthropicSpeed'
required:
- 'input_tokens'
- 'output_tokens'
- 'output_tokens_details'
- 'cache_creation_input_tokens'
- 'cache_read_input_tokens'
- 'cache_creation'
- 'inference_geo'
- 'server_tool_use'
- 'service_tier'
type: 'object'
required:
- 'id'
- 'type'
Expand Down Expand Up @@ -21062,6 +21164,63 @@ components:
required:
- 'model'
type: 'object'
MessagesMcpToolResultBlock:
description: 'MCP tool result block paired with a prior `mcp_tool_use` block for replay.'
example:
content: 'Sunny, 21C'
is_error: false
tool_use_id: 'mcptoolu_01abc'
type: 'mcp_tool_result'
properties:
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
content:
anyOf:
- type: 'string'
- items:
$ref: '#/components/schemas/AnthropicTextBlockParam'
type: 'array'
is_error:
type: 'boolean'
tool_use_id:
type: 'string'
type:
enum:
- 'mcp_tool_result'
type: 'string'
required:
- 'type'
- 'tool_use_id'
type: 'object'
MessagesMcpToolUseBlock:
description: 'MCP tool call emitted by an upstream Anthropic assistant turn for replay.'
example:
id: 'mcptoolu_01abc'
input:
city: 'Paris'
name: 'get_forecast'
server_name: 'weather'
type: 'mcp_tool_use'
properties:
cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective'
id:
type: 'string'
input: {}
name:
type: 'string'
server_name:
type: 'string'
type:
enum:
- 'mcp_tool_use'
type: 'string'
required:
- 'type'
- 'id'
- 'name'
- 'server_name'
type: 'object'
MessagesMessageParam:
description: 'Anthropic message with OpenRouter extensions'
example:
Expand Down Expand Up @@ -21237,6 +21396,8 @@ components:
- $ref: '#/components/schemas/MessagesBashToolResultBlock'
- $ref: '#/components/schemas/ORAnthropicToolSearchResultParam'
- $ref: '#/components/schemas/MessagesToolSearchToolResultBlock'
- $ref: '#/components/schemas/MessagesMcpToolUseBlock'
- $ref: '#/components/schemas/MessagesMcpToolResultBlock'
type: 'array'
output_config:
$ref: '#/components/schemas/AnthropicMessageOutputConfig'
Expand Down Expand Up @@ -36075,7 +36236,7 @@ components:
description: 'Text to synthesize, or a list of turns for multi-speaker input. Each turn has its own text, voice, and instructions. Multi-speaker input is supported by Gemini TTS models, by Fish Audio models other than S1, and by Speechify dialogue models.'
example: 'Hello world'
SpeechInputModality:
description: 'An input the model accepts. `audio` and `image` are `input_references` for voice cloning and voice design.'
description: 'An input the model accepts. `audio` and `image` are `input_references` for voice cloning and voice design; `video` is a reference video the generated audio is made for.'
example:
type: 'text'
oneOf:
Expand Down Expand Up @@ -36133,13 +36294,31 @@ components:
- 'type'
- 'supported_inputs'
type: 'object'
- properties:
supported_inputs:
description: '`references` is how many `video_url` parts a request may send. A video reference is the only part of its request and bills at the endpoint''s video rate.'
properties:
references:
$ref: '#/components/schemas/SpeechReferenceCount'
required:
- 'references'
type: 'object'
type:
enum:
- 'video'
type: 'string'
required:
- 'type'
- 'supported_inputs'
type: 'object'
SpeechInputReference:
description: 'Reference content part for stateless voice cloning or voice design'
discriminator:
mapping:
image_url: '#/components/schemas/SpeechInputReferenceImage'
input_audio: '#/components/schemas/SpeechInputReferenceAudio'
text: '#/components/schemas/SpeechInputReferenceText'
video_url: '#/components/schemas/SpeechInputReferenceVideo'
propertyName: 'type'
example:
input_audio:
Expand All @@ -36149,6 +36328,7 @@ components:
- $ref: '#/components/schemas/SpeechInputReferenceAudio'
- $ref: '#/components/schemas/SpeechInputReferenceText'
- $ref: '#/components/schemas/SpeechInputReferenceImage'
- $ref: '#/components/schemas/SpeechInputReferenceVideo'
SpeechInputReferenceAudio:
description: 'Reference audio input for stateless voice cloning. Up to three parts per request; the Nth audio part is addressable from `input` as `@AudioN` on providers that support multiple references.'
example:
Expand Down Expand Up @@ -36238,6 +36418,37 @@ components:
- 'type'
- 'text'
type: 'object'
SpeechInputReferenceVideo:
description: 'Reference video the generated audio is made for (sound and voice matched to the footage, same length as the clip). Must be the only part in `input_references`. Only routed to endpoints that support video references, which bill at their video rate.'
example:
type: 'video_url'
video_url:
url: 'https://example.com/clip.mp4'
properties:
type:
enum:
- 'video_url'
type: 'string'
video_url:
$ref: '#/components/schemas/SpeechInputReferenceVideoInput'
required:
- 'type'
- 'video_url'
type: 'object'
SpeechInputReferenceVideoInput:
description: 'Reference video input object'
example:
url: 'https://example.com/clip.mp4'
properties:
url:
description: 'Public http(s) URL of the reference video. The provider downloads it; OpenRouter does not fetch it, and data URIs are rejected.'
example: 'https://example.com/clip.mp4'
maxLength: 2048
minLength: 1
type: 'string'
required:
- 'url'
type: 'object'
SpeechModelEndpoint:
description: 'One endpoint serving a speech model, with the inputs and parameters it accepts.'
example:
Expand Down Expand Up @@ -36516,7 +36727,7 @@ components:
input:
$ref: '#/components/schemas/SpeechInput'
input_references:
description: 'Reference content for stateless voice cloning or voice design. Audio mode: one to three `input_audio` parts, each optionally paired with a `text` part carrying its transcript (a single clip accepts its transcript before or after it; with multiple clips each transcript immediately follows its clip), plus at most one `image_url` part as a scene image on providers that condition the cloned voice on its setting; only routed to endpoints that support voice cloning (and multiple references or image references when those parts are sent). Image mode: exactly one `image_url` part; only routed to endpoints that support image references. An empty array is treated as no reference.'
description: 'Reference content for stateless voice cloning or voice design. Audio mode: one to three `input_audio` parts, each optionally paired with a `text` part carrying its transcript (a single clip accepts its transcript before or after it; with multiple clips each transcript immediately follows its clip), plus at most one `image_url` part as a scene image on providers that condition the cloned voice on its setting; only routed to endpoints that support voice cloning (and multiple references or image references when those parts are sent). Image mode: exactly one `image_url` part; only routed to endpoints that support image references. Video mode: exactly one `video_url` part with a public http(s) URL and no other parts; only routed to endpoints that support video references. An empty array is treated as no reference.'
example:
- input_audio:
data: 'data:audio/wav;base64,UklGRuQXDABXQVZF...'
Expand Down
Loading