Asynchronous Pipelines

The Pipeline API has two methods of invocation: synchronous, and asynchronous.

When the content you wish to process is either located online and requires download, or if it's in a source format that requires text conversion, like an audio file that requires transcription, or a PDF document that requires OCR, then invoking an asynchronous pipeline is the better choice. If you invoke a sync pipeline, you will have to wait for the response for as much time as it takes to process.

curl -X POST \
'' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'api-key: <YOUR-API-KEY-HERE>' \
-d '{
    "input": "<URL-TO-AUDIO-FILE>",
    "input_type": "conversation",
        "content_type": "audio/wav",
    "steps": [
        "skill": "transcribe",
        "params": {
          "speaker_detection": true
        "skill": "summarize",

The response for an async Pipeline invocation will contain a task ID:


Now you can poll /async/tasks/075f954c-e1d7-4b80-b24d-e460fd266c2. Expect the status to be RUNNING as long as the job is still running. You can stop polling once the status changes to either COMPLETED or FAILED. If the status is COMPLETED, you can find the pipeline result in the result field, if it is FAILED, you can find the error in the error field.

curl -X 'GET' \
  '' \
  -H 'accept: application/json' \
  -H 'api-key: <YOUR-API-KEY-HERE>'

Once the status is COMPLETED, you can fetch the results of the Pipeline API from the result field.


Did this page help you?