Skip to main content

Documentation Index

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

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

Send a GET request to /api/operations/:id to check the status of an asynchronous operation. Any The Hog endpoint that returns 202 Accepted — including POST /api/deep-research and long-form POST /api/generate — provides an operationId and a pollUrl in its response. Use this endpoint to retrieve the current status, track progress, and collect the final result when the job completes.

Request

GET https://api.thehog.ai/api/operations/:id
id
string
required
The operation ID returned in the operationId field of a 202 Accepted response.

Response

id
string
required
The operation ID.
status
string
required
Current status of the operation. One of:
ValueMeaning
queuedThe job is waiting to be picked up by a worker.
processingThe job is actively running.
succeededThe job completed successfully. result is populated.
failedThe job encountered an unrecoverable error. error is populated.
partial_successThe job completed with partial results.
cancelledThe job was cancelled before completion.
progress
number
Completion percentage from 0 to 100. May be null for jobs that do not report incremental progress.
result
object
The job output. Present when status is "succeeded". For deep research jobs, this is a structured object conforming to the JSON Schema you provided. For generate jobs, this is the generated content. null while the job is still running.
error
object
Error details. Present when status is "failed". null when the job succeeded or is still running.

Rate limiting

This endpoint has a dedicated per-organization throttle that is separate from the general API rate limit. Exceeding it returns 429 Too Many Requests.
Job typeRecommended polling interval
Generate (long-form)Every 2–5 seconds
Deep researchEvery 10–30 seconds
Start with a longer polling interval and back off further if you receive a 429. Deep research jobs rarely complete in under 15 seconds — polling faster than that wastes credits and risks throttling.

Examples

curl --request GET \
  --url https://api.thehog.ai/api/operations/op_01JDR92X \
  --header 'Authorization: Bearer <token>'