Vai al contenuto
Riferimento API
Riferimento API

Nemotron Parlato in testo

Invia un URL audio o video scaricabile per la trascrizione asincrona con rilevamento automatico della lingua, timestamp per parola ed etichette dei parlanti opzionali o traduzione vocale.

01

Panoramica

Usa l'endpoint da parlato a testo con un modello supportato. Utilizza il Task ID restituito per recuperarne lo stato, oppure fornisci callback_url per le consegne documentate di seguito.

Avvio rapido

  1. Crea una Chiave API e impostala come RUNAPI_API_KEY.
  2. Scegli un modello supportato e invia una richiesta POST il cui corpo corrisponda allo schema di quel modello.
  3. Conserva l'ID attività restituito, quindi esegui il polling fino a uno stato terminale o gestisci i callback documentati di seguito.

Endpoint

POST /api/v1/nemotron/speech_to_text
URL di base
https://runapi.ai
Versione API
v1
Autenticazione
Authorization: Bearer YOUR_API_TOKEN
02

Modelli supportati

Apri la pagina di un modello per i prezzi correnti, i limiti di frequenza e i dettagli sull'uso commerciale.

03

Schema della richiesta

Corpo JSON

I campi e i valori consentiti dipendono dal modello selezionato. Se fornito, callback_url riceve le notifiche Task documentate di seguito.

nemotron-3.5-transcribe5 campi
callback_urlstring
Opzionale

URL webhook per le notifiche asincrone di completamento.

modelstring
Obbligatorio

Slug del modello di trascrizione Nemotron.

source_audio_urlstring
Obbligatorio

URL audio o video scaricabile direttamente, fino a 60 minuti e 200 MB.

target_languagestring
Opzionale

Lingua di destinazione della traduzione. Ometti per la trascrizione con rilevamento automatico della lingua; non può essere combinato con timestamps impostato su true. La traduzione è supportata da o verso l'inglese.

Valori consentiti: en, zh, ja, ko, fr, de, es, pt, it, ru, nl, pl, cs, sk, hi, bg, hr, da, et, fi, hu, lv, lt, ro, sl, sv, th, uk, ar, el, he, mt
timestampsboolean
Opzionale

Includi i timestamp per parola e le etichette dei parlanti nel JSON di risultato. Non può essere combinato con target_language.

Valori consentiti: true, false Predefinito: false

Regole condizionali

Questi requisiti si applicano quando tutte le condizioni elencate corrispondono.

  1. Quando timestamps = true
    Obbligatorio
    Non accettato
    target_language
04

Crea accettazione

HTTP 202

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "id": "tsk_reference_demo",
  "status": "processing"
}
05

Polling in elaborazione

HTTP 200

GET /api/v1/nemotron/speech_to_text/:id

Schema della risposta
JSON
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "id": "tsk_reference_demo",
  "status": "processing"
}
06

Polling completato

HTTP 200

GET /api/v1/nemotron/speech_to_text/:id

Schema della risposta
JSON
{
  "properties": {
    "duration": {
      "type": "number"
    },
    "expires_at": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "x-runapi-generated-media": true
    },
    "usage": {
      "properties": {
        "cost": {
          "type": "number"
        }
      },
      "required": [
        "cost"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "id",
    "status",
    "text",
    "duration",
    "url",
    "expires_at",
    "usage"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "duration": 12.64,
  "expires_at": "2026-12-04T12:30:23Z",
  "id": "tsk_reference_demo",
  "status": "completed",
  "text": "Welcome to RunAPI.",
  "url": "https://tempfile.runapi.ai/reference-transcript.json",
  "usage": {
    "cost": 0.05
  }
}
07

Polling non riuscito

HTTP 200

GET /api/v1/nemotron/speech_to_text/:id

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
08

Callback cliente: completato

HTTP 200

POST callback_url

Schema della risposta
JSON
{
  "properties": {
    "duration": {
      "type": "number"
    },
    "expires_at": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "x-runapi-generated-media": true
    },
    "usage": {
      "properties": {
        "cost": {
          "type": "number"
        }
      },
      "required": [
        "cost"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  },
  "required": [
    "id",
    "status",
    "text",
    "duration",
    "url",
    "expires_at",
    "usage"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "duration": 12.64,
  "expires_at": "2026-12-04T12:30:23Z",
  "id": "tsk_reference_demo",
  "status": "completed",
  "text": "Welcome to RunAPI.",
  "url": "https://tempfile.runapi.ai/reference-transcript.json",
  "usage": {
    "cost": 0.05
  }
}
09

Callback cliente: fallito

HTTP 200

POST callback_url

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "limit_cents": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "reset_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "used_cents": {
              "type": "integer"
            },
            "window": {
              "enum": [
                "1h",
                "1d",
                "7d",
                "daily",
                "weekly",
                "monthly",
                "lifetime"
              ],
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
10

Errori

HTTP 401

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Authentication required"
}
11

Errori

HTTP 401

GET /api/v1/nemotron/speech_to_text/:id

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Authentication required"
}
12

Errori

HTTP 400

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Messaggio di errore leggibile.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Riepilogo di convalida leggibile dall'utente.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Messaggi di convalida con chiave per campo della richiesta pubblica, con un array di stringhe leggibili dall'utente per ogni campo.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}

Esempio di risposta

JSON
{
  "error": "model must be one of: nemotron-3.5-transcribe"
}
13

Errori

HTTP 402

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Insufficient balance"
}
14

Errori

HTTP 429

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "API key credit limit exceeded"
}
15

Errori

HTTP 409

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "The request uses features that are not supported for the selected model"
}
16

Errori

HTTP 429

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Rate limit reached. Please retry later."
}
17

Errori

HTTP 503

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Service under maintenance, please try again later"
}
18

Errori

HTTP 503

POST /api/v1/nemotron/speech_to_text

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "The request timed out"
}
19

Errori

HTTP 404

GET /api/v1/nemotron/speech_to_text/:id

Schema della risposta
JSON
{
  "properties": {
    "error": {
      "description": "Messaggio di errore leggibile.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

Esempio di risposta

JSON
{
  "error": "Task with id 'tsk_reference_demo' not found"
}
20

Esempi di Codice Generati

Usa cURL direttamente, oppure installa un SDK per il tuo linguaggio. Ogni esempio invia la richiesta validata mostrata in questo riferimento.

Installa

Shell
pip install runapi-nemotron
PYTHON
import os
from runapi.nemotron import NemotronClient

client = NemotronClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.speech_to_text.create(
  model="nemotron-3.5-transcribe",
  source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3",
  timestamps=False
)