Structured OCR (fields)

post/ocr/fields

Request

  • Base URL: https://api.space-ocr.com
  • URL: https://api.space-ocr.com/ocr/fields
  • Auth: HTTP bearer

Request body

imagestring required

base64 or URL of the image. The JSON body caps at 28MB; base64 inflates a file by ≈1.33×, so that is roughly a 20MB original image. Over the cap returns 413 with details.limitBytes / details.receivedBytes.

imageType'base64' | 'url'

Type of image — "base64" or "url". Required (also accepted via the deprecated alias image_type).

image_type'base64' | 'url'

Deprecated alias of imageType.

promptstring
autoFieldsboolean

When true, the LLM proposes a schema if fields is not provided.

auto_fieldsboolean

Deprecated alias of autoFields.

Example request

{
  "imageType": "url",
  "image_type": "url"
}

Response

OK

statusstring required

Always "success" here — errors come back as HTTP 4xx/5xx with the common error envelope instead.

messagestring

Example response

{
  "status": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.