Phonic voices API

The voices API from Phonic — 2 operation(s) for voices.

OpenAPI Specification

phonic-voices-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference agents voices API
  version: 1.0.0
servers:
- url: https://api.phonic.ai/v1
  description: https://api.phonic.ai/v1
tags:
- name: voices
paths:
  /voices:
    get:
      operationId: list
      summary: List
      description: Returns all available voices for a model.
      tags:
      - voices
      parameters:
      - name: model
        in: query
        description: The model to get voices for.
        required: true
        schema:
          $ref: '#/components/schemas/VoicesGetParametersModel'
      - name: Authorization
        in: header
        description: Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voices_list_Response_200'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized (authentication missing or invalid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicError'
  /voices/{id}:
    get:
      operationId: get
      summary: Get
      description: Returns a voice by ID.
      tags:
      - voices
      parameters:
      - name: id
        in: path
        description: The ID of the voice to get.
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voices_get_Response_200'
        '401':
          description: Unauthorized (authentication missing or invalid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicError'
        '404':
          description: Voice not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    voices_get_Response_200:
      type: object
      properties:
        voice:
          $ref: '#/components/schemas/Voice'
      required:
      - voice
      title: voices_get_Response_200
    VoicesGetParametersModel:
      type: string
      enum:
      - merritt
      title: VoicesGetParametersModel
    ValidationError:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ValidationErrorError'
        param_errors:
          type: object
          additionalProperties:
            type: string
          description: Parameter-specific validation errors
      required:
      - error
      - param_errors
      title: ValidationError
    Error:
      oneOf:
      - $ref: '#/components/schemas/BasicError'
      - $ref: '#/components/schemas/ValidationError'
      title: Error
    BasicErrorError:
      type: object
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
      required:
      - message
      title: BasicErrorError
    BasicError:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/BasicErrorError'
      title: BasicError
    ValidationErrorError:
      type: object
      properties:
        message:
          type: string
          description: Error message
      required:
      - message
      title: ValidationErrorError
    Voice:
      type: object
      properties:
        id:
          type: string
          description: The voice ID.
        name:
          type: string
          description: The voice name.
        description:
          type:
          - string
          - 'null'
          description: The voice description.
        audio_url:
          type: string
          format: uri
          description: Presigned URL to the voice sample audio file. Expires in 7 days.
      required:
      - id
      - name
      - description
      - audio_url
      title: Voice
    voices_list_Response_200:
      type: object
      properties:
        voices:
          type: array
          items:
            $ref: '#/components/schemas/Voice'
      required:
      - voices
      title: voices_list_Response_200
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).