Skip to content
Documentation/Documents

Extract a visual rendition

Read the visual layout of an owned JPEG or PNG image source as a model-generated rendition.

Markdown
POST/api/v1/extract/visual-renditionhttps://api.webcite.co

When to use it

Send visual_rendition: true with an owned asset_id, the exact immutable source_version_id of that JPEG or PNG source, and an Idempotency-Key header. Retrying with the same key and payload replays the stored outcome. The rendition is model-generated: keep visual_provenance with it and treat it as a partial reading of the image. Use Extract document text for ordinary extraction.

Request

1 credit for a billable extraction outcome, the same as text extraction.

Examples run on your server. Set WEBCITE_API_KEY first. Python examples use the requests package.

curl
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/extract/visual-rendition' \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "asset_id": "YOUR_ASSET_ID",
  "source_version_id": "YOUR_SOURCE_VERSION_ID",
  "visual_rendition": true
}'

Request body

asset_idstring

An uploaded asset id (from POST /upload). One of asset_id / asset_url is required.

asset_urlstring

A direct URL to the file. One of asset_id / asset_url is required.

source_version_idstring

Exact immutable owned source version for visual_rendition.

visual_renditionboolean

Explicit JPEG/PNG visual layout rendition. Requires owned asset_id, exact source_version_id and Idempotency-Key. Source remains partial; does not select the rendition.

Response

Returns markdown with extraction_method ocr, state partial and complete: false, plus source_version_id, representation_id, source_units and visual_provenance (origin model_generated). The source remains partial; this call does not select the rendition as the source's reading. The public OpenAPI does not yet define a response schema for this operation.

201 response

See the response guidance above. A complete JSON schema is not published for this response.

Errors

400 when visual_rendition: true, a valid Idempotency-Key, or an owned asset_id matching the exact JPEG/PNG source_version_id is missing; asset_url is not accepted. For 401, check your API key. For 429, wait for the retry interval; this operation uses the stricter plan rate limit. See the errors guide before retrying a billable request.

Error handling and retry guidance