Skip to main content
POST
/
models
/
v2
/
cloudqi
/
CQI_Visual_Question_Awnser_PT_v0
document-question-answering
curl --request POST \
  --url https://api.bytez.com/models/v2/cloudqi/CQI_Visual_Question_Awnser_PT_v0 \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "question": "Whats the total cost?",
  "url": "https://templates.invoicehome.com/invoice-template-us-neat-750px.png",
  "base64": "data:image/png;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"
}
'
{
  "error": "<string>",
  "output": [
    {
      "score": 0.997048556804657,
      "answer": "$154.06",
      "start": 75,
      "end": 75
    }
  ]
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for document-question-answering models

question
string
required
Example:

"Whats the total cost?"

url
string
required
Example:

"https://templates.invoicehome.com/invoice-template-us-neat-750px.png"

base64
string
Example:

"data:image/png;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"

Response

Successful document-question-answering response.

error
string | null
required

Null on success; otherwise an error message.

output
array
required

Successful response with the answer from the document

Example:
[
{
"score": 0.997048556804657,
"answer": "$154.06",
"start": 75,
"end": 75
}
]