Official SDKs

Use an official SDK to integrate Tracore into your application.

Installation

# TypeScript / JavaScript
npm install @tracore/sdk

# Go
go get github.com/tracore-io/sdk-go

Quick example

import { TracoreClient } from '@tracore/sdk';

const client = new TracoreClient({
  apiKey: process.env.TRACORE_API_KEY!,
});

const run = await client.extract('my-workspace', 'invoice', {
  file: new Blob([buffer], { type: 'application/pdf' }),
  fileName: 'invoice.pdf',
  poll: true,
});

console.log(run.result);
import tracore "github.com/tracore-io/sdk-go"

client, err := tracore.New(tracore.ClientOptions{
  APIKey: os.Getenv("TRACORE_API_KEY"),
})
if err != nil {
  log.Fatal(err)
}

run, err := client.Extract(ctx, "my-workspace", "invoice",
  tracore.ExtractInput{File: f, FileName: "invoice.pdf"},
  &tracore.ExtractOptions{Poll: true})
if err != nil {
  log.Fatal(err)
}

fmt.Println(run.Status, run.ExtractedData)

See the Quickstart for a complete walkthrough.