diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 60ae5bd0..fedafe0b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,12 @@ -speakeasyVersion: 1.543.4 +speakeasyVersion: 1.650.0 sources: livepeer-studio-api: sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:2a39aaefa6d4f52498dc9ee5aec6e20911a09bd474bb9eb0c2f8f67de8d149de - sourceBlobDigest: sha256:50f137973ae47156ff6dc3811e285de7ae10db626653de49f76cdbfbc82f7e44 + sourceRevisionDigest: sha256:e9f866c9544690b86e25eb48f76a09832d9a59f9bc3fe5abe79816e09bf3dd2f + sourceBlobDigest: sha256:ef1e2fa4570f034e5b88d78cc26fcacb9c1214f7ff41227c9211076dd8eea513 tags: - latest - - speakeasy-sdk-regen-1745712246 + - speakeasy-sdk-regen-1746921835 - 1.0.0 targets: {} workflow: diff --git a/ai/api-reference/gateway.openapi.yaml b/ai/api-reference/gateway.openapi.yaml index be868a38..a45be2cc 100644 --- a/ai/api-reference/gateway.openapi.yaml +++ b/ai/api-reference/gateway.openapi.yaml @@ -3,7 +3,7 @@ openapi: 3.1.0 info: title: Livepeer AI Runner description: An application to run AI pipelines - version: 0.1.0 + version: 0.13.11 servers: - url: https://dream-gateway.livepeer.cloud description: Livepeer Cloud Community Gateway @@ -1517,6 +1517,11 @@ components: title: Gateway Request Id description: The ID of the Gateway request (for logging purposes). default: '' + manifest_id: + type: string + title: Manifest Id + description: The manifest ID from the orchestrator (for logging purposes). + default: '' stream_id: type: string title: Stream Id @@ -1553,6 +1558,11 @@ components: title: Request Id description: The ID generated for this request default: '' + manifest_id: + type: string + title: Manifest Id + description: Orchestrator manifest ID for this request + default: '' type: object required: - subscribe_url diff --git a/openapi.yaml b/openapi.yaml index d1674c23..b6d3422d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2780,6 +2780,17 @@ components: - msg title: APIError description: API error response model. + AudioResponse: + properties: + audio: + allOf: + - $ref: '#/components/schemas/MediaURL' + description: The generated audio. + type: object + required: + - audio + title: AudioResponse + description: Response model for audio generation. Body_genAudioToText: properties: audio: @@ -2875,6 +2886,29 @@ components: - image title: Body_genImageToImage additionalProperties: false + Body_genImageToText: + properties: + image: + type: string + format: binary + title: Image + description: Uploaded image to transform with the pipeline. + prompt: + type: string + title: Prompt + description: Text prompt(s) to guide transformation. + default: '' + model_id: + type: string + title: Model Id + description: Hugging Face model ID used for transformation. + default: '' + type: object + required: + - image + - model_id + title: Body_genImageToText + additionalProperties: false Body_genImageToVideo: properties: image: @@ -2935,40 +2969,6 @@ components: - image title: Body_genImageToVideo additionalProperties: false - Body_genLLM: - properties: - prompt: - type: string - title: Prompt - model_id: - type: string - title: Model Id - default: meta-llama/Meta-Llama-3.1-8B-Instruct - system_msg: - type: string - title: System Msg - default: '' - temperature: - type: number - title: Temperature - default: 0.7 - max_tokens: - type: integer - title: Max Tokens - default: 256 - history: - type: string - title: History - default: '[]' - stream: - type: boolean - title: Stream - default: false - type: object - required: - - prompt - title: Body_genLLM - additionalProperties: false Body_genSegmentAnything2: properties: image: @@ -3111,19 +3111,218 @@ components: - images title: ImageResponse description: Response model for image generation. + ImageToTextResponse: + properties: + text: + type: string + title: Text + description: The generated text. + type: object + required: + - text + title: ImageToTextResponse + description: Response model for text generation. + LLMChoice: + properties: + index: + type: integer + title: Index + finish_reason: + type: string + title: Finish Reason + default: '' + delta: + allOf: + - $ref: '#/components/schemas/LLMMessage' + message: + allOf: + - $ref: '#/components/schemas/LLMMessage' + type: object + required: + - index + title: LLMChoice + LLMMessage: + properties: + role: + type: string + title: Role + content: + type: string + title: Content + type: object + required: + - role + - content + title: LLMMessage + LLMRequest: + properties: + messages: + items: + $ref: '#/components/schemas/LLMMessage' + type: array + title: Messages + model: + type: string + title: Model + default: '' + temperature: + type: number + title: Temperature + default: 0.7 + max_tokens: + type: integer + title: Max Tokens + default: 256 + top_p: + type: number + title: Top P + default: 1 + top_k: + type: integer + title: Top K + default: -1 + stream: + type: boolean + title: Stream + default: false + type: object + required: + - messages + title: LLMRequest LLMResponse: properties: - response: + id: + type: string + title: Id + model: type: string - title: Response - tokens_used: + title: Model + created: type: integer - title: Tokens Used + title: Created + usage: + $ref: '#/components/schemas/LLMTokenUsage' + choices: + items: + $ref: '#/components/schemas/LLMChoice' + type: array + title: Choices type: object required: - - response - - tokens_used + - id + - model + - created + - usage + - choices title: LLMResponse + LLMTokenUsage: + properties: + prompt_tokens: + type: integer + title: Prompt Tokens + completion_tokens: + type: integer + title: Completion Tokens + total_tokens: + type: integer + title: Total Tokens + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: LLMTokenUsage + LiveVideoToVideoParams: + properties: + subscribe_url: + type: string + title: Subscribe Url + description: Source URL of the incoming stream to subscribe to. + publish_url: + type: string + title: Publish Url + description: Destination URL of the outgoing stream to publish. + control_url: + type: string + title: Control Url + description: >- + URL for subscribing via Trickle protocol for updates in the live video-to-video generation params. + default: '' + events_url: + type: string + title: Events Url + description: >- + URL for publishing events via Trickle protocol for pipeline status and logs. + default: '' + model_id: + type: string + title: Model Id + description: >- + Name of the pipeline to run in the live video to video job. Notice that this is named model_id for consistency with other routes, but it does not refer to a Hugging Face model ID. The exact model(s) depends on the pipeline implementation and might be configurable via the `params` argument. + default: '' + params: + type: object + title: Params + description: Initial parameters for the pipeline. + default: {} + gateway_request_id: + type: string + title: Gateway Request Id + description: The ID of the Gateway request (for logging purposes). + default: '' + manifest_id: + type: string + title: Manifest Id + description: The manifest ID from the orchestrator (for logging purposes). + default: '' + stream_id: + type: string + title: Stream Id + description: The Stream ID (for logging purposes). + default: '' + type: object + required: + - subscribe_url + - publish_url + - model_id + title: LiveVideoToVideoParams + additionalProperties: false + LiveVideoToVideoResponse: + properties: + subscribe_url: + type: string + title: Subscribe Url + description: Source URL of the incoming stream to subscribe to + publish_url: + type: string + title: Publish Url + description: Destination URL of the outgoing stream to publish to + control_url: + type: string + title: Control Url + description: URL for updating the live video-to-video generation + default: '' + events_url: + type: string + title: Events Url + description: URL for subscribing to events for pipeline status and logs + default: '' + request_id: + type: string + title: Request Id + description: The ID generated for this request + default: '' + manifest_id: + type: string + title: Manifest Id + description: Orchestrator manifest ID for this request + default: '' + type: object + required: + - subscribe_url + - publish_url + title: LiveVideoToVideoResponse + description: Response model for live video-to-video generation. MasksResponse: properties: masks: @@ -3166,6 +3365,17 @@ components: - nsfw title: Media description: A media object containing information about the generated media. + MediaURL: + properties: + url: + type: string + title: Url + description: The URL where the media can be accessed. + type: object + required: + - url + title: MediaURL + description: A URL from which media can be accessed. TextResponse: properties: text: @@ -3250,6 +3460,29 @@ components: - prompt title: TextToImageParams additionalProperties: false + TextToSpeechParams: + properties: + model_id: + type: string + title: Model Id + description: Hugging Face model ID used for text to speech generation. + default: '' + text: + type: string + title: Text + description: Text input for speech generation. + default: '' + description: + type: string + title: Description + description: Description of speaker to steer text to speech generation. + default: >- + A male speaker delivers a slightly expressive and animated speech with a moderate speed and pitch. + type: object + title: TextToSpeechParams + required: + - model_id + additionalProperties: false ValidationError: properties: loc: @@ -9866,9 +10099,9 @@ paths: operationId: genLLM requestBody: content: - application/x-www-form-urlencoded: + application/json: schema: - $ref: '#/components/schemas/Body_genLLM' + $ref: '#/components/schemas/LLMRequest' required: true responses: default: @@ -9936,3 +10169,193 @@ paths: } run(); + /api/generate/image-to-text: + post: + tags: + - generate + summary: Image To Text + description: Transform image files to text. + operationId: genImageToText + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_genImageToText' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/studio-api-error' + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/ImageToTextResponse' + x-speakeasy-name-override: data + '400': + description: Bad Request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '401': + description: Unauthorized + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '413': + description: Request Entity Too Large + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '422': + description: Validation Error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPValidationError' + - $ref: '#/components/schemas/studio-api-error' + '500': + description: Internal Server Error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + x-speakeasy-name-override: imageToText + /api/generate/live-video-to-video: + post: + tags: + - generate + summary: Live Video To Video + description: >- + Apply transformations to a live video streamed to the returned endpoints. + operationId: genLiveVideoToVideo + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LiveVideoToVideoParams' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/studio-api-error' + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/LiveVideoToVideoResponse' + x-speakeasy-name-override: data + '400': + description: Bad Request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '401': + description: Unauthorized + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '422': + description: Validation Error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPValidationError' + - $ref: '#/components/schemas/studio-api-error' + '500': + description: Internal Server Error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + x-speakeasy-name-override: liveVideoToVideo + /api/generate/text-to-speech: + post: + tags: + - generate + summary: Text To Speech + description: >- + Generate a text-to-speech audio file based on the provided text input and speaker description. + operationId: genTextToSpeech + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TextToSpeechParams' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/studio-api-error' + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/AudioResponse' + x-speakeasy-name-override: data + '400': + description: Bad Request + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '401': + description: Unauthorized + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + '422': + description: Validation Error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPValidationError' + - $ref: '#/components/schemas/studio-api-error' + '500': + description: Internal Server Error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/HTTPError' + - $ref: '#/components/schemas/studio-api-error' + x-speakeasy-name-override: textToSpeech