📝 docs(async-api.mdx): add response example for async API request to improve documentation clarity

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-26 19:45:08 -03:00
commit 868515958e

View file

@ -27,6 +27,22 @@ curl -X POST \
-d '{"inputs": {"text": ""}, "tweaks": {}, "sync": false}'
```
Response:
```json
{
"result": {
"output": "..."
},
"task": {
"id": "...",
"href": "api/v1/task/<task_id>"
},
"session_id": "...",
"backend": "..." // celery or anyio
}
```
## Checking Task Status
You can check the status of an asynchronous task by making a GET request to the `/task/{task_id}` endpoint.