POST
/
extractions
curl --request POST \
  --url https://api.withflora.io/v1/extractions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form schema_id=ec9cb821-6f69-4605-a7fc-0858667eb534 \
  --form type=image \
  --form model=gpt-4.1 \
  --form source=https://8ddf98.jpg
{
  "data": {
    "id": "c39c0c98-d71c-471c-a7e0-6e3fcf2f8298",
    "output": {
      "amount": 38580,
      "currency": "NGN",
      "products": [
        {
          "amount": 1600,
          "name": "Chicken Pie",
          "quantity": 2
        },
        {
          "amount": 3750,
          "name": "Ayoola Poundo Yam",
          "quantity": 1
        },
        {
          "amount": 5000,
          "name": "Seedless Grape",
          "quantity": 1
        }
      ],
      "storeName": "XYZ Superstores"
    },
    "totalTokens": 1795
  },
  "message": "Extraction completed successfully",
  "status": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
schema_id
string

The schema ID. Create a schema first using the POST /schemas endpoint.

Example:

"ec9cb821-6f69-4605-a7fc-0858667eb534"

type
string

The input type can be any of text, image, pdf, and webpage.

Example:

"image"

model
enum<string>

Optional. Can be either 'gpt-4o' or 'gpt-4o-mini', we will use 'gpt-4o' by default

Available options:
gpt-4.1,
gpt-4.1-mini
Example:

"gpt-4.1"

source
string

When type is: PDF - Pass a valid and accesible pdf url

Image - Pass a valid and accesible image url

Webpage - Pass a valid and accesible webpage url

Text - Text content to extract data from

Example:

"https://8ddf98.jpg"

Response

200
application/json
200 - Image / 200 - Webpage
data
object
message
string
Example:

"Extraction completed successfully"

status
boolean
Example:

true