Create async task - cloro

Documentation Index

Fetch the complete documentation index at: /docs/llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Assistant

Responses are generated using AI and may contain mistakes.

Create async task

cURL

curl --request POST \
  --url https://api.cloro.dev/v1/async/task \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "taskType": "CHATGPT",
  "priority": 5,
  "idempotencyKey": "your-custom-identifier-123",
  "webhook": {
    "url": "https://your-app.com/webhook-handler"
  },
  "payload": {
    "prompt": "What is the weather in New York?",
    "country": "US"
  }
}
'
import requests

url = "https://api.cloro.dev/v1/async/task"

payload = {
    "taskType": "CHATGPT",
    "priority": 5,
    "idempotencyKey": "your-custom-identifier-123",
    "webhook": { "url": "https://your-app.com/webhook-handler" },
    "payload": {
        "prompt": "What is the weather in New York?",
        "country": "US"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    taskType: 'CHATGPT',
    priority: 5,
    idempotencyKey: 'your-custom-identifier-123',
    webhook: {url: 'https://your-app.com/webhook-handler'},
    payload: {prompt: 'What is the weather in New York?', country: 'US'}
  })
};

fetch('https://api.cloro.dev/v1/async/task', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.cloro.dev/v1/async/task",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "POST",\
  CURLOPT_POSTFIELDS => json_encode([\
    'taskType' => 'CHATGPT',\
    'priority' => 5,\
    'idempotencyKey' => 'your-custom-identifier-123',\
    'webhook' => [\
        'url' => 'https://your-app.com/webhook-handler'\
    ],\
    'payload' => [\
        'prompt' => 'What is the weather in New York?',\
        'country' => 'US'\
    ]\
  ]),\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>",\
    "Content-Type: application/json"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://api.cloro.dev/v1/async/task"

payload := strings.NewReader("{\n  \"taskType\": \"CHATGPT\",\n  \"priority\": 5,\n  \"idempotencyKey\": \"your-custom-identifier-123\",\n  \"webhook\": {\n    \"url\": \"https://your-app.com/webhook-handler\"\n  },\n  \"payload\": {\n    \"prompt\": \"What is the weather in New York?\",\n    \"country\": \"US\"\n  }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
    req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.cloro.dev/v1/async/task")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"taskType\": \"CHATGPT\",\n  \"priority\": 5,\n  \"idempotencyKey\": \"your-custom-identifier-123\",\n  \"webhook\": {\n    \"url\": \"https://your-app.com/webhook-handler\"\n  },\n  \"payload\": {\n    \"prompt\": \"What is the weather in New York?\",\n    \"country\": \"US\"\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.cloro.dev/v1/async/task")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"taskType\": \"CHATGPT\",\n  \"priority\": 5,\n  \"idempotencyKey\": \"your-custom-identifier-123\",\n  \"webhook\": {\n    \"url\": \"https://your-app.com/webhook-handler\"\n  },\n  \"payload\": {\n    \"prompt\": \"What is the weather in New York?\",\n    \"country\": \"US\"\n  }\n}"

response = http.request(request)
puts response.read_body

200

400

401

403

409

429

500

{
  "success": true,
  "task": {
    "id": "b27a21e1-7c39-4aa2-a347-23e828c426f9",
    "taskType": "CHATGPT",
    "status": "QUEUED",
    "priority": 1,
    "createdAt": "2026-04-09T15:00:00.000Z",
    "latencyMs": null,
    "idempotencyKey": "batch-chatgpt-001"
  },
  "credits": {
    "creditsToCharge": 5,
    "creditsCharged": null
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": [\
      {\
        "field": "prompt",\
        "message": "Prompt cannot be empty"\
      }\
    ],
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "Missing or invalid API key",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "Insufficient credits",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "RESOURCE_ALREADY_EXISTS",
    "message": "Task already exists",
    "details": {
      "field": "idempotencyKey",
      "value": "your-custom-identifier-123",
      "taskId": "b27a21e1-7c39-4aa2-a347-23e828c426f9"
    },
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "QUEUE_LIMIT_EXCEEDED",
    "message": "Queue limit exceeded. Maximum 100000 queued tasks allowed per organization",
    "timestamp": "2026-04-09T15:00:00.000Z",
    "details": {
      "limit": 100000
    }
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "Maximum retries exceeded",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}

POST

/

v1

/

async

/

task

Try it

Create async task

cURL

import requests

url = "https://api.cloro.dev/v1/async/task"

response = requests.post(url, json=payload, headers=headers)

print(response.text)

fetch('https://api.cloro.dev/v1/async/task', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));


") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` ``` require 'uri' require 'net/http' url = URI("https://api.cloro.dev/v1/async/task") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true response = http.request(request) puts response.read_body ``` 200 400 401 403 409 429 500 ``` { "success": false, "error": { "code": "MISSING_API_KEY", "message": "Missing or invalid API key", "timestamp": "2025-01-15T12:00:00.000Z" } } ``` ``` { "success": false, "error": { "code": "INSUFFICIENT_CREDITS", "message": "Insufficient credits", "timestamp": "2025-01-15T12:00:00.000Z" } } ``` ``` { "success": false, "error": { "code": "INTERNAL_SERVER_ERROR", "message": "Maximum retries exceeded", "timestamp": "2025-01-15T12:00:00.000Z" } } ``` Submits a task for asynchronous processing. The response carries a `taskId` you can poll via [`GET /v1/async/task/{taskId}`](/content/docs/api-reference/endpoint/get-task-status/index.html); if you provide a `webhook.url`, cloro also delivers the results to that URL. - **Priority**: optional, 1 (lowest, default) to 10 (highest). The scheduler runs higher [priority](/content/docs/guides/making-requests/async/index.html#request-prioritization) tasks first, then FIFO within the same level. Check your queue’s priority distribution with the [async status endpoint](/content/docs/api-reference/endpoint/get-async-status/index.html). - **Idempotency**: an optional `idempotencyKey` prevents duplicate task creation. Reusing a key returns `409 Conflict`, and `error.details.taskId` is the ID of the task that already holds the key. New tasks start with status `QUEUED`. Submitting costs nothing on its own — credits are charged when the task completes. The balance is still checked at submission, so this endpoint returns `403 INSUFFICIENT_CREDITS` when your credits do not cover the task’s `creditsToCharge`, and a queued task can still fail later if the balance runs out before the scheduler reaches it. See [what happens when credits run out](/content/docs/guides/making-requests/async/index.html#what-happens-to-async-tasks-when-my-credits-run-out). ## [Navigate to header: Example usage](/content/docs/api-reference/endpoint/create-async-task/index.html#example-usage) Example usage cURL Response ``` curl -X POST "https://api.cloro.dev/v1/async/task" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "taskType": "CHATGPT", "priority": 5, "idempotencyKey": "your-custom-identifier-123", "webhook": { "url": "https://your-app.com/webhook-handler" }, "payload": { "prompt": "What is the weather in New York?", "country": "US" } }' ``` ``` { "success": true, "task": { "id": "b27a21e1-7c39-4aa2-a347-23e828c426f9", "taskType": "CHATGPT", "status": "QUEUED", "priority": 5, "createdAt": "2025-11-10T15:00:00.000Z", "latencyMs": null, "idempotencyKey": "your-custom-identifier-123" }, "credits": { "creditsToCharge": 5, "creditsCharged": null } } ``` #### Authorizations [Navigate to header: Authorization](/content/docs/api-reference/endpoint/create-async-task/index.html#authorization-authorization) Authorization string header required cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the [dashboard](https://dashboard.cloro.dev/api-keys). #### Body application/json [Navigate to header: taskType](/content/docs/api-reference/endpoint/create-async-task/index.html#body-task-type) taskType enum required The AI provider to use for this task. Available options: `AIMODE`, `BING_AIMODE`, `GOOGLE`, `GOOGLE_NEWS`, `GOOGLE_PRODUCT`, `GEMINI`, `CHATGPT` Example: `"CHATGPT"` [Navigate to header: payload](/content/docs/api-reference/endpoint/create-async-task/index.html#body-payload) payload object required The provider's request body, validated against the same schema as its sync endpoint (for example `ChatGPTMonitorRequest`). That makes `country` required here too, or `gl` on the Google endpoints. For `GOOGLE_PRODUCT`, send only `productResultToken`. Example: ``` { "prompt": "What do you know about Acme Corp?", "country": "US" } ``` [Navigate to header: priority](/content/docs/api-reference/endpoint/create-async-task/index.html#body-priority) priority integer default:1 Task priority level (1-10). Higher numbers are processed first. Defaults to 1. Required range: `1 <= x <= 10` Example: `5` [Navigate to header: idempotencyKey](/content/docs/api-reference/endpoint/create-async-task/index.html#body-idempotency-key) idempotencyKey string Unique string to prevent duplicate task creation. Must be unique across your account. Example: `"batch-chatgpt-001"` [Navigate to header: webhook](/content/docs/api-reference/endpoint/create-async-task/index.html#body-webhook) webhook object Webhook configuration for task completion notification. Showchild attributes #### Response 200 application/json Task created successfully. Returns task ID and initial status. [Navigate to header: success](/content/docs/api-reference/endpoint/create-async-task/index.html#response-success) success boolean required Example: `true` [Navigate to header: task](/content/docs/api-reference/endpoint/create-async-task/index.html#response-task) task object required Common task summary fields shared across async task responses. Showchild attributes [Navigate to header: credits](/content/docs/api-reference/endpoint/create-async-task/index.html#response-credits) credits object required Credit information for an async task. Showchild attributes Was this page helpful? YesNo {"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"cloro","colors":{"primary":"#60A5FA","light":"#93C5FD","dark":"#3B82F6"},"logo":{"light":"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/light.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=9649c139f2768786bbd491a86c1a9dd9","dark":"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/dark.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=8b254a805d19d5a08a152025628fc518","href":"https://cloro.dev/"},"favicon":"https://mintcdn.com/cloro/JJLSAXWoRDaE6XhQ/favicon.ico?fit=max\\u0026auto=format\\u0026n=JJLSAXWoRDaE6XhQ\\u0026q=85\\u0026s=fb070a58a43d3a399505f112fcb2cf5b","api":{"playground":{"proxy":false}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.cloro.dev/"}},"footer":{"socials":{"github":"https://github.com/cloro-dev","website":"https://cloro.dev/"}},"seo":{"metatags":{"canonical":"https://cloro.dev/docs"}},"integrations":{"posthog":{"apiKey":"phc\_O2d3bu6YrOXrcUYH9E1Dx6zc4kkW8eez5qXOFbBWii3","apiHost":"https://reverseproxy.cloro.dev"}},"banner":{"content":"The AI Assistant is here to help — ask it anything instead of browsing through the pages.","dismissible":true},"contextual":{"options":\["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"\],"display":"header"},"styling":{"latex":false},"navigation":{"pages":\[\]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cloro","hasAudioNarration":false,"actualSubdomain":"cloro","customDomains":\["cloro.dev"\],"gitSource":{"type":"github","owner":"cloro-dev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI\_CHAT":{"status":"ENABLED"}},"buildId":"6afee69d0b27e3d5820b1225","clientVersion":"0.0.4227","searchFilterCounts":\[{"language":"default","tag":"API Reference","count":76},{"language":"default","tag":"Google","count":37},{"language":"default","tag":"Documentation","count":23},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"Google AI Mode","count":10},{"language":"default","tag":"ChatGPT","count":10},{"language":"default","tag":"Integrations","count":9},{"language":"default","tag":"AI Overview","count":7},{"language":"default","tag":"Async tasks","count":5},{"language":"default","tag":"Gemini","count":5}\]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@cloro.dev"}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":false,"toggles":\[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature\_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false}\],"googleFontsInlined":false},"customCss":\[\]} {"page":{"pagePath":"api-reference/endpoint/create-async-task","slug":"/api-reference/endpoint/create-async-task","pageMetadata":{"title":"Create async task","openapi":"api-reference/openapi.json POST /v1/async/task","description":"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.","href":"/api-reference/endpoint/create-async-task"},"description":{"compiledSource":"\\"use strict\\";\\nconst {jsx: \_jsx} = arguments\[0\];\\nconst {useMDXComponents: \_provideComponents} = arguments\[0\];\\nfunction \_createMdxContent(props) {\\n const \_components = {\\n p: \\"p\\",\\n ...\_provideComponents(),\\n ...props.components\\n };\\n return \_jsx(\_components.p, {\\n children: \\"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.\\"\\n });\\n}\\nfunction MDXContent(props = {}) {\\n const {wrapper: MDXLayout} = {\\n ...\_provideComponents(),\\n ...props.components\\n };\\n return MDXLayout ? \_jsx(MDXLayout, {\\n ...props,\\n children: \_jsx(\_createMdxContent, {\\n ...props\\n })\\n }) : \_createMdxContent(props);\\n}\\nreturn {\\n default: MDXContent\\n};\\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\\"use strict\\";const{Fragment:\_Fragment,jsx:\_jsx,jsxs:\_jsxs}=arguments\[0\];const{useMDXComponents:\_provideComponents}=arguments\[0\];function \_createMdxContent(props){const \_components={a:\`a\`,code:\`code\`,li:\`li\`,p:\`p\`,pre:\`pre\`,span:\`span\`,strong:\`strong\`,ul:\`ul\`,...\_provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading}=\_components;if(!CodeBlock)\_missingMdxReference(\`CodeBlock\`,true);if(!CodeGroup)\_missingMdxReference(\`CodeGroup\`,true);if(!Heading)\_missingMdxReference(\`Heading\`,true);return \_jsxs(\_Fragment,{children:\[\_jsxs(\_components.p,{children:\[\`Submits a task for asynchronous processing. The response carries a \`,\_jsx(\_components.code,{children:\`taskId\`}),\` you can poll via \`,\_jsx(\_components.a,{href:\`/api-reference/endpoint/get-task-status\`,children:\_jsx(\_components.code,{children:\`GET /v1/async/task/{taskId}\`})}),\`; if you provide a \`,\_jsx(\_components.code,{children:\`webhook.url\`}),\`, cloro also delivers the results to that URL.\`\]}),\`\\n\`,\_jsxs(\_components.ul,{children:\[\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.strong,{children:\`Priority\`}),\`: optional, 1 (lowest, default) to 10 (highest). The scheduler runs higher \`,\_jsx(\_components.a,{href:\`/guides/making-requests/async#request-prioritization\`,children:\`priority\`}),\` tasks first, then FIFO within the same level. Check your queue’s priority distribution with the \`,\_jsx(\_components.a,{href:\`/api-reference/endpoint/get-async-status\`,children:\`async status endpoint\`}),\`.\`\]}),\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.strong,{children:\`Idempotency\`}),\`: an optional \`,\_jsx(\_components.code,{children:\`idempotencyKey\`}),\` prevents duplicate task creation. Reusing a key returns \`,\_jsx(\_components.code,{children:\`409 Conflict\`}),\`, and \`,\_jsx(\_components.code,{children:\`error.details.taskId\`}),\` is the ID of the task that already holds the key.\`\]}),\`\\n\`\]}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`New tasks start with status \`,\_jsx(\_components.code,{children:\`QUEUED\`}),\`. Submitting costs nothing on its own — credits are charged when the task completes. The balance is still checked at submission, so this endpoint returns \`,\_jsx(\_components.code,{children:\`403 INSUFFICIENT\_CREDITS\`}),\` when your credits do not cover the task’s \`,\_jsx(\_components.code,{children:\`creditsToCharge\`}),\`, and a queued task can still fail later if the balance runs out before the scheduler reaches it. See \`,\_jsx(\_components.a,{href:\`/guides/making-requests/async#what-happens-to-async-tasks-when-my-credits-run-out\`,children:\`what happens when credits run out\`}),\`.\`\]}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`example-usage\`,children:\`Example usage\`}),\`\\n\`,\_jsxs(CodeGroup,{children:\[\_jsx(CodeBlock,{filename:\`cURL\`,numberOfLines:\`15\`,language:\`shellscript\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`shellscript\`,children:\_jsxs(\_components.code,{language:\`shellscript\`,numberOfLines:\`15\`,children:\[\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\`curl\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` -X\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` POST\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"https://api.cloro.dev/v1/async/task\\"\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D7BA7D\`},children:\` \\\\\\\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` -H\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"Authorization: Bearer YOUR\_API\_KEY\\"\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D7BA7D\`},children:\` \\\\\\\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` -H\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"Content-Type: application/json\\"\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D7BA7D\`},children:\` \\\\\\\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` -d\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` '{\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"taskType\\": \\"CHATGPT\\",\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"priority\\": 5,\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"idempotencyKey\\": \\"your-custom-identifier-123\\",\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"webhook\\": {\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"url\\": \\"https://your-app.com/webhook-handler\\"\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` },\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"payload\\": {\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"prompt\\": \\"What is the weather in New York?\\",\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"country\\": \\"US\\"\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` }\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` }'\`})}),\`\\n\`\]})})}),\_jsx(CodeBlock,{filename:\`Response\`,numberOfLines:\`16\`,language:\`json\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`json\`,children:\_jsxs(\_components.code,{language:\`json\`,numberOfLines:\`16\`,children:\[\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`{\`})}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"success\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`true\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"task\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"id\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"b27a21e1-7c39-4aa2-a347-23e828c426f9\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"taskType\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"CHATGPT\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"status\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"QUEUED\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"priority\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#B5CEA8\`},children:\`5\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"createdAt\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"2025-11-10T15:00:00.000Z\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"latencyMs\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`null\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"idempotencyKey\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"your-custom-identifier-123\\"\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` },\`})}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"credits\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"creditsToCharge\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#B5CEA8\`},children:\`5\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` \\"creditsCharged\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`: \`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`null\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` }\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`}\`})}),\`\\n\`\]})})})\]})\]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...\_provideComponents(),...props.components};return MDXLayout?\_jsx(MDXLayout,{...props,children:\_jsx(\_createMdxContent,{...props})}):\_createMdxContent(props)}return{default:MDXContent};function \_missingMdxReference(id,component){throw new Error(\`Expected \`+(component?\`component\`:\`object\`)+\\" \`\\"+id+\\"\` to be defined: you likely forgot to import, pass, or provide it.\\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create async task","openapi":"api-reference/openapi.json POST /v1/async/task","description":"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.","href":"/api-reference/endpoint/create-async-task"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":\[{"title":"Example usage","slug":"example-usage","depth":2,"children":\[\]}\],"codeExamples":{}},"jsLinks":\[\],"openApiReferenceData":{"operation":{"summary":"Create async task","description":"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.","operationId":"createAsyncTask","security":\["306b3c1a-772a-48c2-9503-f824eaf4dae9"\],"requestBody":"e6a1f5d2-b3f0-4861-b03b-ff735684403f","responses":{"200":"0706ce9c-c206-40db-a539-46dbaccf9771","400":"4ace4aa3-94ed-4caf-a8ac-85d79d79bac6","401":"7f8226f0-1370-4669-8891-441c0e1dffa2","403":"7d350665-4ad7-4c8e-b45a-6e5dde4969b2","409":"5a1095f4-689e-40a0-a19c-0d047d12d262","429":"d634989a-7fd9-4cc0-90b2-1aae4ff845d3","500":"9d63f5d4-0032-47b7-98e7-253c58ce0c87"},"method":"post","type":"path","servers":\["6c961360-d524-4a5c-b9bc-4fd78048e760"\],"path":"/v1/async/task","baseUrlOptions":\["https://api.cloro.dev"\],"title":"Create async task","codeSamples":\[\],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":\["taskType","payload"\],"properties":{"taskType":{"type":"string","enum":\["AIMODE","BING\_AIMODE","GOOGLE","GOOGLE\_NEWS","GOOGLE\_PRODUCT","GEMINI","CHATGPT"\],"description":"The AI provider to use for this task.","example":"CHATGPT","isRequired":true,"uniqueKey":"taskType","typeLabel":"enum\\u003cstring>"},"payload":{"type":"object","description":"The provider's request body, validated against the same schema as its sync endpoint (for example \`ChatGPTMonitorRequest\`). That makes \`country\` required here too, or \`gl\` on the Google endpoints. For \`GOOGLE\_PRODUCT\`, send only \`productResultToken\`.","example":{"prompt":"What do you know about Acme Corp?","country":"US"},"isRequired":true,"uniqueKey":"payload","typeLabel":"object"},"priority":{"type":"integer","description":"Task priority level (1-10). Higher numbers are processed first. Defaults to 1.","minimum":1,"maximum":10,"default":1,"example":5,"uniqueKey":"priority","typeLabel":"integer"},"idempotencyKey":{"type":"string","description":"Unique string to prevent duplicate task creation. Must be unique across your account.","example":"batch-chatgpt-001","uniqueKey":"idempotencyKey","typeLabel":"string"},"webhook":{"type":"object","description":"Webhook configuration for task completion notification.","properties":{"url":{"type":"string","format":"uri","description":"URL to receive the webhook POST request when the task completes.","example":"https://your-app.com/webhook-handler","isRequired":true,"uniqueKey":"webhook.url","typeLabel":"string\\u003curi>"}},"required":\["url"\],"additionalProperties":false,"uniqueKey":"webhook","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"example":{"taskType":"CHATGPT","priority":5,"idempotencyKey":"your-custom-identifier-123","webhook":{"url":"https://your-app.com/webhook-handler"},"payload":{"prompt":"What is the weather in New York?","country":"US"}},"examples":{"Example":{"title":"Example","value":{"taskType":"CHATGPT","priority":5,"idempotencyKey":"your-custom-identifier-123","webhook":{"url":"https://your-app.com/webhook-handler"},"payload":{"prompt":"What is the weather in New York?","country":"US"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"0706ce9c-c206-40db-a539-46dbaccf9771":{"description":"Task created successfully. Returns task ID and initial status.","content":{"application/json":{"schema":{"type":"object","required":\["success","task","credits"\],"properties":{"success":{"type":"boolean","example":true,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"task":{"type":"object","required":\["id","taskType","status","priority","createdAt"\],"description":"Common task summary fields shared across async task responses.","properties":{"id":{"type":"string","format":"uuid","description":"Unique task identifier.","example":"b27a21e1-7c39-4aa2-a347-23e828c426f9","isRequired":true,"uniqueKey":"task.id","typeLabel":"string\\u003cuuid>"},"taskType":{"type":"string","enum":\["AIMODE","BING\_AIMODE","GOOGLE","GOOGLE\_NEWS","GOOGLE\_PRODUCT","GEMINI","CHATGPT"\],"description":"The AI provider for this task.","example":"CHATGPT","isRequired":true,"uniqueKey":"task.taskType","typeLabel":"enum\\u003cstring>"},"status":{"type":"string","enum":\["QUEUED","PROCESSING","COMPLETED","FAILED"\],"description":"Current task status.","example":"QUEUED","isRequired":true,"uniqueKey":"task.status","typeLabel":"enum\\u003cstring>"},"priority":{"type":"integer","description":"Task priority level (1-10). Higher numbers are processed first. Defaults to 1.","minimum":1,"maximum":10,"example":1,"isRequired":true,"uniqueKey":"task.priority","typeLabel":"integer"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the task was created.","example":"2026-04-09T15:00:00.000Z","isRequired":true,"uniqueKey":"task.createdAt","typeLabel":"string\\u003cdate-time>"},"latencyMs":{"oneOf":\[{"type":"integer","description":"Processing time in milliseconds, from first pickup to the final outcome. Excludes the initial queue wait, but on a retried task covers every attempt including the backoff between them. Null while the task is \`QUEUED\` or \`PROCESSING\`, and on a task that failed before processing started.","example":null,"uniqueKey":"task.latencyMs.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Processing time in milliseconds, from first pickup to the final outcome. Excludes the initial queue wait, but on a retried task covers every attempt including the backoff between them. Null while the task is \`QUEUED\` or \`PROCESSING\`, and on a task that failed before processing started.","example":null,"uniqueKey":"task.latencyMs.oneOf.1","typeLabel":"null"}\],"uniqueKey":"task.latencyMs","typeLabel":"integer \| null"},"idempotencyKey":{"oneOf":\[{"type":"string","description":"The idempotency key if one was provided.","example":"batch-chatgpt-001","uniqueKey":"task.idempotencyKey.oneOf.0","typeLabel":"string"},{"type":"null","description":"The idempotency key if one was provided.","example":"batch-chatgpt-001","uniqueKey":"task.idempotencyKey.oneOf.1","typeLabel":"null"}\],"uniqueKey":"task.idempotencyKey","typeLabel":"string \| null"}},"isRequired":true,"uniqueKey":"task","typeLabel":"object"},"credits":{"type":"object","required":\["creditsToCharge","creditsCharged"\],"description":"Credit information for an async task.","properties":{"creditsToCharge":{"type":"number","description":"Estimated cost, computed when the task is submitted. Nothing is reserved or deducted then; credits are deducted only when the task completes.","example":5,"isRequired":true,"uniqueKey":"credits.creditsToCharge","typeLabel":"number"},"creditsCharged":{"oneOf":\[{"type":"number","description":"Credits actually charged: null until the task finishes, then the amount billed for \`COMPLETED\`, or \`0\` for \`FAILED\` (failed tasks are never charged). Equals \`creditsToCharge\`, except that AI Mode with \`include.expandProducts\` adds +1 credit per product cluster returned.","example":null,"isRequired":true,"uniqueKey":"credits.creditsCharged.oneOf.0","typeLabel":"number"},{"type":"null","description":"Credits actually charged: null until the task finishes, then the amount billed for \`COMPLETED\`, or \`0\` for \`FAILED\` (failed tasks are never charged). Equals \`creditsToCharge\`, except that AI Mode with \`include.expandProducts\` adds +1 credit per product cluster returned.","example":null,"isRequired":true,"uniqueKey":"credits.creditsCharged.oneOf.1","typeLabel":"null"}\],"isRequired":true,"uniqueKey":"credits.creditsCharged","typeLabel":"number \| null"}},"isRequired":true,"uniqueKey":"credits","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"task":{"id":"b27a21e1-7c39-4aa2-a347-23e828c426f9","taskType":"CHATGPT","status":"QUEUED","priority":1,"createdAt":"2026-04-09T15:00:00.000Z","latencyMs":null,"idempotencyKey":"batch-chatgpt-001"},"credits":{"creditsToCharge":5,"creditsCharged":null}}}},"exampleType":"generated"}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer","example":997}},"X-Request-ID":{"description":"Unique ID for this request. Support uses it to find your request.","schema":{"type":"string","format":"uuid","example":"b0864943-5d45-4796-bc64-f052661256f0"}},"X-Latency-Ms":{"description":"Milliseconds the API spent on the request, from arrival to the start of the response. Excludes network transit.","schema":{"type":"integer","example":3420}}},"exampleType":"generated"},"4ace4aa3-94ed-4caf-a8ac-85d79d79bac6":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","example":"VALIDATION\_ERROR","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Request validation failed","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","description":"One entry per invalid field. Sent on request-body validation errors.","items":{"type":"object","properties":{"field":{"type":"string","example":"prompt","uniqueKey":"error.details.items.\[INDEX\].field","typeLabel":"string"},"message":{"type":"string","example":"Prompt cannot be empty","uniqueKey":"error.details.items.\[INDEX\].message","typeLabel":"string"}},"uniqueKey":"error.details.items.\[INDEX\]","typeLabel":"object"},"uniqueKey":"error.details","typeLabel":"object\[\]"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"VALIDATION\_ERROR","message":"Request validation failed","details":\[{"field":"prompt","message":"Prompt cannot be empty"}\],"timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"7f8226f0-1370-4669-8891-441c0e1dffa2":{"description":"Unauthorized - Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","enum":\["MISSING\_API\_KEY","INVALID\_API\_KEY\_FORMAT","INVALID\_OR\_EXPIRED\_API\_KEY"\],"example":"MISSING\_API\_KEY","uniqueKey":"error.code","typeLabel":"enum\\u003cstring>"},"message":{"type":"string","example":"Missing or invalid API key","uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"MISSING\_API\_KEY","message":"Missing or invalid API key","timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"7d350665-4ad7-4c8e-b45a-6e5dde4969b2":{"description":"Forbidden - The credit balance does not cover this task's cost","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","enum":\["INSUFFICIENT\_CREDITS"\],"example":"INSUFFICIENT\_CREDITS","uniqueKey":"error.code","typeLabel":"enum\\u003cstring>"},"message":{"type":"string","example":"Insufficient credits","uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"INSUFFICIENT\_CREDITS","message":"Insufficient credits","timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"5a1095f4-689e-40a0-a19c-0d047d12d262":{"description":"Conflict - Task with this idempotencyKey already exists","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","enum":\["RESOURCE\_ALREADY\_EXISTS"\],"example":"RESOURCE\_ALREADY\_EXISTS","uniqueKey":"error.code","typeLabel":"enum\\u003cstring>"},"message":{"type":"string","example":"Task already exists","uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","properties":{"field":{"type":"string","example":"idempotencyKey","uniqueKey":"error.details.field","typeLabel":"string"},"value":{"type":"string","example":"your-custom-identifier-123","uniqueKey":"error.details.value","typeLabel":"string"},"taskId":{"type":"string","description":"ID of the existing task that holds this idempotencyKey. Poll it with GET /v1/async/task/{taskId}.","example":"b27a21e1-7c39-4aa2-a347-23e828c426f9","uniqueKey":"error.details.taskId","typeLabel":"string"}},"uniqueKey":"error.details","typeLabel":"object"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"RESOURCE\_ALREADY\_EXISTS","message":"Task already exists","details":{"field":"idempotencyKey","value":"your-custom-identifier-123","taskId":"b27a21e1-7c39-4aa2-a347-23e828c426f9"},"timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"d634989a-7fd9-4cc0-90b2-1aae4ff845d3":{"description":"Queue Limit Exceeded - Organization has reached maximum queued tasks","content":{"application/json":{"schema":{"type":"object","required":\["success","error"\],"properties":{"success":{"type":"boolean","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","required":\["code","message","timestamp"\],"properties":{"code":{"type":"string","enum":\["QUEUE\_LIMIT\_EXCEEDED"\],"example":"QUEUE\_LIMIT\_EXCEEDED","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\\u003cstring>"},"message":{"type":"string","example":"Queue limit exceeded. Maximum 100000 queued tasks allowed per organization","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-04-09T15:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\\u003cdate-time>"},"details":{"type":"object","properties":{"limit":{"type":"integer","description":"Maximum number of \`QUEUED\` tasks your organization can hold.","example":100000,"uniqueKey":"error.details.limit","typeLabel":"integer"}},"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"QUEUE\_LIMIT\_EXCEEDED","message":"Queue limit exceeded. Maximum 100000 queued tasks allowed per organization","timestamp":"2026-04-09T15:00:00.000Z","details":{"limit":100000}}}}},"exampleType":"generated"}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer","example":997}},"X-Request-ID":{"description":"Unique ID for this request. Support uses it to find your request.","schema":{"type":"string","format":"uuid","example":"b0864943-5d45-4796-bc64-f052661256f0"}},"X-Latency-Ms":{"description":"Milliseconds the API spent on the request, from arrival to the start of the response. Excludes network transit.","schema":{"type":"integer","example":3420}}},"exampleType":"generated"},"9d63f5d4-0032-47b7-98e7-253c58ce0c87":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","example":"INTERNAL\_SERVER\_ERROR","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For example \`Maximum retries exceeded\` when every attempt failed, or \`Internal server error\` for an unexpected failure.","example":"Maximum retries exceeded","uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"INTERNAL\_SERVER\_ERROR","message":"Maximum retries exceeded","timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"306b3c1a-772a-48c2-9503-f824eaf4dae9":{"bearerAuth":{"type":"http","scheme":"bearer","description":"cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the \[dashboard\](https://dashboard.cloro.dev/api-keys).","scopes":\[\],"schemeName":"bearerAuth"}}},"servers":{"6c961360-d524-4a5c-b9bc-4fd78048e760":{"url":"https://api.cloro.dev","description":"Production server"}},"processedSecurityOptions":\[{"schemes":\[{"scheme":{"type":"http","scheme":"bearer","description":"cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the \[dashboard\](https://dashboard.cloro.dev/api-keys).","scopes":\[\],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the \[dashboard\](https://dashboard.cloro.dev/api-keys).","format":"bearer","typeLabel":"string\\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}\],"title":"bearerAuth"}\]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"cloro","siteName":"cloro","title":"Create async task - cloro","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T16:32:11.932Z","originalFileLocation":"api-reference/endpoint/create-async-task.mdx"},"headHtml":"\\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\\"isDarkMode\\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\\u0026\\u0026p!=='dark'\\u0026\\u0026p!=='system')p=\\"system\\"}var r=p==='system'?(matchMedia(\\"(prefers-color-scheme: dark)\\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\\"data-theme-preference\\",p)})();\\u003c/script>\\u003cmeta data-mint-head name=\\"description\\" content=\\"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.\\">\\u003cmeta data-mint-head name=\\"application-name\\" content=\\"cloro\\">\\u003cmeta data-mint-head name=\\"generator\\" content=\\"Mintlify\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"192x192\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon/android-chrome-192x192.png\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"apple-touch-icon\\" type=\\"image/png\\" sizes=\\"180x180\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon/apple-touch-icon.png\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"16x16\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon/favicon-16x16.png\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"32x32\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon/favicon-32x32.png\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"shortcut icon\\" type=\\"image/x-icon\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon/favicon.ico\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"192x192\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon-dark/android-chrome-192x192.png\\" media=\\"(prefers-color-scheme: dark)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"16x16\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon-dark/favicon-16x16.png\\" media=\\"(prefers-color-scheme: dark)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"32x32\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon-dark/favicon-32x32.png\\" media=\\"(prefers-color-scheme: dark)\\">\\u003clink data-mint-head rel=\\"shortcut icon\\" type=\\"image/x-icon\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon-dark/favicon.ico\\" media=\\"(prefers-color-scheme: dark)\\">\\u003cmeta data-mint-head property=\\"og:title\\" content=\\"Create async task - cloro\\">\\u003cmeta data-mint-head property=\\"og:description\\" content=\\"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.\\">\\u003cmeta data-mint-head property=\\"og:site\_name\\" content=\\"cloro\\">\\u003cmeta data-mint-head property=\\"og:url\\" content=\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task\\">\\u003cmeta data-mint-head property=\\"og:type\\" content=\\"website\\">\\u003cmeta data-mint-head property=\\"og:image\\" content=\\"https://cloro.mintlify.site/docs/\_mintlify/api/og/v2?division=Async+tasks\\u0026amp;title=Create+async+task\\u0026amp;description=Submit+an+asynchronous+task+for+background+processing.+Returns+a+task+ID+that+you+can+use+to+poll+for+results+or+receive+via+webhook.\\u0026amp;theme=3dd67aad49c38e49a018244e\\u0026amp;signature=292c2c1cd517428a62675d16d78c68a4cd05d708fdd657887adcc74b127efc92\\">\\u003cmeta data-mint-head property=\\"og:image:width\\" content=\\"1200\\">\\u003cmeta data-mint-head property=\\"og:image:height\\" content=\\"630\\">\\u003cmeta data-mint-head name=\\"twitter:card\\" content=\\"summary\_large\_image\\">\\u003cmeta data-mint-head name=\\"twitter:title\\" content=\\"Create async task - cloro\\">\\u003cmeta data-mint-head name=\\"twitter:description\\" content=\\"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.\\">\\u003cmeta data-mint-head name=\\"twitter:image\\" content=\\"https://cloro.mintlify.site/docs/\_mintlify/api/og/v2?division=Async+tasks\\u0026amp;title=Create+async+task\\u0026amp;description=Submit+an+asynchronous+task+for+background+processing.+Returns+a+task+ID+that+you+can+use+to+poll+for+results+or+receive+via+webhook.\\u0026amp;theme=3dd67aad49c38e49a018244e\\u0026amp;signature=292c2c1cd517428a62675d16d78c68a4cd05d708fdd657887adcc74b127efc92\\">\\u003cmeta data-mint-head name=\\"twitter:image:width\\" content=\\"1200\\">\\u003cmeta data-mint-head name=\\"twitter:image:height\\" content=\\"630\\">\\u003cmeta data-mint-head name=\\"msapplication-config\\" content=\\"/docs/mintlify-assets/\_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/\_generated/favicon/browserconfig.xml\\">\\u003cmeta data-mint-head name=\\"apple-mobile-web-app-title\\" content=\\"cloro\\">\\u003cmeta data-mint-head name=\\"msapplication-TileColor\\" content=\\"#60A5FA\\">\\u003clink data-mint-head rel=\\"canonical\\" href=\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task\\">\\u003clink data-mint-head rel=\\"alternate\\" type=\\"application/xml\\" href=\\"/docs/sitemap.xml\\">\\u003clink data-mint-head rel=\\"alternate\\" type=\\"text/markdown\\" href=\\"/docs/api-reference/endpoint/create-async-task.md\\">\\u003cscript data-mint-head type=\\"application/ld+json\\">{\\"@context\\":\\"https://schema.org\\",\\"@graph\\":\[{\\"@type\\":\\"Organization\\",\\"@id\\":\\"https://cloro.dev/#organization\\",\\"name\\":\\"cloro\\",\\"url\\":\\"https://cloro.dev\\",\\"logo\\":{\\"@type\\":\\"ImageObject\\",\\"url\\":\\"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/light.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=9649c139f2768786bbd491a86c1a9dd9\\"}},{\\"@type\\":\\"WebSite\\",\\"@id\\":\\"https://cloro.dev/docs#website\\",\\"name\\":\\"cloro\\",\\"url\\":\\"https://cloro.dev/docs\\",\\"publisher\\":{\\"@id\\":\\"https://cloro.dev/#organization\\"}},{\\"@type\\":\\"WebPage\\",\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task#webpage\\",\\"url\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task\\",\\"name\\":\\"Create async task\\",\\"description\\":\\"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.\\",\\"dateModified\\":\\"2026-10-21T16:32:11.932Z\\",\\"isPartOf\\":{\\"@id\\":\\"https://cloro.dev/docs#website\\"},\\"breadcrumb\\":{\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task#breadcrumb\\"}},{\\"@type\\":\\"BreadcrumbList\\",\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task#breadcrumb\\",\\"itemListElement\\":\[{\\"@type\\":\\"ListItem\\",\\"position\\":1,\\"name\\":\\"cloro\\",\\"item\\":\\"https://cloro.dev/docs\\"},{\\"@type\\":\\"ListItem\\",\\"position\\":2,\\"name\\":\\"Create async task\\",\\"item\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task\\"}\]},{\\"@type\\":\[\\"TechArticle\\",\\"APIReference\\"\],\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task#apireference\\",\\"headline\\":\\"Create async task\\",\\"name\\":\\"Create async task\\",\\"description\\":\\"Submit an asynchronous task for background processing. Returns a task ID that you can use to poll for results or receive via webhook.\\",\\"url\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task\\",\\"mainEntityOfPage\\":{\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/create-async-task#webpage\\"},\\"dateModified\\":\\"2026-10-21T16:32:11.932Z\\",\\"publisher\\":{\\"@id\\":\\"https://cloro.dev/#organization\\"},\\"isPartOf\\":{\\"@id\\":\\"https://cloro.dev/docs#website\\"}}\]}\\u003c/script>\\u003cscript data-mint-head type=\\"application/ld+json\\">{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebSite\\",\\"name\\":\\"cloro\\",\\"publisher\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"cloro\\"},\\"provider\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"Mintlify\\",\\"url\\":\\"https://mintlify.com\\"}}\\u003c/script>","agentPointerHref":"/docs/api-reference/endpoint/create-async-task.md","siteName":"cloro","nav":{"global":null,"tabs":\[{"tab":"Documentation","icon":"book-open","pages":\[{"title":"Documentation","href":""}\]},{"tab":"API Reference","icon":"code","groups":\[{"group":"Overview","pages":\[{"title":"API reference","href":"/api-reference/introduction"}\]},{"group":"ChatGPT","pages":\[{"title":"Extract ChatGPT","openapi":"api-reference/openapi.json POST /v1/monitor/chatgpt","href":"/api-reference/endpoint/monitor-chatgpt"},{"title":"ChatGPT sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/chatgpt/sources"},{"title":"ChatGPT shopping cards schema","sidebarTitle":"Shopping cards","tag":"Unavailable","href":"/api-reference/endpoint/chatgpt/shopping-cards"},{"title":"ChatGPT inline products schema","sidebarTitle":"Inline products","href":"/api-reference/endpoint/chatgpt/inline-products"},{"title":"ChatGPT product details schema","sidebarTitle":"Product details","href":"/api-reference/endpoint/chatgpt/product-details"},{"title":"ChatGPT entities schema","sidebarTitle":"Entities","href":"/api-reference/endpoint/chatgpt/entities"},{"title":"ChatGPT map entries schema","sidebarTitle":"Map entries","href":"/api-reference/endpoint/chatgpt/map"},{"title":"ChatGPT citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/chatgpt/citation-pills"},{"title":"ChatGPT follow-up form schema","sidebarTitle":"Follow-up form","href":"/api-reference/endpoint/chatgpt/follow-up-form"},{"title":"ChatGPT sponsored ads schema","sidebarTitle":"Ads","href":"/api-reference/endpoint/chatgpt/ads"}\]},{"group":"Google","pages":\[{"title":"Extract Google Search","openapi":"api-reference/openapi.json POST /v1/monitor/google","href":"/api-reference/endpoint/monitor-google"},{"title":"Resolve a Google redirect link","sidebarTitle":"Redirect links","openapi":"api-reference/openapi.json POST /v1/monitor/google/goto","href":"/api-reference/endpoint/google/resolve-goto"},{"title":"Google organic search results schema","sidebarTitle":"Organic results","href":"/api-reference/endpoint/google/organic-results"},{"title":"Google Search sponsored ads schema","sidebarTitle":"Sponsored ads","href":"/api-reference/endpoint/google/sponsored-ads"},{"title":"Google Search shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/google/shopping-cards"},{"title":"Get a Google shopping card product","sidebarTitle":"Shopping card product","openapi":"api-reference/openapi.json POST /v1/monitor/google/product","href":"/api-reference/endpoint/google/product"},{"title":"Google Search product results schema","sidebarTitle":"Product results","href":"/api-reference/endpoint/google/product-results"},{"title":"Google People Also Ask schema","sidebarTitle":"People Also Ask","href":"/api-reference/endpoint/google/people-also-ask"},{"title":"Google People Are Saying schema","sidebarTitle":"People Are Saying","href":"/api-reference/endpoint/google/people-are-saying"},{"title":"Google Recipes schema","sidebarTitle":"Recipes","href":"/api-reference/endpoint/google/recipes"},{"title":"Google Local Pack schema","sidebarTitle":"Local Pack","href":"/api-reference/endpoint/google/local-pack"},{"title":"Google Sports results schema","sidebarTitle":"Sports results","href":"/api-reference/endpoint/google/sports-results"},{"title":"Google Related websites schema","sidebarTitle":"Related websites","href":"/api-reference/endpoint/google/related-websites"},{"title":"Google Images schema","sidebarTitle":"Images","href":"/api-reference/endpoint/google/inline-images"},{"title":"Google Videos schema","sidebarTitle":"Videos","href":"/api-reference/endpoint/google/videos"},{"title":"Google Short videos schema","sidebarTitle":"Short videos","href":"/api-reference/endpoint/google/short-videos"},{"title":"Google Weather schema","sidebarTitle":"Weather","href":"/api-reference/endpoint/google/weather"},{"title":"Google Latest posts schema","sidebarTitle":"Latest posts","href":"/api-reference/endpoint/google/latest-posts"},{"title":"Google Finance quote schema","sidebarTitle":"Finance quote","href":"/api-reference/endpoint/google/finance-quote"},{"title":"Google Events schema","sidebarTitle":"Events","href":"/api-reference/endpoint/google/events"},{"title":"Google Discussions and forums schema","sidebarTitle":"Discussions and forums","href":"/api-reference/endpoint/google/discussions-and-forums"},{"title":"Google Things to know schema","sidebarTitle":"Things to know","href":"/api-reference/endpoint/google/things-to-know"},{"title":"Google transit results schema","sidebarTitle":"Transit results","href":"/api-reference/endpoint/google/transit-results"},{"title":"Google Flights schema","sidebarTitle":"Flights","href":"/api-reference/endpoint/google/flights"},{"title":"Google hotel results schema","sidebarTitle":"Hotel results","href":"/api-reference/endpoint/google/hotel-results"},{"title":"Google stores schema","sidebarTitle":"Stores","href":"/api-reference/endpoint/google/stores"},{"title":"Google comparison shopping sites schema","sidebarTitle":"Comparison shopping sites","href":"/api-reference/endpoint/google/comparison-shopping-sites"},{"title":"Google top sights schema","sidebarTitle":"Top sights","href":"/api-reference/endpoint/google/top-sights"},{"title":"Google related searches schema","sidebarTitle":"Related searches","href":"/api-reference/endpoint/google/related-searches"},{"group":"AI Overview","root":{"title":"Google AI Overview schema","sidebarTitle":"AI Overview","href":"/api-reference/endpoint/google/ai-overview"},"pages":\[{"title":"Google AI Overview sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/google/ai-overview/sources"},{"title":"Google AI Overview citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/google/ai-overview/citation-pills"},{"title":"Google AI Overview related links schema","sidebarTitle":"Related links","href":"/api-reference/endpoint/google/ai-overview/related-links"},{"title":"Google AI Overview places and map schema","sidebarTitle":"Places and map","href":"/api-reference/endpoint/google/ai-overview/places-and-map"},{"title":"Google AI Overview inline products schema","sidebarTitle":"Inline products","href":"/api-reference/endpoint/google/ai-overview/inline-products"},{"title":"Google AI Overview videos schema","sidebarTitle":"Videos","href":"/api-reference/endpoint/google/ai-overview/videos"},{"title":"Google AI Overview ads schema","sidebarTitle":"Ads","href":"/api-reference/endpoint/google/ai-overview/ads"}\]},{"title":"Google Knowledge Graph schema","sidebarTitle":"Knowledge Graph","href":"/api-reference/endpoint/google/knowledge-graph"}\]},{"group":"Google AI Mode","pages":\[{"title":"Extract Google AI Mode","openapi":"api-reference/openapi.json POST /v1/monitor/aimode","href":"/api-reference/endpoint/monitor-aimode"},{"title":"Google AI Mode sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/aimode/sources"},{"title":"Google AI Mode citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/aimode/citation-pills"},{"title":"Google AI Mode places schema","sidebarTitle":"Places","href":"/api-reference/endpoint/aimode/places"},{"title":"Google AI Mode shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/aimode/shopping-cards"},{"title":"Google AI Mode product results schema","sidebarTitle":"Product results","href":"/api-reference/endpoint/aimode/product-results"},{"title":"Google AI Mode ads schema","sidebarTitle":"Ads","href":"/api-reference/endpoint/aimode/ads"},{"title":"Google AI Mode inline products schema","sidebarTitle":"Inline products","href":"/api-reference/endpoint/aimode/inline-products"},{"title":"Google AI Mode videos schema","sidebarTitle":"Videos","href":"/api-reference/endpoint/aimode/videos"},{"title":"Google AI Mode map schema","sidebarTitle":"Map","href":"/api-reference/endpoint/aimode/map"}\]},{"group":"Bing AI Mode","pages":\[{"title":"Extract Bing AI Mode","openapi":"api-reference/openapi.json POST /v1/monitor/bing/aimode","href":"/api-reference/endpoint/monitor-bing-aimode"},{"title":"Bing AI Mode sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/bing-aimode/sources"},{"title":"Bing AI Mode citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/bing-aimode/citation-pills"}\]},{"group":"Gemini","pages":\[{"title":"Extract Google Gemini","openapi":"api-reference/openapi.json POST /v1/monitor/gemini","href":"/api-reference/endpoint/monitor-gemini"},{"title":"Google Gemini sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/gemini/sources"},{"title":"Google Gemini citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/gemini/citation-pills"},{"title":"Google Gemini places schema","sidebarTitle":"Places","href":"/api-reference/endpoint/gemini/places"},{"title":"Google Gemini shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/gemini/shopping-cards"}\]},{"group":"Google News","pages":\[{"title":"Extract Google News","openapi":"api-reference/openapi.json POST /v1/monitor/google/news","href":"/api-reference/endpoint/monitor-google-news"},{"title":"Google News articles schema","sidebarTitle":"News articles","description":"Schema for structured news articles returned by the Google News endpoint, including titles, links, snippets, sources, publication dates, and thumbnails.","href":"/api-reference/endpoint/google-news/news-articles"}\]},{"group":"Async tasks","pages":\[{"title":"Create async task","openapi":"api-reference/openapi.json POST /v1/async/task","href":"/api-reference/endpoint/create-async-task"},{"title":"Get task status","openapi":"api-reference/openapi.json GET /v1/async/task/{taskId}","description":"Poll the status and result of an asynchronous task by ID. Returns the task state and, once complete, the full structured result payload.","href":"/api-reference/endpoint/get-task-status"},{"title":"Create batch tasks","openapi":"api-reference/openapi.json POST /v1/async/task/batch","href":"/api-reference/endpoint/create-batch-tasks"},{"title":"Get async status","openapi":"api-reference/openapi.json GET /v1/async/status","href":"/api-reference/endpoint/get-async-status"},{"title":"Clear queue","openapi":"api-reference/openapi.json DELETE /v1/async/queue","href":"/api-reference/endpoint/clear-async-queue"}\]},{"group":"Utilities","pages":\[{"title":"List of countries","openapi":"api-reference/openapi.json GET /v1/countries","href":"/api-reference/endpoint/countries"},{"title":"List of states","openapi":"api-reference/openapi.json GET /v1/states","href":"/api-reference/endpoint/states"},{"title":"Get credit balance","openapi":"api-reference/openapi.json GET /v1/credits","href":"/api-reference/endpoint/get-credits"}\]}\]},{"tab":"Changelog","icon":"newspaper","pages":\[{"title":"Changelog","href":"/changelog"}\]}\]},"basePath":"","title":"Create async task - cloro","deploymentId":"dpl\_2MqcLy8smQrrovUehgcZEsoo1tJX","buildId":"dpl\_2MqcLy8smQrrovUehgcZEsoo1tJX","dynamics":\["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"\],"chunks":\["OpenApiReferenceProvider-DyP0AOE1.js","snippetPresets-CuYPAUIG.js","utils-ez5j6NBT.js","style-to-object-BY3JEAdk.js","utils-DG4aeUOF.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DFhcMUrP.js","conditional-requirements-CFM0id0Q.js","cloneDeep-ByDTqllG.js","\_Uint8Array-CJ2WjX\_H.js","isObject-FP1Yky1u.js","ApiExamples-fyn9sMD9.js","usePlaygroundInputsStore-Bf0N\_Y6L.js","shallow-CnU26VTn.js","isEqual-OWIKZzop.js","CodeSnippets-CZ9-M31v.js","CodeSnippet-CCk6UVRR.js","getApiPlaygroundDisplay-BUw5JwZB.js","Page-CInwEL5w.js","DynamicMarkdown-CU5QIokU.js","SectionHeading-BoT1NwPU.js","icon-MsvNhD56.js","MethodPill-CC7p0-fp.js","getPastedJson-BOWYR2ND.js","DuplicateIcon-DOWJyC1b.js","createIcon-BsNyCaLY.js","axios-CsQoIw0U.js","Markdown-L0uigQE0.js","AssistantPageLink-Cur5OU4v.js","dist-CLdzWocy.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"\]}