> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akapulu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update take phonemes

> Rewrite pronunciation and regenerate audio and video instructions. Optional text relabels the line. Fails after video has started, or while audio is still in progress.

Rewrite pronunciation and regenerate audio and video instructions.

`phonemes` is required. Optional `text` relabels the line; omit it to keep the existing `text`. Alphabet and symbols are in [Phonemes](/guides/clips/phonemes).

This charges a new audio job. If there are not enough credits, the request fails and the take is unchanged. It also fails if audio is still in progress, or after video has started.

Poll [Get take](/api-reference/takes/get) until `audio_url` is set again.


## OpenAPI

````yaml openapi/akapulu.json POST /clips/{clip_id}/takes/{take_id}/phonemes
openapi: 3.1.0
info:
  title: Akapulu Labs API
  version: 1.0.0
  description: Public Akapulu Labs API reference.
servers:
  - url: https://akapulu.com/api
security:
  - bearerAuth: []
paths:
  /clips/{clip_id}/takes/{take_id}/phonemes:
    post:
      summary: Update take phonemes
      description: >-
        Rewrite pronunciation and regenerate audio and video instructions.
        Optional text relabels the line. Fails after video has started, or while
        audio is still in progress.
      parameters:
        - name: clip_id
          in: path
          required: true
          description: Clip ID.
          schema:
            type: string
            format: uuid
        - name: take_id
          in: path
          required: true
          description: Take ID.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTakePhonemesRequest'
            examples:
              default:
                value:
                  phonemes: wˈɛlkəm tə ˈækmi
      responses:
        '200':
          description: Audio rebuild started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTakePhonemesResponse'
              examples:
                success:
                  value:
                    id: 22222222-3333-4444-5555-666666666666
                    text: Welcome to Acme. Thanks for watching.
                    phonemes: wˈɛlkəm tə ˈækmi
                    estimated_seconds: 22
                    credits_charged: 0.25
                    credits_used: 0.5
                    credits_remaining: 24.5
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                default:
                  value:
                    error: phonemes must be a string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                default:
                  value:
                    error: Invalid API key
        '403':
          description: Not enough credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                default:
                  value:
                    error: You don't have enough credits on your current plan
                    credits_needed: 0.25
                    credits_remaining: 0
        '404':
          description: Take not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                default:
                  value:
                    error: Take not found
        '409':
          description: Take cannot be edited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                default:
                  value:
                    error: Take video has already started
components:
  schemas:
    UpdateTakePhonemesRequest:
      type: object
      required:
        - phonemes
      properties:
        phonemes:
          type: string
        text:
          type: string
          description: Optional relabel of the spoken line. Omit to keep the existing text.
    UpdateTakePhonemesResponse:
      type: object
      required:
        - id
        - text
        - phonemes
      properties:
        id:
          type: string
          format: uuid
        text:
          type: string
        phonemes:
          type: string
        estimated_seconds:
          type: number
        credits_charged: {}
        credits_used: {}
        credits_remaining: {}
        error:
          type: string
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````