---
title: "Create Sound and Music"
method: POST
path: "/text-to-sound"
tags: ["Apis", "Text-to-Audio"]
---

# Create Sound and Music

`POST /text-to-sound`

## Request body

- CreateTextToAudioRequestPayload
  - `project_name` string, nullable — Enter a distinctive name for your project that reflects its purpose or content. This name will be displayed in your CAMB.AI workspace dashboard and used to organize related assets, transcriptions, etc.. . Choose something memorable that helps you quickly identify this specific project among your other voice, audio and localization tasks.
  - `project_description` string, nullable — Provide details about your project's goals and specifications. Include information such as the target languages for translation or dubbing, desired voice characteristics, emotional tones to capture, or specific audio processing requirements, outlining the workflow here can serve as valuable documentation for organizational purposes.
  - `prompt` string — A textual description of the sound you want to generate. This required field should contain a clear, descriptive explanation of the desired audio effect. While our system can process lengthy descriptions, concise prompts typically yield more accurate results.
  - `duration` number — Specify how long you want your generated audio to be, measured in seconds. This optional parameter defaults to `8.0` seconds if not explicitly set. The duration value directly impacts how the audio evolves over time, with longer durations allowing for more complex sonic development.
  - `audio_type` 'sound' | 'music' — Controls the kind of audio to generate. Use `music` to create musical content (melody, harmony, rhythm). Use `sound` to create non-musical sound effects (foley, ambience, UI cues, impacts).

## Response `200`

Successful Response

- TaskID
  - `task_id` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/camb/apis/fastapi.md) · [All operations](https://skmtc.net/camb/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/camb/fastapi/versions/40ebeee64850/schema)
