Create async task
Utilities
Create async task
Submit an asynchronous task for background processing. Returns a task ID for polling or webhook-based result retrieval.
POST
Create async task
Documentation Index
Fetch the complete documentation index at: https://docs.cloro.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use this endpoint to submit a task for asynchronous processing. You’ll receive ataskId in the response that you can use to:
- Poll for results via
GET /v1/async/task/{taskId} - Receive results via webhook if you provide a
webhook.urlin the request
QUEUED. The scheduler processes tasks by priority first (higher numbers first), then in FIFO order within the same priority level.
Priority
You can optionally set apriority from 1 (lowest, default) to 10 (highest). Tasks with higher priority are processed before lower-priority ones. If you don’t specify a priority, it defaults to 1.
Monitor your queue’s priority distribution using the async status endpoint.
Idempotency
You can optionally include anidempotencyKey to prevent duplicate task creation. If you submit a request with an idempotency key that has already been used, the API returns a 409 Conflict error.
Example usage
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The AI provider to use for this task.
Available options:
AIMODE, GOOGLE, GOOGLE_NEWS, GEMINI, CHATGPT, COPILOT, PERPLEXITY, GROK Example:
"CHATGPT"
Provider-specific request payload. Must include at least prompt (or query for Google Search).
Example:
{
"prompt": "What do you know about Acme Corp?",
"country": "US"
}Task priority level (1-10). Higher numbers are processed first. Defaults to 1.
Required range:
1 <= x <= 10Example:
5
Unique string to prevent duplicate task creation. Must be unique across your account.
Example:
"batch-chatgpt-001"
Webhook configuration for task completion notification.