Platform

Async jobs

Submit work, poll its state, and retrieve completed results.

Recorded transcription, long text operations, and standard SDK text-to-speech generation use asynchronous jobs.

Job lifecycle

  1. Submit work and store the returned task or job ID.
  2. Poll after a short delay.
  3. Continue while the status is pending or processing.
  4. Stop on completed or failed.
  5. Read the result or the terminal error.

Do not poll in a tight loop. A network timeout while polling does not cancel the backend job.

Recorded transcription

curl -X POST "https://api.orbitalsai.com/api/v1/api/transcribe" \
  -H "Authorization: Bearer $ORBITALSAI_API_KEY" \
  -F "file=@call.mp3" \
  -F "language=hausa"

Poll GET /api/v1/api/status/{task_id}. Completed results contain result_text and optional srt_content.

Text jobs

job = client.submit_text_job(
    task="summarize",
    text=transcript_text,
    language="Hausa",
    style="structured",
)
 
completed = client.wait_for_text_job(
    job.job_id,
    timeout=7200,
    poll_interval=5,
)
 
print(completed.text)

Supported text job tasks are translate, summarize, and redact. Translation also requires target_language; summarization accepts style.

Use client.get_text_job(job_id) for one status check or client.list_text_jobs(...) for history.

Speech jobs

job = client.synthesize("Sannu", language="Hausa", wait=False)
completed = client.wait_for_speech_job(job.job_id)
print(completed.audio_url)

Timeouts

An SDK wait timeout stops only the client-side wait. Keep the ID and query the job later. Choose application timeouts based on the input size and your workflow.

Next steps

On this page