2.4 Hyper Extract

The HyperExtract endpoint extracts text and labels from an image using the "HyperExtract" model. Credits are required and deducted upon successful extraction.

Method: POST

https://sdk.hypergpt.ai/hyperExtract

Headers:

Bearer Token

new_user_token

Files:

  • file (UploadFile): The image file to be processed for text and label extraction.

Example Request:

headers = {
    "Authorization": "Bearer " + bearer_token
}
files = {
    "file": (file.filename, file.file, file.content_type)
}

response = requests.post(
    "https://sdk.hypergpt.ai/hyperExtract",
    headers=headers,
    files=files 
)

return response.json()

Example Response (Success):

{
  "ocr": [
    "Extracted text from the image"
  ]
}

Example Response (File Upload Error):

{
    "message": "There was an error uploading the file"
}

Example Response (Error):

{
    "detail": "Credit not enough"
}

Last updated