Drex

Find answer boxes in a page image

Authenticate with a Bearer API key or an inference-scoped OAuth token. The account must fund the maximum encoded-input cost before dispatch. Successful validated output settles measured input tokens at the current Max list rate; output tokens are not billed. Failed or cancelled work is free. API and console calls share strict per-account and global per-model ceilings. See Locate and Box for current limits and pricing. Availability depends on deployment configuration; an unavailable endpoint returns 503 without dispatch. Zero-retention accounts receive 403 with code zero_retention_unavailable before input is read or dispatched.

POST
/v1/box

Authenticate with a Bearer API key or an inference-scoped OAuth token. The account must fund the maximum encoded-input cost before dispatch. Successful validated output settles measured input tokens at the current Max list rate; output tokens are not billed. Failed or cancelled work is free. API and console calls share strict per-account and global per-model ceilings. See Locate and Box for current limits and pricing. Availability depends on deployment configuration; an unavailable endpoint returns 503 without dispatch. Zero-retention accounts receive 403 with code zero_retention_unavailable before input is read or dispatched.

Authorization

bearerAuth
AuthorizationBearer <token>

Your API key, sent as Authorization: Bearer nace_sk_...

  • Where: the dashboard's API Keys page. It is shown once, when you create it.
  • Format: nace_sk_ followed by 43 URL-safe characters (A-Z, a-z, 0-9, _ and -).
  • Limit: an account can hold at most 3 active keys.
  • Wrong or missing key: returns 401 authentication_error.

In: header

Request Body

application/json

imagestringrequired

One inline PNG, JPEG or WebP data URL. URLs, uploaded-file references and PDFs are not accepted.

Match^data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$
Lengthlength <= 4000000
instructionsstringrequired

Trimmed before validation; must not be blank.

Length1 <= length <= 4000

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/box" \  -H "Content-Type: application/json" \  -d '{    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAAAAACPAi4CAAAAMElEQVR4nO3MQREAIAwDsPo3DRJ2O34lEZCcRxEIBLVBBgKBQCAQCP4LtgQCQU1wAUFc9Kb0ls1lAAAAAElFTkSuQmCC",    "instructions": "Find the black square."  }'
{  "model": "drex-max-box",  "answers": {    "q": {      "type": "box",      "boxes": [        {          "bbox": [            0,            0,            0,            0          ],          "score": 0        }      ]    }  },  "usage": {    "input_tokens": 1,    "output_tokens": 0  },  "evaluation_time_ms": 0,  "request_id": "string"}