Running functions via API

You can run any function via the Push endpoint.

For this example, we are using the Dubbing API. You can explore more API functions through the explore page and use them as sieve/function-name.

API
curl -X POST \
  --url https://mango.sievedata.com/v2/push \
  -H 'X-API-Key: <your-api-key>' \
  -H 'Content-Type: application/json' \
  --data '{
    "function": "sieve/dubbing",
    "inputs": {
      "file": {"url": "https://storage.googleapis.com/sieve-prod-us-central1-public-file-upload-bucket/c27fa3e7-d590-4208-ab8e-57fe69e7a4b9/9acf16f7-be0e-4522-a933-13abcd2fd6e3-input-source_file.mp4"},
      "target_language": "spanish"
    }
  }'

The response will be a JSON object describing the job. Use the job id from this response to get the status and outputs of the job. For more information, refer to the Job Outputs endpoint.

Alternatively, you can monitor your job in the dashboard where you can visualize outputs.

Function inputs and outputs vary by function. Please refer to the respective function’s Usage Guide for more information about integration.