Skip to main content

Router

Ocr

Extracts text content while maintaining document structure and hierarchy
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.router.ocr(model="Golf", document={
        "type": "document_url",
        "document_url": "https://fond-pants.net/",
    })

    # Handle response
    print(res)

import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.router.ocr({
    model: "Golf",
    document: {
      type: "document_url",
      documentUrl: "https://fond-pants.net/",
    },
  });

  console.log(result);
}

run();