Compare commits

..
Author SHA1 Message Date
OpenRouter SDK Bot 53ff75274c chore: update OpenAPI spec [sdk-bot] 2026-04-09 21:47:09 +00:00
+8 -597
View File
@@ -1057,33 +1057,6 @@ components:
- type
- data
type: object
AnthropicRefusalStopDetails:
description: Structured information about a refusal
example:
category: cyber
explanation: The request was refused due to policy.
type: refusal
nullable: true
properties:
category:
enum:
- cyber
- bio
- null
nullable: true
type: string
explanation:
nullable: true
type: string
type:
enum:
- refusal
type: string
required:
- type
- category
- explanation
type: object
AnthropicSearchResultBlockParam:
example:
content:
@@ -2342,7 +2315,6 @@ components:
id: msg_01XFDUDYJgAACzvnptvVoYEL
model: claude-sonnet-4-5-20250929
role: assistant
stop_details: null
stop_reason: end_turn
stop_sequence: null
type: message
@@ -2366,8 +2338,6 @@ components:
enum:
- assistant
type: string
stop_details:
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
stop_reason:
$ref: '#/components/schemas/ORAnthropicStopReason'
stop_sequence:
@@ -2405,7 +2375,6 @@ components:
- content
- model
- stop_reason
- stop_details
- stop_sequence
- usage
type: object
@@ -4444,66 +4413,6 @@ components:
required:
- type
type: object
CodeInterpreterCallItem:
description: A code interpreter execution call with outputs
example:
code: print("Hello, World!")
container_id: container-xyz789
id: code-abc123
outputs:
- logs: Hello, World!
type: logs
status: completed
type: code_interpreter_call
properties:
code:
nullable: true
type: string
container_id:
type: string
id:
type: string
outputs:
items:
anyOf:
- properties:
type:
enum:
- image
type: string
url:
type: string
required:
- type
- url
type: object
- properties:
logs:
type: string
type:
enum:
- logs
type: string
required:
- type
- logs
type: object
nullable: true
type: array
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- code_interpreter_call
type: string
required:
- type
- id
- code
- outputs
- status
- container_id
type: object
CodeInterpreterServerTool:
description: Code interpreter tool configuration
example:
@@ -4818,7 +4727,6 @@ components:
- deepseek
description: A guardrail for limiting API usage
enforce_zdr: false
ignored_models: null
ignored_providers: null
limit_usd: 50
name: My New Guardrail
@@ -4857,15 +4765,6 @@ components:
example: false
nullable: true
type: boolean
ignored_models:
description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
example:
- openai/gpt-4o-mini
items:
type: string
minItems: 1
nullable: true
type: array
ignored_providers:
description: List of provider IDs to exclude from routing
example:
@@ -4903,7 +4802,6 @@ components:
description: A guardrail for limiting API usage
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 50
name: My New Guardrail
@@ -4970,7 +4868,12 @@ components:
type: openrouter:datetime
properties:
parameters:
$ref: '#/components/schemas/DatetimeServerToolConfig'
properties:
timezone:
description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC.
example: America/New_York
type: string
type: object
type:
enum:
- openrouter:datetime
@@ -4978,16 +4881,6 @@ components:
required:
- type
type: object
DatetimeServerToolConfig:
description: Configuration for the openrouter:datetime server tool
example:
timezone: America/New_York
properties:
timezone:
description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC.
example: America/New_York
type: string
type: object
DefaultParameters:
additionalProperties: false
description: Default parameters for this model
@@ -5427,24 +5320,6 @@ components:
required:
- type
type: object
FrameImage:
allOf:
- $ref: '#/components/schemas/ContentPartImage'
- properties:
frame_type:
description: Whether this image represents the first or last frame of the video
enum:
- first_frame
- last_frame
example: first_frame
type: string
required:
- frame_type
type: object
example:
image_url:
url: https://example.com/image.png
type: image_url
FunctionCallArgsDeltaEvent:
allOf:
- $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent'
@@ -5568,7 +5443,6 @@ components:
description: Guardrail for production environment
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 100
name: Production Guardrail
@@ -5631,7 +5505,6 @@ components:
description: Guardrail for production environment
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 100
name: Production Guardrail
@@ -5677,14 +5550,6 @@ components:
example: 550e8400-e29b-41d4-a716-446655440000
format: uuid
type: string
ignored_models:
description: Array of model canonical_slugs to exclude from routing
example:
- openai/gpt-4o-mini-2024-07-18
items:
type: string
nullable: true
type: array
ignored_providers:
description: List of provider IDs to exclude from routing
example:
@@ -6447,7 +6312,6 @@ components:
description: Guardrail for production environment
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 100
name: Production Guardrail
@@ -6808,7 +6672,6 @@ components:
description: Event sent when the message metadata changes (e.g., stop_reason)
example:
delta:
stop_details: null
stop_reason: end_turn
stop_sequence: null
type: message_delta
@@ -6819,8 +6682,6 @@ components:
properties:
container:
$ref: '#/components/schemas/AnthropicContainer'
stop_details:
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
stop_reason:
$ref: '#/components/schemas/ORAnthropicStopReason'
stop_sequence:
@@ -6828,7 +6689,6 @@ components:
type: string
required:
- container
- stop_details
- stop_reason
- stop_sequence
type: object
@@ -7612,7 +7472,6 @@ components:
id: msg_01XFDUDYJgAACzvnptvVoYEL
model: claude-sonnet-4-5-20250929
role: assistant
stop_details: null
stop_reason: end_turn
stop_sequence: null
type: message
@@ -7633,7 +7492,6 @@ components:
id: msg_01XFDUDYJgAACzvnptvVoYEL
model: claude-sonnet-4-5-20250929
role: assistant
stop_details: null
stop_reason: null
stop_sequence: null
type: message
@@ -7765,8 +7623,6 @@ components:
enum:
- assistant
type: string
stop_details:
$ref: '#/components/schemas/AnthropicRefusalStopDetails'
stop_reason:
nullable: true
stop_sequence:
@@ -7803,7 +7659,6 @@ components:
- content
- model
- stop_reason
- stop_details
- stop_sequence
- usage
type: object
@@ -8824,181 +8679,6 @@ components:
example: end_turn
nullable: true
type: string
OutputApplyPatchServerToolItem:
description: An openrouter:apply_patch server tool output item
example:
filePath: /src/main.ts
id: ap_tmp_abc123
status: completed
type: openrouter:apply_patch
properties:
filePath:
type: string
id:
type: string
patch:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:apply_patch
type: string
required:
- status
- type
type: object
OutputBashServerToolItem:
description: An openrouter:bash server tool output item
example:
command: ls -la
exitCode: 0
id: bash_tmp_abc123
status: completed
stdout: |
total 0
type: openrouter:bash
properties:
command:
type: string
exitCode:
type: integer
id:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
stderr:
type: string
stdout:
type: string
type:
enum:
- openrouter:bash
type: string
required:
- status
- type
type: object
OutputBrowserUseServerToolItem:
description: An openrouter:browser_use server tool output item
example:
action: screenshot
id: bu_tmp_abc123
status: completed
type: openrouter:browser_use
properties:
action:
type: string
id:
type: string
screenshotB64:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:browser_use
type: string
required:
- status
- type
type: object
OutputCodeInterpreterCallItem:
allOf:
- $ref: '#/components/schemas/CodeInterpreterCallItem'
- properties: {}
type: object
description: A code interpreter execution call with outputs
example:
code: print("hello")
container_id: ctr-xyz789
id: ci-abc123
outputs:
- logs: |
hello
type: logs
status: completed
type: code_interpreter_call
OutputCodeInterpreterServerToolItem:
description: An openrouter:code_interpreter server tool output item
example:
code: print("hello")
id: ci_tmp_abc123
language: python
status: completed
stdout: |
hello
type: openrouter:code_interpreter
properties:
code:
type: string
exitCode:
type: integer
id:
type: string
language:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
stderr:
type: string
stdout:
type: string
type:
enum:
- openrouter:code_interpreter
type: string
required:
- status
- type
type: object
OutputComputerCallItem:
example:
action:
type: screenshot
call_id: call-abc123
id: cu-abc123
pending_safety_checks: []
status: completed
type: computer_call
properties:
action:
nullable: true
call_id:
type: string
id:
type: string
pending_safety_checks:
items:
properties:
code:
type: string
id:
type: string
message:
type: string
required:
- id
- code
- message
type: object
type: array
status:
enum:
- completed
- incomplete
- in_progress
type: string
type:
enum:
- computer_call
type: string
required:
- type
- call_id
- status
- pending_safety_checks
type: object
OutputDatetimeItem:
description: An openrouter:datetime server tool output item
example:
@@ -9040,31 +8720,6 @@ components:
results: []
status: completed
type: file_search_call
OutputFileSearchServerToolItem:
description: An openrouter:file_search server tool output item
example:
id: fs_tmp_abc123
queries:
- search term
status: completed
type: openrouter:file_search
properties:
id:
type: string
queries:
items:
type: string
type: array
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:file_search
type: string
required:
- status
- type
type: object
OutputFunctionCallItem:
allOf:
- $ref: '#/components/schemas/OutputItemFunctionCall'
@@ -9087,32 +8742,6 @@ components:
result: null
status: completed
type: image_generation_call
OutputImageGenerationServerToolItem:
description: An openrouter:image_generation server tool output item
example:
id: ig_tmp_abc123
imageUrl: https://example.com/image.png
status: completed
type: openrouter:image_generation
properties:
id:
type: string
imageB64:
type: string
imageUrl:
type: string
revisedPrompt:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:image_generation
type: string
required:
- status
- type
type: object
OutputItemAddedEvent:
description: Event emitted when a new output item is added to the response
example:
@@ -9337,24 +8966,11 @@ components:
description: An output item from the response
discriminator:
mapping:
code_interpreter_call: '#/components/schemas/OutputCodeInterpreterCallItem'
computer_call: '#/components/schemas/OutputComputerCallItem'
file_search_call: '#/components/schemas/OutputFileSearchCallItem'
function_call: '#/components/schemas/OutputFunctionCallItem'
image_generation_call: '#/components/schemas/OutputImageGenerationCallItem'
message: '#/components/schemas/OutputMessageItem'
openrouter:apply_patch: '#/components/schemas/OutputApplyPatchServerToolItem'
openrouter:bash: '#/components/schemas/OutputBashServerToolItem'
openrouter:browser_use: '#/components/schemas/OutputBrowserUseServerToolItem'
openrouter:code_interpreter: '#/components/schemas/OutputCodeInterpreterServerToolItem'
openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
openrouter:memory: '#/components/schemas/OutputMemoryServerToolItem'
openrouter:text_editor: '#/components/schemas/OutputTextEditorServerToolItem'
openrouter:tool_search: '#/components/schemas/OutputToolSearchServerToolItem'
openrouter:web_fetch: '#/components/schemas/OutputWebFetchServerToolItem'
openrouter:web_search: '#/components/schemas/OutputWebSearchServerToolItem'
reasoning: '#/components/schemas/OutputReasoningItem'
web_search_call: '#/components/schemas/OutputWebSearchCallItem'
@@ -9374,21 +8990,8 @@ components:
- $ref: '#/components/schemas/OutputWebSearchCallItem'
- $ref: '#/components/schemas/OutputFileSearchCallItem'
- $ref: '#/components/schemas/OutputImageGenerationCallItem'
- $ref: '#/components/schemas/OutputCodeInterpreterCallItem'
- $ref: '#/components/schemas/OutputComputerCallItem'
- $ref: '#/components/schemas/OutputDatetimeItem'
- $ref: '#/components/schemas/OutputWebSearchServerToolItem'
- $ref: '#/components/schemas/OutputCodeInterpreterServerToolItem'
- $ref: '#/components/schemas/OutputFileSearchServerToolItem'
- $ref: '#/components/schemas/OutputImageGenerationServerToolItem'
- $ref: '#/components/schemas/OutputBrowserUseServerToolItem'
- $ref: '#/components/schemas/OutputBashServerToolItem'
- $ref: '#/components/schemas/OutputTextEditorServerToolItem'
- $ref: '#/components/schemas/OutputApplyPatchServerToolItem'
- $ref: '#/components/schemas/OutputWebFetchServerToolItem'
- $ref: '#/components/schemas/OutputToolSearchServerToolItem'
- $ref: '#/components/schemas/OutputMemoryServerToolItem'
- $ref: '#/components/schemas/OutputMcpServerToolItem'
OutputItemWebSearchCall:
example:
action:
@@ -9458,62 +9061,6 @@ components:
- action
- status
type: object
OutputMcpServerToolItem:
description: An openrouter:mcp server tool output item
example:
id: mcp_tmp_abc123
serverLabel: my-server
status: completed
toolName: get_data
type: openrouter:mcp
properties:
id:
type: string
serverLabel:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
toolName:
type: string
type:
enum:
- openrouter:mcp
type: string
required:
- status
- type
type: object
OutputMemoryServerToolItem:
description: An openrouter:memory server tool output item
example:
action: read
id: mem_tmp_abc123
key: user_preference
status: completed
type: openrouter:memory
properties:
action:
enum:
- read
- write
- delete
type: string
id:
type: string
key:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:memory
type: string
value:
nullable: true
required:
- status
- type
type: object
OutputMessage:
example:
content:
@@ -9631,85 +9178,6 @@ components:
- text: Analyzed the problem and found the optimal solution.
type: summary_text
type: reasoning
OutputTextEditorServerToolItem:
description: An openrouter:text_editor server tool output item
example:
command: view
filePath: /src/main.ts
id: te_tmp_abc123
status: completed
type: openrouter:text_editor
properties:
command:
enum:
- view
- create
- str_replace
- insert
type: string
filePath:
type: string
id:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:text_editor
type: string
required:
- status
- type
type: object
OutputToolSearchServerToolItem:
description: An openrouter:tool_search server tool output item
example:
id: ts_tmp_abc123
query: weather tools
status: completed
type: openrouter:tool_search
properties:
id:
type: string
query:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:tool_search
type: string
required:
- status
- type
type: object
OutputWebFetchServerToolItem:
description: An openrouter:web_fetch server tool output item
example:
id: wf_tmp_abc123
status: completed
title: Example Domain
type: openrouter:web_fetch
url: https://example.com
properties:
content:
type: string
id:
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
title:
type: string
type:
enum:
- openrouter:web_fetch
type: string
url:
type: string
required:
- status
- type
type: object
OutputWebSearchCallItem:
allOf:
- $ref: '#/components/schemas/OutputItemWebSearchCall'
@@ -12048,15 +11516,6 @@ components:
example: true
nullable: true
type: boolean
ignored_models:
description: Array of model identifiers to exclude from routing (slug or canonical_slug accepted)
example:
- openai/gpt-4o-mini
items:
type: string
minItems: 1
nullable: true
type: array
ignored_providers:
description: List of provider IDs to exclude from routing
example:
@@ -12090,7 +11549,6 @@ components:
description: Updated description
enforce_zdr: true
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 75
name: Updated Guardrail Name
@@ -12199,17 +11657,10 @@ components:
exclusiveMinimum: true
minimum: 0
type: integer
frame_images:
description: >-
Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of
first_frame or last_frame.
items:
$ref: '#/components/schemas/FrameImage'
type: array
generate_audio:
description: >-
Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag,
false if not set.
Whether to generate audio alongside the video. Defaults to true for models that support audio output, false
otherwise.
example: true
type: boolean
input_references:
@@ -12733,20 +12184,15 @@ components:
canonical_slug: google/veo-3.1
created: 1700000000
description: Google video generation model
generate_audio: true
id: google/veo-3.1
name: Veo 3.1
pricing_skus:
generate: '0.50'
seed: null
supported_aspect_ratios:
- '16:9'
supported_durations:
- 5
- 8
supported_frame_images:
- first_frame
- last_frame
supported_resolutions:
- 720p
supported_sizes: null
@@ -12768,10 +12214,6 @@ components:
description: Description of the model
example: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
type: string
generate_audio:
description: Whether the model supports generating audio alongside video
nullable: true
type: boolean
hugging_face_id:
description: Hugging Face model identifier, if applicable
example: microsoft/DialoGPT-medium
@@ -12791,10 +12233,6 @@ components:
description: Pricing SKUs with provider prefix stripped, values as strings
nullable: true
type: object
seed:
description: Whether the model supports deterministic generation via seed parameter
nullable: true
type: boolean
supported_aspect_ratios:
description: Supported output aspect ratios
items:
@@ -12815,15 +12253,6 @@ components:
type: integer
nullable: true
type: array
supported_frame_images:
description: Supported frame image types (e.g. first_frame, last_frame)
items:
enum:
- first_frame
- last_frame
type: string
nullable: true
type: array
supported_resolutions:
description: Supported output resolutions
items:
@@ -12881,9 +12310,6 @@ components:
- supported_aspect_ratios
- supported_sizes
- supported_durations
- supported_frame_images
- generate_audio
- seed
- allowed_passthrough_parameters
type: object
VideoModelsListResponse:
@@ -12893,20 +12319,15 @@ components:
canonical_slug: google/veo-3.1
created: 1700000000
description: Google video generation model
generate_audio: true
id: google/veo-3.1
name: Veo 3.1
pricing_skus:
generate: '0.50'
seed: null
supported_aspect_ratios:
- '16:9'
supported_durations:
- 5
- 8
supported_frame_images:
- first_frame
- last_frame
supported_resolutions:
- 720p
supported_sizes: null
@@ -14789,7 +14210,6 @@ paths:
description: Guardrail for production environment
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 100
name: Production Guardrail
@@ -14850,7 +14270,6 @@ paths:
- deepseek
description: A guardrail for limiting API usage
enforce_zdr: false
ignored_models: null
ignored_providers: null
limit_usd: 50
name: My New Guardrail
@@ -14873,7 +14292,6 @@ paths:
description: A guardrail for limiting API usage
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 50
name: My New Guardrail
@@ -15001,7 +14419,6 @@ paths:
description: Guardrail for production environment
enforce_zdr: false
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 100
name: Production Guardrail
@@ -15081,7 +14498,6 @@ paths:
description: Updated description
enforce_zdr: true
id: 550e8400-e29b-41d4-a716-446655440000
ignored_models: null
ignored_providers: null
limit_usd: 75
name: Updated Guardrail Name
@@ -19217,20 +18633,15 @@ paths:
canonical_slug: google/veo-3.1
created: 1700000000
description: Google video generation model
generate_audio: true
id: google/veo-3.1
name: Veo 3.1
pricing_skus:
generate: '0.50'
seed: null
supported_aspect_ratios:
- '16:9'
supported_durations:
- 5
- 8
supported_frame_images:
- first_frame
- last_frame
supported_resolutions:
- 720p
supported_sizes: null