Op den Inhalt sprangen

CSM-1B

Integréieren

Modell-ID csm-1b
# 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/csm-1b?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scene": [
      {
        "speaker_id": 0,
        "text": "Hey how are you doing."
      },
      {
        "speaker_id": 1,
        "text": "Pretty good, pretty good."
      },
      {
        "speaker_id": 0,
        "text": "I'\''m great, so happy to be speaking to you."
      }
    ]
  }'

# 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"

Dës Ufro: ≈0,03 $ 30 API-Kreditter Op dëser Säit ausféieren

API-Schlëssel kréien
Sesame Text zu Sprooch #conversational#text-to-speech

Konversationelle Text-zu-Sprooch-Modell mat enger Zeenesammlung an optionalem Audio-Kontext

Sesame · Audio

Äin éischt Resultat kënnt hei hin

Baut hei drënner eng Ufro a féiert se mat Ärem API-Schlëssel aus. Output gëtt an eis Späicherung kopéiert, fir ëmmer oder 7 Deeg gratis gespäichert.

Eng Ufro erstellen

D'Kontrolle ginn aus dem Modellschema generéiert. De Code an de Präis aktualiséiere sech, wann s du se ännerst.

•obligatoresch

Quelltext fir d'Audio-Generatioun.

Erweidert context

Quellkontext fir d'Audio-Generatioun.

POST /run/csm-1b?wait=20 Präis → 0,03 $
# 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/csm-1b?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scene": [
      {
        "speaker_id": 0,
        "text": "Hey how are you doing."
      },
      {
        "speaker_id": 1,
        "text": "Pretty good, pretty good."
      },
      {
        "speaker_id": 0,
        "text": "I'\''m great, so happy to be speaking to you."
      }
    ]
  }'

# 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"

Dës Ufro ausféieren

Äre Schlëssel bleift an dësem Browser: e gëtt nëmmen un d'Doitong API geschéckt an nëmme gespäichert (localStorage), wann s du „Erënneren“ aktivéiers. En API-Schlëssel kréien

Iwwer CSM-1B

Generéiert Sprooch aus enger obligatorescher `scene`, engem Array vun Objeten mat dem ze schwätzenden Text. En optionalen `context`-Array liwwert fréier Gespréichsronnen. D'Resultat ass eng eenzel Audio-Ausgab, entwéckelt fir dialogaarteg Sprooch.

Parameteren

NummTyp StandardErlaabt Beschreiwung
sceneobligatoresch
Typobject[]
Quelltext fir d'Audio-Generatioun.
scene[].speaker_idobligatoresch
Typinteger
scene[].textobligatoresch
Typstring
contextoptional
Typobject[]
Quellkontext fir d'Audio-Generatioun.
context[].promptobligatoresch
Typstring
context[].speaker_idobligatoresch
Typinteger
context[].audio_urlobligatoresch
Typurl · audio
obligatoresch

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "csm-1b",
  "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": 30,
    "usd": "0.03",
    "charged": 30,
    "refunded": 0
  },
  "input": {
    "scene": [
      {
        "speaker_id": 0,
        "text": "Hey how are you doing."
      },
      {
        "speaker_id": 1,
        "text": "Pretty good, pretty good."
      },
      {
        "speaker_id": 0,
        "text": "I'm great, so happy to be speaking to you."
      }
    ]
  },
  "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"
  }
}
Är Fichieren, Är WielAll outputs[].url ass eng Kopie an eiser Späicherung: fir ëmmer gespäichert (bezuelbar pro GB-Mount) oder 7 Deeg gratis, jee no Ärer Kontastellung oder ?storage=.
D'selwecht Struktur bei all Modelltype, url, content_type, width, height an duration, fir Biller, Video an Audio gläichermoossen. output ass dem Modell säin eegent Resultatobjet.
Output-Felder
audio
object {url, content_type, file_name, file_size} | stringAudio, déi vum Modell produzéiert gouf.

Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/csm-1b.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt