Il pacchetto Starter è gratuito: 0 € al mese, con 30 minuti per provarlo su chiamate reali.Il pacchetto Starter è gratuito. Inizia gratis

Riferimento API / AI utilities

AI utilities

Gli endpoint del gruppo AI utilities dell'API Voiceland AI, con parametri, schemi ed esempi curl.

Ultimo aggiornamento:

Le descrizioni degli endpoint e dei campi restano in inglese, esattamente come le pubblica l'API. È una scelta voluta: qui legge ciò che vedrà anche nelle risposte.

POST /v1/chat#

Ask a question over a transcript. Answers a question about a transcript. freeform returns an answer; structured also returns matched + a summary.

Corpo della richiesta

application/json Schema: ChatRequest

Campo Tipo Obbligatorio Descrizione
history array of ChatMessage Optional prior turns for multi-turn context.
max_tokens integer Optional cap on the response length.
mode string Sì freeform (default) returns an answer; structured also returns matched + a summary.
model string Optional model override from the account catalog.
question string Sì The question to answer about the transcript.
transcript string Sì The conversation text to reason over.

Risposte

Codice Descrizione
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Esempio di richiesta

curl -X POST "https://api.voiceland.ai/v1/chat" \
  -H "Authorization: Bearer VL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "structured",
  "question": "What order number?",
  "transcript": "caller: cancel order 4471\nagent: done."
}'

Una risposta riuscita restituisce un StructuredResponse.

Esempio di risposta

{
  "answer": "4471",
  "matched": true,
  "summary": "Caller cancelled order 4471."
}

POST /v1/transcribe#

Transcribe audio. Transcribes an uploaded audio file. Send multipart/form-data with a file part; optional language, model, and speaker_diarization fields.

Corpo della richiesta

multipart/form-data

Risposte

Codice Descrizione
200 Success.
401 Missing or invalid API key.
4XX Request error (validation, not-found, etc.).
5XX Server or upstream error.

Esempio di richiesta

curl -X POST "https://api.voiceland.ai/v1/transcribe" \
  -H "Authorization: Bearer VL_API_KEY" \
  -F "file=@audio.wav" \
  -F "language=el" \
  -F "speaker_diarization=true"

Esempio di risposta

{
  "audio_duration_seconds": 12.3,
  "language": "el",
  "text": "Καλησπέρα…",
  "transcription_id": "…"
}

Schemi#

ChatMessage#

Campo Tipo Obbligatorio Descrizione
content string Sì
role string Sì

ChatRequest#

Ask a question over a transcript.

Campo Tipo Obbligatorio Descrizione
history array of ChatMessage Optional prior turns for multi-turn context.
max_tokens integer Optional cap on the response length.
mode string Sì freeform (default) returns an answer; structured also returns matched + a summary.
model string Optional model override from the account catalog.
question string Sì The question to answer about the transcript.
transcript string Sì The conversation text to reason over.

ChatUsage#

Campo Tipo Obbligatorio Descrizione
completion_tokens integer Sì
prompt_tokens integer Sì
total_tokens integer Sì

Error#

Error envelope returned for non-2xx responses.

Campo Tipo Obbligatorio Descrizione
error object Sì

StructuredResponse#

Campo Tipo Obbligatorio Descrizione
answer string Sì The extracted answer.
matched boolean Sì Whether the transcript contained an answer.
model string Sì
summary string Sì A short summary of the transcript.
usage ChatUsage Sì

La console

Queste pagine sono di sola lettura. La chiamata di prova, le chiavi API e il riferimento API aggiornato si trovano nella console, dove il suo account è connesso.

Apri la console