Read a video generation API error before retrying the write. A missing credential, exhausted allowance, conflicting request and unfinished render require different actions. Sending the same command faster will not repair all four.
Keep the HTTP status, structured error code, message, request ID and relevant response headers. If a job identifier already exists, keep it too. That evidence lets you diagnose the failed boundary without accidentally creating another video or public post.
This guide uses Prolifik's REST API as the concrete implementation. The incident and responses below are mock examples, not errors observed in a customer's account.
Read the service's error, not just the number
HTTP defines general status meanings. The service adds the actionable detail. In particular, HTTP 402 is reserved in the standard; Prolifik uses it for application-specific plan, allowance and credit refusals. It is not an instruction for an agent to buy something automatically.
| Response | Prolifik check to make | Do not assume |
|---|---|---|
401 unauthorized |
Validity, expiry and delivery of the credential | The request needs more retries |
403 insufficient_scope |
Required scopes named by the response | Every permission must be enabled |
| 402 | Exact code and plan or usage condition | Every case is an empty credit balance |
404 not_found |
Identifier, resource family and ownership context | The resource was definitely deleted |
409 conflict |
Message, request identity and current resource state | Every conflict is the same idempotency problem |
429 rate_limit_exceeded |
Retry-After and request volume |
A new key or tighter loop is a repair |
For REST, inspect the actual HTTP response. An MCP client can wrap a service refusal as a tool error instead; do not infer the underlying HTTP status merely because the conversation displayed an error message.
A concrete incident: the draft exists, but readback fails
An illustrative agency integration creates one approved Text Story for a fictional scheduling app. The create response returns a job ID. The follow-up GET receives:
{
"error": {
"code": "insufficient_scope",
"message": "This API key requires the content:read scope.",
"requestId": "11111111-1111-4111-8111-111111111111"
}
}
This mock response points to read access. It does not say the creation failed. Prolifik's write scopes do not include read scopes, so a key can be able to submit a content job without being able to retrieve it.
The owner should review the intended access and provide the narrowly required read permission. Then retrieve the same job with the appropriate authorized credential. Do not create another batch, enable publication scope or copy the secret into the incident report.
A useful readback record is:
existing job: the identifier from the accepted create response
read operation: GET /api/v1/content/jobs/{jobId}
expected evidence: that job plus its individual pieces
next decision: inspect ready media or preserve the reported failures
Use the real returned identifier, not the placeholder above. The video-agent state guide explains why that identity must survive the conversation.
Treat 401 and 403 as different boundaries
For a 401, verify that the correct credential reached the correct service. Prolifik REST uses an API key; OAuth sign-in belongs to the MCP connection. A local environment variable name is not proof that its value was sent.
Check expiry or revocation through the supported account process. Never print a token to prove it exists. If authentication remains unresolved, stop the write and report the request ID and sanitized error.
For a scope refusal, read the named requirement. Some operations need more than one scope. Add only what the authorized task actually requires, or hand the task to an appropriately authorized integration. A denied publishing request is not permission to broaden a creation-only key.
Inspect the code inside a 402
Prolifik distinguishes subscription_required and insufficient_credits. Supported MCP trial workflows also have conditions such as trial_limit or trial_ended; REST API keys require a paid plan. Other allowance refusals may use the general quota code. Inspect the message and structured details rather than routing every 402 into the same purchase suggestion.
A missing entitlement needs an owner decision. Insufficient Studio credits may require reducing or holding an authorized request. A render-budget refusal is not repaired by changing the product recording's file extension.
Retrieve current usage where permitted and preserve the actual requested work. Do not silently upgrade, top up or replace the chosen workflow with another paid operation.
Split 409 into its actual cases
An idempotency conflict can mean the same key was reused with changed request data, or that the original attempt is still processing. A different 409 can mean a content source is not ready or a piece has not finished rendering.
For changed data, compare the original request before deciding whether new work is intended. For an in-progress attempt, respect the response's waiting guidance and retain its identity. For a not-ready piece, read that existing resource rather than submit another create request.
The MCP batch guide covers piece-level reconciliation. A batch with one failed piece should not become a second batch merely because the first status was inconvenient.
Wait on 429, and keep ownership private on 404
Prolifik's REST rate-limit responses include Retry-After. Wait at least the indicated interval and reduce unnecessary polling. Use a bounded observation policy; if the deadline arrives, retain the existing handle and report the last known state.
A 404 can mean the identifier is wrong or the resource is not available within the authenticated ownership context. It does not justify probing other accounts or bypassing access controls. Reconcile the identifier with the original response and the selected account.
Finish the incident with the failed boundary, evidence retained and next authorized action. Use Prolifik's API reference for the exact endpoint contract. Recovery is complete when the original work is accounted for, not when a fresh request happens to succeed.
Diagnose against the actual API contract
Keep the request and job evidence, then use the matching endpoint and error details before authorizing another write.
Read the API referenceFacts checked 2026-10-24. Worked examples are illustrative unless a real source is identified.
- Prolifik REST API reference Checked 2026-10-24
- RFC 9110: HTTP semantics Checked 2026-10-24
- RFC 6585: additional HTTP statuses Checked 2026-10-24
