diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 6aa9dedc..94478c1a 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -33829,6 +33829,133 @@ components: - 'throughput' - 'request_count' type: 'object' + RerankModel: + allOf: + - $ref: '#/components/schemas/Model' + - properties: + input_modalities: + description: 'Typed inputs the model accepts, following the Models API V2 document.' + example: + - supported_inputs: + max_context_length: + unit: 'token' + value: 32000 + type: 'text' + - type: 'image' + items: + $ref: '#/components/schemas/ModelInputModalityV2' + minItems: 1 + type: 'array' + output_modalities: + description: 'Typed outputs with the request fields each accepts, following the Models API V2 document.' + example: + - supported_parameters: + top_n: + min: 1 + type: 'integer' + type: 'rerank' + items: + $ref: '#/components/schemas/ModelOutputModalityV2' + minItems: 1 + type: 'array' + type: 'object' + description: 'Information about an AI model available on OpenRouter' + example: + architecture: + input_modalities: + - 'text' + instruct_type: 'chatml' + modality: 'text->text' + output_modalities: + - 'text' + tokenizer: 'GPT' + canonical_slug: 'openai/gpt-4' + context_length: 8192 + created: 1692901234 + default_parameters: null + description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + expiration_date: null + id: 'openai/gpt-4' + knowledge_cutoff: null + links: + details: '/api/v1/models/openai/gpt-5.4/endpoints' + name: 'GPT-4' + per_request_limits: null + pricing: + completion: '0.00006' + image: '0' + prompt: '0.00003' + request: '0' + reasoning: + default_effort: 'medium' + default_enabled: true + mandatory: false + supported_efforts: + - 'high' + - 'medium' + - 'low' + - 'minimal' + supported_parameters: + - 'temperature' + - 'top_p' + - 'max_tokens' + supported_voices: null + top_provider: + context_length: 8192 + is_moderated: true + max_completion_tokens: 4096 + RerankModelsListResponse: + allOf: + - $ref: '#/components/schemas/ModelsListResponse' + - properties: + data: + description: 'List of available rerank models' + items: + $ref: '#/components/schemas/RerankModel' + type: 'array' + type: 'object' + description: 'List of available rerank models' + example: + data: + - architecture: + input_modalities: + - 'text' + instruct_type: 'chatml' + modality: 'text->text' + output_modalities: + - 'text' + tokenizer: 'GPT' + canonical_slug: 'openai/gpt-4' + context_length: 8192 + created: 1692901234 + default_parameters: null + description: 'GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.' + expiration_date: null + id: 'openai/gpt-4' + knowledge_cutoff: null + links: + details: '/api/v1/models/openai/gpt-4/endpoints' + name: 'GPT-4' + per_request_limits: null + pricing: + completion: '0.00006' + image: '0' + prompt: '0.00003' + request: '0' + supported_parameters: + - 'temperature' + - 'top_p' + - 'max_tokens' + - 'frequency_penalty' + - 'presence_penalty' + supported_voices: null + top_provider: + context_length: 8192 + is_moderated: true + max_completion_tokens: 4096 + links: + next: '/api/v1/models?offset=500&limit=500' + total_count: 150 ResponseHealingPlugin: example: enabled: true @@ -37834,6 +37961,85 @@ components: trace_name: type: 'string' type: 'object' + TranscriptionModel: + additionalProperties: false + description: 'A speech-to-text model: its endpoints'' members widened across endpoints, plus each endpoint with its own.' + properties: + created: + description: 'Unix seconds when the model was added' + type: 'integer' + description: + type: 'string' + endpoints: + items: + $ref: '#/components/schemas/TranscriptionModelEndpoint' + minItems: 1 + type: 'array' + id: + example: 'openai/whisper-1' + type: 'string' + input_modalities: + description: 'Typed inputs the model accepts, following the Models API V2 document.' + items: + $ref: '#/components/schemas/ModelInputModalityV2' + minItems: 1 + type: 'array' + name: + example: 'OpenAI: Whisper' + type: 'string' + output_modalities: + description: 'Typed outputs with the /api/v1/audio/transcriptions request fields each accepts, following the Models API V2 document.' + items: + $ref: '#/components/schemas/ModelOutputModalityV2' + minItems: 1 + type: 'array' + required: + - 'id' + - 'name' + - 'description' + - 'created' + - 'input_modalities' + - 'output_modalities' + - 'endpoints' + type: 'object' + TranscriptionModelEndpoint: + additionalProperties: false + description: 'An endpoint that serves a speech-to-text model, with its own members.' + properties: + input_modalities: + description: 'Typed inputs the model accepts, following the Models API V2 document.' + items: + $ref: '#/components/schemas/ModelInputModalityV2' + minItems: 1 + type: 'array' + output_modalities: + description: 'Typed outputs with the /api/v1/audio/transcriptions request fields each accepts, following the Models API V2 document.' + items: + $ref: '#/components/schemas/ModelOutputModalityV2' + minItems: 1 + type: 'array' + provider_name: + example: 'OpenAI' + type: 'string' + provider_slug: + example: 'openai' + type: 'string' + required: + - 'provider_name' + - 'provider_slug' + - 'input_modalities' + - 'output_modalities' + type: 'object' + TranscriptionModelsListResponse: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/TranscriptionModel' + type: 'array' + required: + - 'data' + type: 'object' Truncation: enum: - 'auto' @@ -43207,6 +43413,210 @@ paths: - 'STT' x-speakeasy-max-method-params: 1 x-speakeasy-name-override: 'createTranscription' + /audio/transcriptions/models: + get: + description: 'Lists every speech-to-text model with its typed Models API V2 input and output members, merged across its endpoints, plus each endpoint with its own.' + operationId: 'listTranscriptionModels' + responses: + '200': + content: + application/json: + example: + data: + - created: 1758000000 + description: 'General-purpose speech recognition model.' + endpoints: + - input_modalities: + - type: 'audio' + output_modalities: + - supported_parameters: + response_format: + type: 'enum' + values: + - 'json' + - 'verbose_json' + timestamp_granularities: + items: + type: 'enum' + values: + - 'word' + - 'segment' + type: 'array' + type: 'transcription' + provider_name: 'OpenAI' + provider_slug: 'openai' + id: 'openai/whisper-1' + input_modalities: + - type: 'audio' + name: 'OpenAI: Whisper' + output_modalities: + - supported_parameters: + response_format: + type: 'enum' + values: + - 'json' + - 'verbose_json' + timestamp_granularities: + items: + type: 'enum' + values: + - 'word' + - 'segment' + type: 'array' + type: 'transcription' + schema: + $ref: '#/components/schemas/TranscriptionModelsListResponse' + description: 'List of speech-to-text models' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '503': + content: + application/json: + example: + error: + code: 503 + message: 'Service temporarily unavailable' + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: 'Service Unavailable - Service temporarily unavailable' + security: [] + summary: 'List speech-to-text models' + tags: + - 'STT' + x-speakeasy-name-override: 'listModels' + /audio/transcriptions/models/{author}/{slug}: + get: + description: 'Returns a speech-to-text model with each endpoint''s own typed members.' + operationId: 'getTranscriptionModel' + parameters: + - description: 'Model author/organization' + in: 'path' + name: 'author' + required: true + schema: + description: 'Model author/organization' + example: 'openai' + type: 'string' + - description: 'Model slug' + in: 'path' + name: 'slug' + required: true + schema: + description: 'Model slug' + example: 'whisper-1' + type: 'string' + responses: + '200': + content: + application/json: + example: + created: 1758000000 + description: 'General-purpose speech recognition model.' + endpoints: + - input_modalities: + - type: 'audio' + output_modalities: + - supported_parameters: + response_format: + type: 'enum' + values: + - 'json' + - 'verbose_json' + timestamp_granularities: + items: + type: 'enum' + values: + - 'word' + - 'segment' + type: 'array' + type: 'transcription' + provider_name: 'OpenAI' + provider_slug: 'openai' + id: 'openai/whisper-1' + input_modalities: + - type: 'audio' + name: 'OpenAI: Whisper' + output_modalities: + - supported_parameters: + response_format: + type: 'enum' + values: + - 'json' + - 'verbose_json' + timestamp_granularities: + items: + type: 'enum' + values: + - 'word' + - 'segment' + type: 'array' + type: 'transcription' + schema: + $ref: '#/components/schemas/TranscriptionModel' + description: 'A speech-to-text model and its endpoints' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '503': + content: + application/json: + example: + error: + code: 503 + message: 'Service temporarily unavailable' + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: 'Service Unavailable - Service temporarily unavailable' + security: [] + summary: 'Get a speech-to-text model' + tags: + - 'STT' + x-speakeasy-name-override: 'getModel' /auth/keys: post: description: 'Exchange an authorization code from the PKCE flow for a user-controlled API key' @@ -60163,6 +60573,123 @@ paths: tags: - 'Rerank' x-speakeasy-name-override: 'rerank' + /rerank/models: + get: + description: 'Returns a list of all available rerank models and their properties' + operationId: 'listRerankModels' + parameters: + - description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned' + in: 'query' + name: 'offset' + required: false + schema: + default: 0 + description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned' + example: 0 + minimum: 0 + type: + - 'integer' + - 'null' + - description: 'Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned' + in: 'query' + name: 'limit' + required: false + schema: + default: 500 + description: 'Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned' + example: 500 + maximum: 1000 + minimum: 1 + type: 'integer' + responses: + '200': + content: + application/json: + example: + data: + - architecture: + input_modalities: + - 'text' + instruct_type: null + modality: 'text->rerank' + output_modalities: + - 'rerank' + tokenizer: 'Other' + canonical_slug: 'cohere/rerank-v3.5' + context_length: 4096 + created: 1733356800 + default_parameters: null + description: 'Cohere multilingual rerank model.' + endpoints: + - '/api/v1/rerank' + expiration_date: null + id: 'cohere/rerank-v3.5' + input_modalities: + - supported_inputs: + max_context_length: + unit: 'token' + value: 4096 + type: 'text' + knowledge_cutoff: null + links: + details: '/api/v1/models/cohere/rerank-v3.5/endpoints' + name: 'Cohere: Rerank v3.5' + output_modalities: + - supported_parameters: + top_n: + min: 1 + type: 'integer' + type: 'rerank' + per_request_limits: null + pricing: + completion: '0' + image: '0' + prompt: '0' + request: '0.002' + supported_parameters: [] + supported_voices: null + top_provider: + context_length: 4096 + is_moderated: false + max_completion_tokens: null + schema: + $ref: '#/components/schemas/RerankModelsListResponse' + description: 'Returns a list of rerank models' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + summary: 'List all rerank models' + tags: + - 'Rerank' + x-speakeasy-name-override: 'listModels' + x-speakeasy-pagination: + inputs: + - in: 'parameters' + name: 'offset' + type: 'offset' + - in: 'parameters' + name: 'limit' + type: 'limit' + outputs: + results: '$.data' + type: 'offsetLimit' /responses: post: description: 'Creates a streaming or non-streaming response using OpenResponses API format'