Quick Start
This guide walks you through creating an account, getting an API key, and submitting your first task.
1. Create an account
Section titled “1. Create an account”Sign up at asyncqueue.io/signup with your email. You will receive a magic link to verify your account. No password required.
2. Get your API key
Section titled “2. Get your API key”After signing in, go to the API Keys page in your dashboard. Click Create Key and copy the key. You will only see the full key once.
3. Submit your first task
Section titled “3. Submit your first task”Create a task that calls a public endpoint. Replace your-api-key with the key from step 2:
curl -X POST https://api.asyncqueue.io/v1/tasks \ -H "Authorization: Bearer your-api-key" \ -H "Content-Type: application/json" \ -d '{ "targetUrl": "https://httpbin.org/post", "method": "POST", "body": "{\"hello\": \"world\"}" }'You will receive a response with your task ID and status:
{ "task": { "id": "550e8400-e29b-41d4-a716-446655440000", "status": "pending", "targetUrl": "https://httpbin.org/post", "method": "POST", "maxRetries": 3, "retryCount": 0, "retryBackoff": "exponential", "createdAt": "2024-01-15T10:30:00.000Z" }}4. Check the result
Section titled “4. Check the result”Poll the task status using the task ID:
curl https://api.asyncqueue.io/v1/tasks/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer your-api-key"Once processed, the response includes the callback result:
{ "task": { "id": "550e8400-e29b-41d4-a716-446655440000", "status": "completed", "result": { "statusCode": 200, "body": "{\"success\": true}", "duration": 432 }, "createdAt": "2024-01-15T10:30:00.000Z", "completedAt": "2024-01-15T10:30:01.432Z" }}5. Schedule a delayed task
Section titled “5. Schedule a delayed task”Execute a task in the future using the delayUntil parameter:
curl -X POST https://api.asyncqueue.io/v1/tasks \ -H "Authorization: Bearer your-api-key" \ -H "Content-Type: application/json" \ -d '{ "targetUrl": "https://api.example.com/send-reminder", "delayUntil": "2024-01-16T09:00:00.000Z" }'The task will have status delayed until the scheduled time, then move to pending for execution.
6. Poll an AI provider
Section titled “6. Poll an AI provider”Use a provider template to submit a task to an AI API and let AsyncQueue poll for results automatically:
curl -X POST https://api.asyncqueue.io/v1/tasks \ -H "Authorization: Bearer your-api-key" \ -H "Content-Type: application/json" \ -d '{ "targetUrl": "https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3/predictions", "method": "POST", "headers": { "Authorization": "Bearer your-replicate-token" }, "body": "{\"input\": {\"prompt\": \"An astronaut riding a horse\"}}", "provider": "replicate", "onCompleteUrl": "https://your-app.com/api/image-ready" }'The task will start in pending status, transition to polling while AsyncQueue checks Replicate’s API for results, and complete when the image is generated. The result is delivered to your onCompleteUrl webhook.
Next steps
Section titled “Next steps”- Tasks API Reference - Full endpoint documentation with all parameters
- Retries and Backoff - Configure retry behavior for reliable delivery
- Completion Webhooks - Get notified when tasks finish
- AI Provider Polling - Integrate with popular AI APIs