Task Status
tasks.get(job_id)
Get current task status:tasks.wait_for_completion(job_id, timeout=300, poll_interval=3, on_progress=None)
Wait for task completion:job_id(str): Job ID to wait fortimeout(float, optional): Max wait time in seconds (default: 300)poll_interval(float, optional): Seconds between checks (default: 3)on_progress(callable, optional): Callback on each check
Async/Await
All methods support async usingAsyncClient:
Error Handling
Handle different error types:| Exception | HTTP | Description |
|---|---|---|
ValidationError | 400 | Invalid request parameters |
AuthenticationError | 401 | Invalid API key |
NotFoundError | 404 | Resource not found |
RateLimitError | 429 | Rate limit exceeded |
ServerError | 5xx | Server error |
LegnextAPIError | - | Base exception |