Every response from The Hog API wraps its payload in a consistent envelope so you can parse results, track costs, and correlate requests in a uniform way — regardless of which endpoint you call. This page describes each envelope shape, the fields you can expect, and how to read cost and request metadata.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.
The X-Request-Id header
Every authenticated response includes an X-Request-Id HTTP header containing a UUID that uniquely identifies the request. This value is also mirrored inside the response body as meta.requestId. Save it when you contact support — it lets the team locate the exact request in logs instantly.
Sync response (HTTP 200)
Fast operations — company search, people search, context assembly, signals — complete within the request lifecycle and return HTTP 200. Thedata field holds the endpoint-specific payload.
meta.projectId is only present when you included the X-Project-Id request header. Omit the header and the field is absent from the response.Cost fields
| Field | Type | Description |
|---|---|---|
meta.cost.estimated | integer | Credits estimated before the operation ran |
meta.cost.actual | integer | Credits actually deducted from your balance |
actual amount.
Async accepted response (HTTP 202)
Long-running operations — enrichment withasyncPreferred: true, content generation for complex prompts, and deep research — are accepted immediately and processed in the background. The response contains everything you need to poll for the result.
| Field | Type | Description |
|---|---|---|
operationId | string | Unique ID for the background job |
status | string | Always "queued" on acceptance |
pollUrl | string | Fully-qualified URL to poll for status and result |
meta.requestId | string | Correlates to the X-Request-Id header |
meta.estimatedCost | integer | Estimated credits the job will consume |
pollUrl directly in subsequent GET requests. See Operation status response below for the shape returned while polling.
Estimate response
Before running an enrichment, generation, or research job, call the corresponding/estimate endpoint to get a cost and latency preview without consuming any credits.
| Field | Type | Description |
|---|---|---|
data.estimatedCredits | integer | Predicted credit cost for the actual request |
data.likelySyncOrAsync | string | Whether the real call will return 200 or 202 |
data.expectedLatencyRange | string | Human-readable latency estimate (may be absent) |
data.withinPlanLimits | boolean | false means the job would be blocked by your plan |
Operation status response (GET /api/operations/:id)
Poll this endpoint after receiving a 202 to check progress and retrieve the result when the job finishes.
Operation statuses
queued
The job has been accepted and is waiting for a worker to pick it up.
processing
A worker is actively running the job. Check
progress (0–100) for completion percentage.succeeded
The job finished successfully. Read the result from the
result field.failed
The job encountered an unrecoverable error. Details are in the
error field.partial_success
The job completed but some sub-tasks did not succeed.
result contains whatever was produced.cancelled
The job was cancelled before it completed.
| Field | Type | Description |
|---|---|---|
id | string | Operation ID matching the operationId from the 202 response |
status | string | Current status (see table above) |
progress | integer | null | Completion percentage (0–100), or null if not yet tracked |
result | object | null | Result payload when status is "succeeded" or "partial_success" |
error | object | null | Error detail when status is "failed" |