Plan goedkeuren en vertalen
Spends credits: the plan's measured word count at the chosen quality (standard: 1 word = 1 credit; lite: a third, rounded up) is reserved now and is the exact final cost, returned as credit_cost, unless a cancellation charges less. Pass expected_plan_revision (the batch's plan_revision) to approve exactly the plan that was reviewed: the call is refused with plan_changed if the plan was rebuilt since. It is optional here for existing scripts and required inside MCP and Code Mode, where a model decides. Returns the initial progress with estimated_seconds_remaining; poll the translation with GET from here.
POST/v1/batches/{batch_id}/approve
Vereist batches:create. Met deze aanroep worden credits besteed. Alles daarvoor (aanmaken, plannen, verfijnen) is gratis.
Wat het kost
Het gemeten aantal woorden in het plan wordt gereserveerd tegen de gekozen kwaliteit. De respons vermeldt het bedrag als credit_cost. Dat blijft de uiteindelijke kostprijs, tenzij annuleren minder kost.
| Kwaliteit | Kosten | Beschikbaarheid |
|---|---|---|
standard | 1 credit per woord | Elk plan |
lite | Een derde van het aantal woorden, naar boven afgerond | Betaalde abonnementen |
Omdat het aantal woorden op basis van het bestand wordt gemeten en niet wordt geschat, komt de reservering overeen met het aantal dat je in de planrespons zag. Als je saldo niet toereikend is, mislukt de aanroep met insufficient_credits en wordt er niets gereserveerd.
Daarna de voortgang controleren
De respons bevat de initiële voortgang, inclusief estimated_seconds_remaining. Controleer vanaf dat moment de voortgang met GET /v1/batches/{batch_id} in plaats van opnieuw approve aan te roepen. Een tweede goedkeuring voor een vertaling die al loopt, kost niets en retourneert de actuele voortgang. Je kunt dus veilig opnieuw proberen als een respons verloren is gegaan. Bij elke andere status mislukt de aanroep met batch_not_awaiting_approval.
custom_instructions past alleen richtlijnen toe op deze batch, naast een eventuele woordenlijst voor de werkruimte. Het verandert het plan niet en heeft dus alleen invloed op hoe er wordt vertaald, niet op wat er wordt vertaald.
Autorisaties
Authorizationbearerin headerrequiredPadparameters
batch_idstringrequiredBody
application/jsonrequiredqualityenum<string>one of: standard, litecustom_instructionsstringlength: ≤ 2000 charsexpected_plan_revisionstringpattern: ^[a-f0-9]{64}$The plan_revision returned with the reviewed plan. Rejects approval with plan_changed if that plan has changed since. Optional on REST; required in MCP and Code Mode, where a model decides to spend.
Antwoord
Approve the plan and start translating
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, idempotency_key_reused, no_plan_yet, plan_changed, 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