openapi: 3.0.1 info: title: Smallest AI Waves Streaming Voices API description: The Smallest AI Waves text-to-speech API. Generates natural speech from text using the Lightning family of models with sub-100ms latency, streams audio in realtime over Server-Sent Events, lists prebuilt voices, and clones custom voices from short audio samples. All endpoints are authenticated with a Bearer API key. The realtime bidirectional WebSocket transport for streaming TTS is modeled in the companion AsyncAPI document (asyncapi/smallest-ai-asyncapi.yml). termsOfService: https://smallest.ai/terms contact: name: Smallest AI Support url: https://smallest.ai/ email: support@smallest.ai version: '1.0' servers: - url: https://waves-api.smallest.ai/api/v1 description: Waves production API security: - bearerAuth: [] tags: - name: Voices description: List prebuilt voices and manage cloned voices. paths: /lightning/get_voices: get: operationId: getVoices tags: - Voices summary: List available voices. description: Returns the catalog of prebuilt voices available for synthesis, including each voice's identifier and metadata such as language, gender, and accent. responses: '200': description: A list of available voices. content: application/json: schema: $ref: '#/components/schemas/VoiceList' '401': $ref: '#/components/responses/Unauthorized' /lightning/add_voice: post: operationId: addVoice tags: - Voices summary: Clone a voice. description: Creates a new cloned voice from a short reference audio sample. The resulting voice identifier can be used as the `voice_id` in synthesis requests. requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/AddVoiceRequest' responses: '200': description: The created cloned voice. content: application/json: schema: $ref: '#/components/schemas/Voice' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /lightning/get_cloned_voices: get: operationId: getClonedVoices tags: - Voices summary: List cloned voices. description: Returns the voices that the authenticated account has cloned. responses: '200': description: A list of cloned voices. content: application/json: schema: $ref: '#/components/schemas/VoiceList' '401': $ref: '#/components/responses/Unauthorized' /lightning/delete_voice/{voiceId}: delete: operationId: deleteVoice tags: - Voices summary: Delete a cloned voice. description: Permanently deletes a previously cloned voice owned by the account. parameters: - name: voiceId in: path required: true description: Identifier of the cloned voice to delete. schema: type: string responses: '200': description: The voice was deleted. content: application/json: schema: $ref: '#/components/schemas/DeleteResponse' '401': $ref: '#/components/responses/Unauthorized' '404': description: The voice was not found. components: schemas: AddVoiceRequest: type: object required: - displayName - file properties: displayName: type: string description: Human-readable name for the cloned voice. example: My Brand Voice file: type: string format: binary description: Reference audio sample (e.g. WAV/MP3) to clone the voice from. Error: type: object properties: status: type: string description: Error status indicator. message: type: string description: Human-readable error message. error: type: string description: Error code or detail, when present. Voice: type: object properties: voiceId: type: string description: Unique identifier used as `voice_id` in synthesis requests. displayName: type: string description: Human-readable voice name. language: type: string description: Primary language of the voice. gender: type: string description: Voice gender, when available. accent: type: string description: Voice accent, when available. tags: type: array description: Descriptive tags for the voice. items: type: string DeleteResponse: type: object properties: status: type: string example: success message: type: string VoiceList: type: object properties: voices: type: array items: $ref: '#/components/schemas/Voice' responses: ValidationError: description: The request body failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer description: 'Pass your Waves API key as a Bearer token in the Authorization header: `Authorization: Bearer `.'