---
title: "Text2Sound"
method: POST
path: "/text2sound"
tags: ["Text2Audio"]
---

# Text2Sound

`POST /text2sound`

The *Text2Sound* service helps generate an music/sound based on the prompt introduced as input by the user.

## Request body

- object
  - `prompt` string, required — The prompt for the music/sound generation.
  - `duration` number, nullable — The duration for the generated audio in seconds Note these ranges from vendors: ElevenLabs: 0.5-22. Kling: 3-10. Auto if omitted.
  - `loop` boolean — Create looping audio. The usage of this param is not guarantteed as limited number of models do support this. (For example: Supported by ElevenLabs only.)
  - `model` 'urn:air:elevenlabs:model:elevenlabs:elevenlabs-sound-effects-v2@1' | 'urn:air:kling:model:kling:kling-text-to-audio@1', nullable — Optionally choose a specific AI model to use for this audio generation. If not specified, a default model will be applied. Please note that the default model may change over time as Picsart continues to improve performance and accuracy. Any change to the default will be made only after thorough testing and validation to ensure it delivers better results. If you require consistent behavior or wish to evaluate different models on your own, we recommend explicitly setting this parameter.

## Response `202`

Accepted.

- object
  - `status` 'success' | 'error' | 'processing'
  - `inference_id` string, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `413` — Request Entity Too Large
- `415` — Unsupported Media Type
- `429` — Too Many Requests
- `431` — Request Header Fields Too Large
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/picsart/apis/picsart-programmable-image-apis.md) · [All operations](https://skmtc.net/picsart/apis/picsart-programmable-image-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/picsart/picsart-programmable-image-apis/revisions/726b2a637ae8/schema)
