Synchronous requests
Synchronous endpoints return the full result in the same HTTP response. Best for time-sensitive requests that need an immediate answer and fit comfortably inside your client’s request timeout. See Synchronous requests for the request and response structure, common parameters, optional response formats, and code examples.Asynchronous requests
Asynchronous endpoints accept a task, return ataskId immediately, and process the work in the background. You retrieve the result via webhook (recommended) or by polling. Best for serverless environments with short execution windows, large batches, and resilient long-running workloads.
See Asynchronous requests for the two-step submit-and-fetch flow, task states, queue limits, and request prioritization.
When to use which
| Use case | Choose |
|---|---|
| Time-sensitive request that needs an immediate answer | Synchronous |
| Serverless environment with short execution time limits | Asynchronous |
| Submitting large batches (up to 500 tasks per request) | Asynchronous |
| Building a resilient system that shouldn’t rely on a long-running connection | Asynchronous |
| Small batches needing immediate results | Synchronous with concurrent workers |
Common questions
Why are my requests slower than expected?
Request latency depends on several factors:- Provider response time (primary factor): the upstream provider’s processing time varies based on their load (peak usage times) and geographic region
- Queue depth (async requests only): your queue depth depends on your plan’s concurrency limit (higher concurrency = faster processing) and your current queue size
- Geographic routing: requests route through region-specific infrastructure, which may differ in latency depending on the
countryparameter you specify.
- Use sync endpoints for time-sensitive requests that need immediate results
- Use async endpoints for batch processing where you don’t need instant responses
- Upgrade your plan for higher concurrency (processes async tasks faster)
Can I get faster processing for high-volume workloads?
Yes, the larger the plan, the greater the concurrency assigned to it. How concurrency affects speed:- Async requests: Higher concurrency means more tasks processed at once, reducing queue wait times
- Sync requests: You can send more simultaneous requests without hitting limits
What’s the best way to handle large batches of requests?
For large batches, use the batch endpoint to submit up to 500 tasks per request, combined with webhooks or polling to retrieve results: Why batch for large workloads:- Submit up to 500 tasks in a single HTTP request, reducing overhead
- Each task is validated independently. One failure doesn’t block the rest
- No need to manage concurrency limits yourself. cloro handles queuing automatically
- Can queue up to 100,000 tasks total