/guess-shape
Create a new job for guessing a shape.
Suggest a Shape for a Document
POST
https://waveline.ai/api/v1/guess-shape
Automatically generates a suggested shape for the data in a file, which can be used for the shape
parameter in the /extract-document
endpoint.
Headers
Content-Type
String
Should be application/json
.
Authorization*
String
Bearer <YOUR_API_KEY>
Request Body
fileName*
String
The name of the file. The suffix may be used by the AI for smarter extraction.
contentType*
String
MIME type of the file, such as text/text
or application/pdf
.
base64Content
String
⚠️ Only provide one of the three content properties. A string containing a base64 representation of the document to process.
Only accepts file sizes under 4.5MB, please use contentUrl
for larger files.
contentUrl
String
⚠️ Only provide one of the three content properties. A URL pointing to your data. (e.g. https://example.com/invoice.pdf)
textContent
String
⚠️ Only provide one of the three content properties.
A string containing the paintext contents to process.
{
"id": string,
"createdAt": string,
"status": "CREATED",
"type": "guess-shape",
"pages": number, // Number of billed pages in this job
"fileName": string,
"result": null, // Is null after creation
"urls": {
"get": string; // Query this URL to get the status/result of your job
}
}
Example
Here's an example of a JSON payload for the guess-shape
endpoint:
{
"fileName": "example.pdf",
"contentType": "application/pdf",
"base64Content": "JVBERi0xLjMKMSAwIG9iago8PC9UeXBlL0NhdGF..."
}
In this example, we're requesting the API to generate a suggested shape for a PDF file.
To send this payload to the guess-shape
endpoint using the curl
command:
curl -X POST "https://waveline.ai/api/v1/guess-shape" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ ... JSON payload here ... }'
If you already have an account, you can get an API key here.
Last updated