Quick Start (5 minutes)
Want to see how Extend works with your own documents? This guide will get you up and running in under 5 minutes to test extraction on your files, using the API.
Optional: Use a sample document
If you don’t have a document handy, use this Sample Invoice. We’ll reference it throughout the steps.
Step 1: Import / Create Your Schema
Open the Extend Studio. In the Extractor card, click Create new and choose one of:
- Import JSON Schema: If you have an existing JSON Schema, you can import that configuration here.
- Generate Extractor: If you have a document (e.g., the sample invoice above), you can generate a starter schema from it.
Step 2: Copy the Code
Now that we have created our Extractor, we will run a document against it, via the API.
We will copy a pre-generated code snippet to execute your Extractor against a file you provide:
In the builder tab of the Extractor, click View code in the top-right. In the modal, pick your preferred language tab and copy the snippet.
Replace YOUR_API_KEY
with your actual key, available in the Developers page.
If you have unsaved changes (there will be a warning), first click Save at the bottom right, so the code snippet reflects your latest config.
If you’re using the JavaScript or Python SDK snippets, install the SDKs first from our SDKs page.
We have provided example code snippets below, which look similar to what you will find on the UI using the “View code” button.
If you are following along with the sample invoice, your generated config should look something like this:
Step 3: Upload Your File
If you do not have a file URL for your document already, and are not following along with the sample invoice document, you can upload your document into Extend using the upload file endpoint. We will return to you a fileId
which you can then use to process your document.
Step 4: Run Processor and Get Results
Now we will run our Extractor against our document, using the code snippet from step 2.
If you have a URL for your file, or are following along with our sample invoice document, you should replace YOUR_FILE_URL
with that URL, and delete the YOUR_FILE_ID
option.
If you uploaded a file into Extend with the upload file endpoint, you should replace YOUR_FILE_ID
with the id returned from that endpoint, and delete the YOUR_FILE_URL
section.
Also, be sure to replace YOUR_API_KEY_HERE
and YOUR_PROCESSOR_ID
with the appropriate values.
Execute the code in your environment. You should see the extracted data in your console! To interpret the response structure, see Extractor output type.
See the below snippets which put everything together (uploading the file and running the Extractor).
Next steps
- How can I view the API endpoint to run an extractor?
- Review the Run Processor endpoint for full request/response details.
- How can I configure my extraction schema?
- See the JSON Schema guide.
- How can I set up webhooks?
- Follow Webhooks configuration to receive asynchronous run-completion events and results.
- When should I use the
sync: true
flag?- For this quick evaluation, we recommend
sync: true
for immediate results. - For production, use
sync: true
only when latency is predictable and under 5 minutes and documents are small. Otherwise, run asynchronously and rely on webhooks.
- For this quick evaluation, we recommend
- How can I assess the accuracy of Extend?
- Use Evaluation Sets to measure performance on your own ground truth. Create a set, run your extractor across it, and review diffs and accuracy metrics.