Skip to content

Error Codes

Get3W uses two levels of error reporting:

  • HTTP errors — returned as the HTTP status code with a JSON body when the request itself fails (authentication, validation, rate limits, etc.)
  • Task errors — returned inside the task result object when the task was accepted but failed during execution

HTTP Error Response Format

All HTTP errors from /v1/ endpoints return the same structure:

json
{
  "code": 401,
  "error": "Invalid or revoked API key"
}
FieldTypeDescription
codeintHTTP status code (matches the response status)
errorstringHuman-readable error description

HTTP Status Codes

CodeNameDescription
200OKRequest successful
400Bad RequestInvalid parameters or request body
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient balance
404Not FoundEndpoint or resource not found
429Too Many RequestsConcurrent task limit exceeded for your tier
500Internal Server ErrorUnexpected server-side error

400 — Bad Request

Returned when request validation fails.

ErrorCause
Invalid parametersMissing required fields or wrong types

401 — Unauthorized

Returned when authentication fails.

ErrorCause
Missing Authorization headerNo Authorization header in the request
Invalid Authorization format, expected: Bearer <api_key>Header is not in Bearer <key> format
Invalid or revoked API keyKey does not exist or has been deleted

403 — Forbidden

ErrorCause
Insufficient balanceAccount balance is zero — top up to continue

404 — Not Found

ErrorCause
Not foundThe requested endpoint or resource does not exist

429 — Too Many Requests

ErrorCause
Rate limit exceededToo many concurrent tasks for your account tier

500 — Internal Server Error

ErrorCause
Server errorAn unexpected error occurred on the server

Task Error Codes

When a task is accepted (HTTP 200) but fails during execution, the task result includes a code and error field:

json
{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "model": "google/nano-banana-pro/text-to-image",
  "status": "failed",
  "code": 1200,
  "outputs": null,
  "error": "Content moderation: prompt contains prohibited content",
  "created_at": "2024-01-01T00:00:00.000Z"
}
CodeNameDescription
0SuccessTask completed successfully
1200Content ModerationPrompt or input was flagged by content moderation
1400Missing ParameterA required parameter was not provided
1401Invalid ParameterA parameter value is invalid or out of range
1402Media Access FailedCould not download or access the provided media URL
1403Task Execution FailedThe task encountered an error during processing
1405Task FailedGeneral task failure
5000Internal ErrorAn internal system error occurred
5003Service UnavailableThe upstream model provider is temporarily unavailable
5004TimeoutThe task timed out waiting for a response from the provider

Retry Strategy

For transient errors (HTTP 429, 500 and task codes 5000, 5003, 5004), implement exponential backoff:

python
import time
import requests

def api_request_with_retry(url, headers, json_data, max_retries=3):
    for attempt in range(max_retries):
        response = requests.post(url, headers=headers, json=json_data)

        if response.status_code == 200:
            return response.json()
        elif response.status_code in (429, 500):
            wait_time = 2 ** attempt
            time.sleep(wait_time)
        else:
            response.raise_for_status()

    raise Exception("Max retries exceeded")

For task-level transient errors, retry by submitting a new task.

Next Steps

Released under the MIT License.