Claude LLM Responses: Task Post
Beta/v1/ai/claude/llm_responses/task_postClaude LLM Responses: modes
Beta. The parser for this endpoint was written from the upstream format and has not yet been checked against a live response. Field shapes may change; tell us if you see a mismatch.
On this page
Price
- Standard queue
- $0.00018
- Priority queue
- $0.00054
Base fee per answer by queue, plus the model's token and search cost at list price.
Description
Post up to 100 tasks; each comes back with 20100 and a task id. Answers appear in tasks_ready when done. priority: 2 uses the priority queue at the priority base fee.
Billing. Each answer costs our base fee for the mode plus the model's token and search cost at the model's published list price, reported as money_spent. A failed, empty or refused answer costs $0. Before the call, the wallet check reserves the base fee plus a conservative token estimate (or your max_cost).
Token prices for Claude models:
| Model | Input per 1M tokens | Output per 1M tokens | Web search per 1,000 | Reasoning |
|---|---|---|---|---|
claude-opus-5-5 | $4.0 | $20.0 | $10.0 | yes |
claude-sonnet-5-5 | $2.0 | $10.0 | $10.0 | yes |
claude-haiku-5-5 | $0.1 | $0.5 | $10.0 | yes |
claude-opus-5 | $5.0 | $25.0 | $10.0 | yes |
claude-sonnet-5 | $2.0 | $10.0 | $10.0 | yes |
claude-opus-4-8 | $5.0 | $25.0 | $10.0 | no |
claude-sonnet-4-6 | $3.0 | $15.0 | $10.0 | no |
claude-haiku-4-5 | $1.0 | $5.0 | $10.0 | no |
Answers aren't cached: each call is a new sample. Prompts and answers are added to the AI-answer dataset unless your organization has opted out.
Beta. Queued tasks go through the model vendor's batch interface, which we wrote from its documentation and haven't checked against live batch responses yet. When a batch can't be submitted, the task runs on the standard interface instead; the result shape is the same either way.
Request
- Endpoint
- POST https://api.dataforgaio.com/v1/ai/claude/llm_responses/task_post
- Authentication
- HTTP Basic auth: any login, with your
dg_API key as the password. ABearerheader with the key also works. Create a key. - Body
- JSON array of task objects, up to 100 tasks per requestMode: Task Post
Fields (per task)
- The prompt, up to 500 characters.Max
500ExampleWhich running shoe brands are best for wide feet? - A model id from
/v1/ai/claude/llm_responses/models. Dated ids such asgpt-4.1-2025-04-14resolve to their base model. Leave it out to use the default model.Defaultclaude-sonnet-5-5One ofclaude-opus-5-5claude-sonnet-5-5claude-haiku-5-5claude-opus-5claude-sonnet-5claude-opus-4-8claude-sonnet-4-6claude-haiku-4-5Exampleclaude-sonnet-4-6 - Instructions sent before the prompt, up to 500 characters.Max
500ExampleAnswer in two sentences. - Earlier turns of the conversation, up to 10. They alternate
userandai, start withuserand end withai; each message is up to 500 characters.Max10 - Most tokens the answer may use, up to 4,096.Default
2048Min1Max4096Example1024 - Sampling temperature, 0.0 to 1.0. Send this or
top_p, not both. Ignored by reasoning models.Min0Max1Example0.4 - Nucleus sampling, 0 to 1. Send this or
temperature, not both.Min0Max1Example0.9 - Let the model search the web before answering. Search fees are added to
money_spent.DefaultfalseExampletrue - Require a web search before answering. Needs
web_search: true.DefaultfalseExamplefalse - Two-letter country the web search should favor.Min
2Max2ExampleUS - City the web search should favor, up to 100 characters.Max
100ExampleDenver - The most this task may be charged, in USD. The wallet check reserves this amount instead of our token estimate, and the charge is capped at it. Before the model is called,
max_output_tokensis lowered (and web search turned off, unless forced or always on) so the most the answer can cost fits; when even the prompt can't fit, the task returns 40501 at $0.Min0Example0.01 - Queue for this task:
1is the standard queue,2the priority queue (faster, priced higher).Default1One of12Example1 - Your own label for the task, up to 255 characters. Returned by tasks_ready.Max
255Exampleweekly-rank-check - We send a GET to this http(s) URL when the task finishes.
$idand$tagin the URL are replaced with the task id and tag. Only public hosts are called and redirects aren't followed.Max2000Examplehttps://hooks.example.com/done?id=$id&tag=$tag - We POST the finished task, in the task_get envelope, to this http(s) URL. Only public hosts are called and redirects aren't followed.Max
2000Examplehttps://hooks.example.com/results - Result format sent to
postback_url. Defaults toadvancedwhenpostback_urlis set.One ofregularadvancedhtmlExampleadvanced
Response
Shape: v3 task envelope. Expand a field to see its children; every field has a link anchor.
- versionstringResponse format version, for example
0.1.20261203.Example0.1.20261203 - status_codeintegerStatus of the request as a whole. 20000 when it was accepted; each task has its own
status_code.Example20000 - status_messagestringPlain-language request status.Example
Ok. - timestringTime the whole request took, for example
1.8410 sec.Example0.4210 sec. - costnumberSum of every task's
cost, in USD.Example0 - tasks_countintegerNumber of tasks in
tasks.Example1 - tasks_errorintegerTasks whose
status_codeis 40000 or higher.Example0 - tasksarray<object>One entry per task you sent, in the order you sent them.
Show 14 child fieldsHide child fields
- idstringTask id (a UUID). For task_post, use it with task_get.Example
8cbb5b5c-8e15-5c82-9959-45f93cdad009 - status_codeintegerOutcome of this task. 20000 means data came back; 20100 means queued. See the status codes table.Example
20100 - status_messagestringPlain-language status. For 40501 it names the field that failed.Example
Task Created. - timestringTime this task took on our side, for example
1.8203 sec.Example0.4210 sec. - costnumberWhat this task was charged, in USD. 0 when it returned no data.Example
0 - result_countintegerNumber of entries in
result.Example0 - patharray<string>The route this task ran on, split into segments, starting with
v1.Example["v1","ai","claude"] - dataobjectThe task you sent, echoed back. Utility routes echo their query parameters.Example
{"user_prompt":"Which running shoe brands are best for wide feet?","model_name":"claude-sonnet-4-6","web_search":true,"web_search_country_iso_code":"US","tag":"wide-feet-weekly"} - resultnullAlways null for task_post.
- receipt_idstring|nullId of the ledger receipt for this task: what was fetched, at which level, and what was charged. Null for utility routes and failed checks.
- fetch_levelstring|nullThe fetch level that delivered the data:
standard,renderedorprotected. Null when the route doesn't fetch pages or nothing was fetched.One ofstandardrenderedprotected - upgradedbooleanTrue when Auto-upgrade moved the request past the included level (or, for SERP, to the live path) and the charge reflects that.Example
false - upgrade_reasonstring|nullWhy the request upgraded, in our level names and HTTP facts, for example
403 at standard; challenge page at rendered. Null when it didn't upgrade. - cache_hitbooleanTrue when the data came from the shared result cache instead of a new fetch.Example
false
Errors
| Code | When |
|---|---|
| 40100 | No credentials were sent (HTTP 401). |
| 40101 | The API key is missing, malformed or revoked (HTTP 401). |
| 40202 | Too many requests for this key (HTTP 429, with Retry-After). |
| 40503 | The body isn't a JSON array of task objects, or the method isn't POST (HTTP 400 or 405). |
| 40006 | More than 100 tasks in one POST (HTTP 400). |
| 40210 | Wallet balance below the worst case this POST could cost (HTTP 402). |
| 40501 | A task field failed validation. Returned per task; other tasks still run. |
Migrating
Replaces DataForSEO /v3/ai_optimization/claude/llm_responses/task_post. The request body and response envelope match: change the base URL to https://api.dataforgaio.com/v1 and use your dg_ key as the password.
Related endpoints
- POSTClaude LLM Responses: LiveOne answer from a Claude model for your prompt, with the sources it cited, the searches it ran and the tokens it used.
- GETClaude LLM Responses: Tasks ReadyList finished answers you haven't collected yet.
- GETClaude LLM Responses: Tasks FixedSame list as tasks_ready, kept for clients that call tasks_fixed.
- GETClaude LLM Responses: Task GetRead one queued answer.
- GETClaude LLM Responses: ModelsThe Claude model ids you can send as `model_name`.