Trigger an Agent API workflow to process an input and receive a task ID for polling.
| File | Description |
|---|---|
curl.sh |
Minimal curl reference command |
node/ |
Node.js implementation |
python/ |
Python implementation |
# Node.js
cd node && DEEPL_API_KEY=your-key WORKFLOW_ID=your-workflow-id node index.js
# Python
cd python && DEEPL_API_KEY=your-key WORKFLOW_ID=your-workflow-id python main.py- Reads
DEEPL_API_KEYandWORKFLOW_IDfrom the environment. - Calls
POST /v1/unstable/agent/workflows/{workflow_id}/triggerwith aworkflow_requestform field containing a JSON payload with the input text. - Prints the
task_id, polling URL, and UI URL returned by the API.
- A DeepL API Pro subscription with Agent API access (Enterprise only — contact sales)
- Your
WORKFLOW_IDprovided by DeepL - Node.js >= 18 or Python >= 3.8
{
"task_id": "b3c91a4f-5e72-4d1b-89f0-abc123456789",
"polling_url": "https://api.deepl.com/v1/unstable/agent/tasks/b3c91a4f-5e72-4d1b-89f0-abc123456789",
"ui_url": "https://app.deepl.com/agent/tasks/b3c91a4f-5e72-4d1b-89f0-abc123456789",
"last_modified_date": "2026-03-05T10:00:00.000Z"
}- The Agent API endpoint is marked
unstableand may change without notice. - Only available on
api.deepl.com(the Pro endpoint);api-free.deepl.comis not supported. - Use the
get-task-resultexample to poll until the task is complete and fetch the result.