Prepare or refine the plan
Natural-language back and forth. Send instruction to (re)plan from scratch, or refinement to adjust the current plan ("actually, only the empty rows"). The response embeds the rebuilt plan with measured counts and a 10-item preview of real extractions. Nothing is charged until approval; check plan.not_included — a non-empty list means part of the instruction will NOT happen.
POST/v1/batches/{batch_id}/plan
Requires batches:create. Planning is free and repeatable: nothing is charged until you approve.
Instruction or refinement
Send one or the other, not both.
| Field | Meaning |
|---|---|
instruction | Plan from scratch. Replaces any previous plan entirely. |
refinement | Adjust the plan that already exists: “actually, only the empty rows”, “leave the URLs alone”. |
The distinction matters when a plan is nearly right: refinement keeps everything you already agreed to, while instruction starts over and may reinterpret parts you were happy with.
Read the plan before approving
The response embeds the rebuilt plan with measured counts (the actual number of items and words found in your file, not an estimate from its size), plus a preview of ten real extractions.
Those ten are the cheapest check available. They show the exact strings that will be sent for translation, so an instruction that quietly matched the wrong field is visible before it costs anything.
Response
Prepare or refine the translation plan
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, file_retention_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: batch_not_found, glossary_not_found, resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: glossary_already_exists, result_not_ready, batch_not_editable, no_plan_yet, batch_not_awaiting_approval
errorobjectrequiredrequest_idstringrequiredPossible codes: file_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large, file_too_large, result_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: language_not_supported, invalid_language_pair, glossary_term_limit_reached, glossary_limit_reached, invalid_glossary_terms, unsupported_format, file_fetch_failed, plan_invalid
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired