Waveline Extract
  • Waveline Extract
    • Introduction
    • Getting Started
  • Endpoints
    • /extract-document
    • /guess-shape
    • /raw-extract
    • /jobs
    • /jobs/{id}
    • /me
  • Types
    • Shape
    • DataShapeElement
  • Examples
    • Invoice Extraction
    • Order Table Extraction
    • Email Extraction
    • CV Extraction
    • Raw Extraction
  • Additional Material
    • FAQ
    • Limitations
  • Pricing
    • Pages
Powered by GitBook
On this page
  • Suggest a Shape for a Document
  • Example
  1. Endpoints

/guess-shape

Create a new job for guessing a shape.

Previous/extract-documentNext/raw-extract

Last updated 1 year ago

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 endpoint.

Headers

Name
Type
Description

Content-Type

String

Should be application/json.

Authorization*

String

Bearer <YOUR_API_KEY>

Request Body

Name
Type
Description

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
    }
}
{
    "error": string
}
{
    "error": string
}
{
    "error": string
}
{
    "error": string
}

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 ... }'

Only provide one of the three content properties. A string containing a base64 representation of the document to process.

Only provide one of the three content properties. A URL pointing to your data. (e.g. https://example.com/invoice.pdf)

Only provide one of the three content properties.

If you already have an account, you can .

/extract-document
get an API key here
⚠️
⚠️
⚠️