Dža ko lil

xAI Text to Speech

Integriruj

Modelosko id xai/tts/v1
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/tts/v1?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence."
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Kava mangipen: $0.001 1 API kredito Phir les kate

Lel API klidin

Text-to-speech built-in gilenca, čhibakere alosaripasa thaj inline tagenca pala ekspresivno vakeripen

xAI · Audio

Tiro prvo rezultato si kate

Ker tele jekh mangipen thaj phir les tire API klidinosa. E rezultatur si kopirime amare arakhipneste, vično vaj 7 dives bilačhes.

Ker jekh mangipen

O kontrolura kerde si katar e schemaske. O kodo thaj e cena menjinen sar tu len menjines.

•trubul 50 / 15000

Teksto vaš sinteza e vakeripaski, ekspresivno bičhalipe kontrolime inline tagenca ([laugh], [pause], [sigh]) vaj avri-phandle tagenca (<whisper>text</whisper>, <slow>text</slow>). O inputo našti te avel buter sar 15,000 karakteri.

Lučhe voice · language · enable_safety_checker · output_format
standardno eve

Andrutni luma vučhardi vaš sinteza e vakeripaski.

standardno auto

Čhibaki selekcija katar kadala BCP-47 kódi: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE. Vaš avtomatikano dikhipe, del 'auto'.

Konfiguracija vaš o generirime audio-format; o standardno si MP3 24 kHz sampling-frekvencasa thaj 128 kbps bitrate-sa.

POST /run/xai/tts/v1?wait=20 hesab → $0.001
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/tts/v1?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence."
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Phandel kava mangipen

Tiro kluč ačhel kadale browsereste: bičhalel pes numa ko Doitong API thaj šuvav pes (localStorage) numa te tiknes Remember. Le jekh API ključ

Palal xAI Text to Speech

Paravel dži 15,000 karakterengo tekst andro vakeripen. Alos katar 28 built-in gili thaj jekh čhibakoro kodo vaj automatikano džanipen. O tekst šaj te lel tag sar [laugh], [pause] thaj [sigh], vaj phandime tag <whisper> thaj <slow>, pala ekspresivno prezentacija. `output_format` konfiguririnel o audio-fajlo.

Parametra

NavTip standardnoMuklo Vakeripe
texttrubul
Tipstring
≤ 15,000 simbolura
Teksto vaš sinteza e vakeripaski, ekspresivno bičhalipe kontrolime inline tagenca ([laugh], [pause], [sigh]) vaj avri-phandle tagenca (<whisper>text</whisper>, <slow>text</slow>). O inputo našti te avel buter sar 15,000 karakteri.
voiceopcionalno
Tipenum
standardnoeve
carinazaganhelixorionlunairisaltairzenithperseusheliosluxkeplerrigelcosmocelesteursa
+12 aversiriuslumencastornakshatlasauroralioraaraeveleorexsal
Andrutni luma vučhardi vaš sinteza e vakeripaski.
languageopcionalno
Tipenum
standardnoauto
autoenar-EGar-SAar-AEbnzhfrdehiiditjakopt-BRpt-PT
+5 averrues-MXes-EStrvi
Čhibaki selekcija katar kadala BCP-47 kódi: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE. Vaš avtomatikano dikhipe, del 'auto'.
output_formatopcionalno
Tipobject
Konfiguracija vaš o generirime audio-format; o standardno si MP3 24 kHz sampling-frekvencasa thaj 128 kbps bitrate-sa.
output_format.codecopcionalno
Tipenum
standardnomp3
mp3wavpcmmulawalaw
Kodeko vaš audio-kodiripe; dostupne opcije si mp3, wav, pcm, mulaw, alaw.
output_format.sample_rateopcionalno
Tipenum
standardno24000
80001600022050240004410048000
Audio-sampling-frekvenca, merime ande Hz.
output_format.bit_rateopcionalno
Tipenum
320006400096000128000192000
Bit-rate vaš MP3 rezultato, standardno 128000 thaj merime ande bps; na kerel bući aver kodekenca.
enable_safety_checkeropcionalno
Tipboolean
standardnotrue
Screening šaj te avel relaksirime te postavil pes false, numa kana o manglo si autorizuime.
trubul

Rezultato

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/tts/v1",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "text": "Hello from Doitong. This is a short test sentence."
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Tire fajlura, tiro alosaripenSako outputs[].url si kopija amare arakhipneste: vično (čargeime per GB-mase) vaj 7 dives bilačhes, tiro kontoskere regulaciatar vaj ?storage=.
Sa jekh forma sako modeloθartype, url, content_type, width, height thaj duration, varesave imajinake, video thaj audio-ke. output si o modelosko korkoro resultosko objekto.
Outputoske fieldura
audio
object {url, content_type, file_name, file_size}Audio-fajlo kerdino generiripeça.

AI agentenge: kadija rig sar Markdown si kate https://doitong.com/rom/developers/models/xai/tts/v1.md. Sa e modelura thaj e gidura: https://doitong.com/developers/llms.txt