-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathagent-api.json
More file actions
388 lines (388 loc) · 15 KB
/
agent-api.json
File metadata and controls
388 lines (388 loc) · 15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
{
"openapi": "3.0.3",
"info": {
"title": "DeepL Agent API",
"description": "API for triggering and monitoring agentic workflows. These endpoints allow users to trigger workflows with custom inputs and poll for task completion status.\n",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.deepl.com",
"description": "Production server"
}
],
"tags": [
{
"name": "agent",
"description": "DeepL Agent workflow operations"
}
],
"paths": {
"/v1/unstable/agent/workflows/{workflowId}/trigger": {
"post": {
"summary": "Trigger a workflow",
"description": "Triggers an agentic workflow with the specified ID. The workflow will be executed asynchronously, and a task ID will be returned to poll for status updates.\n",
"operationId": "trigger_workflow",
"tags": [
"agent"
],
"security": [
{
"auth_header": []
}
],
"parameters": [
{
"name": "workflowId",
"in": "path",
"description": "Unique identifier of the workflow to trigger",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"example": "e1d78ccb-22e0-4a42-90e4-61884cf10af2"
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"workflow_request"
],
"properties": {
"workflow_request": {
"type": "string",
"description": "JSON string containing the workflow input parameters",
"example": "{\"input\": {\"language\": \"American English\"}}"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully triggered the workflow",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TriggerWorkflowResponse"
},
"example": {
"task_id": "e634159a-3414-4f66-a5cd-a1d48ff42ce3",
"ui_url": "https://agent.deepl.com/static/chat/e634159a-3414-4f66-a5cd-a1d48ff42ce3",
"polling_url": "/v1/unstable/agent/tasks/e634159a-3414-4f66-a5cd-a1d48ff42ce3",
"last_modified_date": "2025-12-04T10:30:00Z"
}
}
}
},
"400": {
"description": "Bad request - invalid workflow_request JSON or missing required fields",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"message": "Invalid JSON in workflow_request field"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key, or account is not configured for agentic API use",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Workflow not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"message": "Workflow with ID 'e1d78ccb-22e0-4a42-90e4-61884cf10af2' not found"
}
}
}
}
}
}
},
"/v1/unstable/agent/tasks/{taskId}": {
"get": {
"summary": "Get task status",
"description": "Retrieves the current status and result of a previously triggered workflow task. Use this endpoint to poll for task completion after triggering a workflow.\n",
"operationId": "get_task_status",
"tags": [
"agent"
],
"security": [
{
"auth_header": []
}
],
"parameters": [
{
"name": "taskId",
"in": "path",
"description": "Unique identifier of the task to retrieve",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"example": "e634159a-3414-4f66-a5cd-a1d48ff42ce3"
}
],
"responses": {
"200": {
"description": "Successfully retrieved task status",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetTaskResponse"
},
"examples": {
"in_progress": {
"summary": "Task in progress",
"value": {
"status": "InProgress",
"last_modified_date": "2025-12-04T10:30:00Z",
"ui_url": "https://agent.deepl.com/static/chat/e634159a-3414-4f66-a5cd-a1d48ff42ce3",
"result": {}
}
},
"completed": {
"summary": "Task completed",
"value": {
"status": "Completed",
"last_modified_date": "2026-02-27T09:57:50.863818+00:00",
"ui_url": "https://agent.deepl.com/static/chat/e634159a-3414-4f66-a5cd-a1d48ff42ce3",
"result": {
"screenshot": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjlhMjg1NmJmLTUzMzMtNGZkOC05NTAwLTNlYTI2N2I3MjliNiIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.686af5947238ed6920c29d83436bfc98c9d6c4015da0594e56007fff234f06e8",
"response": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjUzOGU4OWFmLTNkN2QtNGEwZi04MDYxLWMyOTUzZjExZWEzOCIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.c88919cdc7bb9f7fc22ac7bd9b23c5c325a772d31310f437d4a04672c86cba32",
"data": null
},
"result_data": [
{
"artifactId": "9a2856bf-5333-4fd8-9500-3ea267b729b6",
"contentUrl": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjlhMjg1NmJmLTUzMzMtNGZkOC05NTAwLTNlYTI2N2I3MjliNiIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.686af5947238ed6920c29d83436bfc98c9d6c4015da0594e56007fff234f06e8",
"name": "final_screenshot",
"description": "Final browser screenshot",
"schema": null
},
{
"artifactId": "5e381ed3-1642-40f7-b8de-69338fc4698f",
"contentUrl": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjVlMzgxZWQzLTE2NDItNDBmNy1iOGRlLTY5MzM4ZmM0Njk4ZiIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.f8bd75650b8112fff05b6bef8eae83d2472db96266b795f36c6820659c1feaf2",
"name": "Vodafone_News_Last_7_Days.md",
"description": "Top 10 news articles about Vodafone from the last 7 days",
"schema": null
}
]
}
}
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key, or account is not configured for agentic API use",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Task not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"message": "Task with ID 'e634159a-3414-4f66-a5cd-a1d48ff42ce3' not found"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"TriggerWorkflowResponse": {
"type": "object",
"required": [
"task_id",
"last_modified_date"
],
"properties": {
"task_id": {
"type": "string",
"description": "Unique identifier for the triggered workflow task",
"example": "e634159a-3414-4f66-a5cd-a1d48ff42ce3"
},
"ui_url": {
"type": "string",
"nullable": true,
"description": "URL to view the task in the agentic system user interface",
"example": "https://agent.deepl.com/static/chat/e634159a-3414-4f66-a5cd-a1d48ff42ce3"
},
"polling_url": {
"type": "string",
"nullable": true,
"description": "Relative URL endpoint to poll for task status updates",
"example": "/v1/unstable/agent/tasks/e634159a-3414-4f66-a5cd-a1d48ff42ce3"
},
"last_modified_date": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the task was last modified (ISO 8601 format)",
"example": "2025-12-04T10:30:00Z"
}
}
},
"GetTaskResponse": {
"type": "object",
"required": [
"status",
"last_modified_date",
"result"
],
"properties": {
"status": {
"$ref": "#/components/schemas/TaskStatus"
},
"last_modified_date": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the task was last modified (ISO 8601 format)",
"example": "2025-12-04T10:35:00Z"
},
"ui_url": {
"type": "string",
"nullable": true,
"description": "URL to view the task in the agentic UI",
"example": "https://agent.deepl.com/static/chat/e634159a-3414-4f66-a5cd-a1d48ff42ce3"
},
"result": {
"type": "object",
"description": "Workflow result containing presigned URLs to retrieve output artifacts. Present in all responses; empty object `{}` while the task is in progress.",
"properties": {
"response": {
"type": "string",
"nullable": true,
"description": "Presigned URL to retrieve the primary workflow result content. Valid for five minutes.",
"example": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjUzOGU4OWFmLTNkN2QtNGEwZi04MDYxLWMyOTUzZjExZWEzOCIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.c88919cdc7bb9f7fc22ac7bd9b23c5c325a772d31310f437d4a04672c86cba32"
},
"screenshot": {
"type": "string",
"nullable": true,
"description": "Presigned URL to retrieve a screenshot artifact from the workflow. Valid for five minutes.",
"example": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjlhMjg1NmJmLTUzMzMtNGZkOC05NTAwLTNlYTI2N2I3MjliNiIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.686af5947238ed6920c29d83436bfc98c9d6c4015da0594e56007fff234f06e8"
},
"data": {
"nullable": true,
"description": "Additional workflow result data. Structure is workflow-specific."
}
}
},
"result_data": {
"type": "array",
"nullable": true,
"description": "List of all artifacts produced by the workflow, with metadata and presigned content URLs.",
"items": {
"$ref": "#/components/schemas/ResultArtifact"
}
}
}
},
"TaskStatus": {
"type": "string",
"description": "Current status of the task",
"enum": [
"Archived",
"InProgress",
"Completed",
"Canceled",
"Error",
"FeedbackNeeded"
],
"example": "Completed"
},
"ResultArtifact": {
"type": "object",
"required": [
"artifactId",
"contentUrl",
"name",
"description"
],
"properties": {
"artifactId": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of the artifact.",
"example": "9a2856bf-5333-4fd8-9500-3ea267b729b6"
},
"contentUrl": {
"type": "string",
"description": "Presigned URL to retrieve the artifact content. Valid for five minutes.",
"example": "https://agent.deepl.com/api/experimental/content/eyJhcnRpZmFjdF9pZCI6IjlhMjg1NmJmLTUzMzMtNGZkOC05NTAwLTNlYTI2N2I3MjliNiIsInZlcnNpb24iOjEsIm93bmVyX2lkIjoiNWM3YmIyNTQtZTU3NC00MjcyLTk0NTktZGJjN2JiM2JiMmVhIiwiZXhwaXJlcyI6MTc3MjE4NjYyM30=.686af5947238ed6920c29d83436bfc98c9d6c4015da0594e56007fff234f06e8"
},
"name": {
"type": "string",
"description": "Filename or identifier of the artifact.",
"example": "final_screenshot"
},
"description": {
"type": "string",
"description": "Human-readable description of the artifact.",
"example": "Final browser screenshot"
},
"schema": {
"nullable": true,
"description": "Optional schema describing the artifact's data structure."
}
}
},
"ErrorResponse": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "Human-readable error message",
"example": "Workflow with ID 'e1d78ccb-22e0-4a42-90e4-61884cf10af2' not found"
}
}
}
},
"securitySchemes": {
"auth_header": {
"type": "apiKey",
"description": "Authentication with `Authorization` header and `DeepL-Auth-Key` authentication scheme. Example: `DeepL-Auth-Key <api-key>`\n",
"name": "Authorization",
"in": "header"
}
}
}
}