From 868515958e2e60d6e714a0086bb4eb89ece5fc58 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 26 Sep 2023 19:45:08 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(async-api.mdx):=20add=20res?= =?UTF-8?q?ponse=20example=20for=20async=20API=20request=20to=20improve=20?= =?UTF-8?q?documentation=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/guidelines/async-api.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/docs/guidelines/async-api.mdx b/docs/docs/guidelines/async-api.mdx index 9ef836704..c5473812e 100644 --- a/docs/docs/guidelines/async-api.mdx +++ b/docs/docs/guidelines/async-api.mdx @@ -27,6 +27,22 @@ curl -X POST \ -d '{"inputs": {"text": ""}, "tweaks": {}, "sync": false}' ``` +Response: + +```json +{ + "result": { + "output": "..." + }, + "task": { + "id": "...", + "href": "api/v1/task/" + }, + "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.