Skip to main content
POST
/
images
/
extract
Python SDK
from viscribe import Client

client = Client(api_key="your-api-key-here")

resp = client.extract_image(
    image_url="https://example.com/image.jpg",
    fields=[
        {"name": "product_name", "type": "text", "description": "Name of the product"},
        {"name": "price", "type": "number", "description": "Product price"}
    ]
)

print(resp.extracted_data)
{
  "request_id": "<string>",
  "credits_used": 123,
  "extracted_data": {}
}

Authorizations

VISCRIBE-APIKEY
string
header
required

API key authentication. Include your API key in the VISCRIBE-APIKEY header.

Body

application/json
image_url
string

URL of the image to extract data from. Must be publicly accessible. Either image_url or image_base64 is required.

image_base64
string

Base64 encoded string of the image. Format: data:image/jpeg;base64,... or data:image/png;base64,.... Either image_url or image_base64 is required.

fields
object[]

Simple list of fields to extract (max 10). Either fields or advanced_schema is required, but not both.

advanced_schema
object

Advanced: Full JSON schema for complex extraction. Use this for nested structures. Either fields or advanced_schema is required, but not both.

instruction
string

Optional instruction to guide the extraction process.

Response

Successful response

request_id
string
required

Unique identifier for this request.

credits_used
integer
required

The number of credits used (always 1 for extract).

extracted_data
object
required

JSON object conforming to the requested schema with extracted values.