/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

NameTypeDescription

Content-Type

String

Should be application/json.

Authorization*

String

Bearer <YOUR_API_KEY>

Request Body

NameTypeDescription

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 accepts file sizes under 4.5MB, please use contentUrl for larger files.

contentUrl

String

textContent

String

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