Paxa Labs

บันทึกเสียงที่ออกแบบเอง

POSThttps://api.paxalabs.com/v1/voices/designed

POST /v1/voices/designed บันทึก draft จาก POST /v1/voices/design เป็นเสียงของบัญชี แล้วคืนเสียงนั้นพร้อม id

ดูเป็น Markdown
curl -X POST https://api.paxalabs.com/v1/voices/designed \
  -H "Authorization: Bearer $PAXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"draft\": \"$(jq -r .draft design.json)\", \"name\": \"Nok\"}"
{
  "id": "voice_3f9a1c2e7b4d4e8a9c0b1d2e3f4a5b6c",
  "name": "Nok",
  "role": "Pharmacist",
  "description": "A calm, warm voice that explains each step slowly.",
  "gender": "f",
  "language": "th",
  "model": "paxa-tts-flash-v2",
  "created_at": "2026-10-23T08:41:16.204Z"
}

ส่ง name เพื่อตั้งชื่อเสียง หรือไม่ส่งเพื่อใช้ชื่อที่ได้จากการออกแบบ การบันทึก draft เดิมซ้ำจะคืนเสียงเดิมและไม่ใช้ช่องเพิ่ม จึงส่งซ้ำได้อย่างปลอดภัย

บัญชีที่ใช้ช่องครบแล้วจะตอบ 403 voice_slots_full ดูจำนวนช่องของแต่ละแพ็กเกจได้ในเสียงที่ออกแบบเอง การบันทึกไม่ใช้เครดิตและไม่นับรวมในอัตราจำกัดคำขอ

เฮดเดอร์#

authorizationBearer pxa_...จำเป็น

Authorization: Bearer pxa_... (recommended).

x-api-keypxa_...

Alternative to the Authorization header. Ignored when Authorization is present.

การยืนยันตัวตน

เนื้อหา#

draftstringจำเป็น

The draft a design response returned. Saving one draft again returns the voice it made and takes no slot.

1 to 4,096 characters
namestring

A name for the voice, up to 60 characters. Omitted, the voice keeps the name the design response gave it. A catalog voice's name answers 400 voice_name_taken.

1 to 60 characters

การตอบกลับ#

A designed voice the account saved.

idstringจำเป็น

The voice id, starting "voice_". Send it as voice with model paxa-tts-flash-v2 on POST /v1/tts, POST /v1/audio/speech, or the /v1/tts/live socket.

namestringจำเป็น

Display name, which PATCH changes. The voice field does not accept it.

rolestringจำเป็น

Who the voice is, in a few words.

descriptionstringจำเป็น

How the voice sounds, in one sentence.

gender"f" or "m"จำเป็น

Voice gender, "f" or "m".

language"th" or "en" or "zh"จำเป็น

The one language the voice speaks: "th" (Thai), "en" (English), or "zh" (Mandarin Chinese, Simplified script).

modelstringจำเป็น

The model the voice speaks on.

created_atstringจำเป็น

Save time, ISO 8601.

ข้อผิดพลาด#

400validationThe request body, query, or headers failed validation against the endpoint schema, or broke a rule the endpoint's reference states. A field the schema refused adds two fields to the problem body. path names the first failing field by location and name in dot form, such as body.voice or headers.idempotency-key. A body that could not be read gives the path body alone. reason is one stable code from the validation reasons list.
400draft_invalidThe draft field holds no draft this account received from POST /v1/voices/design. It is altered or cut short, belongs to another account, or no longer opens after a platform update. Nothing was charged.
400voice_name_takenThe name is a catalog voice's name, which no designed voice can take. Nothing was saved.
401unauthorizedThe request carried no API key, or the key is invalid or disabled.
403voice_slots_fullThe account holds as many designed voices as its plan allows. Nothing was saved.