TextIQ Logo

TextIQ API Reference

Integration guidelines for the OCR gateway.

TextIQ is a high-fidelity OCR API gateway. It delivers structured text extraction, preserving layout and tables.

Authentication

All API requests must include your project API key passed in the api_key field of the request payload.

Available Models

textiq-q7 textiq-q7
textiq-g2.5 textiq-g2.5

OCR Processing

POST /api/v1/ocr

Accepts a document scan or camera capture and returns extracted text.

Request Parameters (multipart/form-data)

Field Type Description
model string The identifier of the active model to execute.
api_key string Your project API key (e.g. textiq_live_...).
file binary The image file to extract (PNG, JPEG, WebP, etc.).

JSON Response

{
  "text": "Extracted text content from the document..."
}

Code Examples

Python

import requests

url = "https://textiq.actigen.ai/api/v1/ocr"
payload = {
    "model": "textiq-q7",
    "api_key": "YOUR_PROJECT_API_KEY"
}
files = {
    "file": ("scan.png", open("scan.png", "rb"), "image/png")
}

res = requests.post(url, data=payload, files=files)
print(res.json()["text"])

JavaScript

const formData = new FormData();
formData.append('model', 'textiq-g2.5');
formData.append('api_key', 'YOUR_PROJECT_API_KEY');
formData.append('file', fileInput.files[0]);

const res = await fetch('https://textiq.actigen.ai/api/v1/ocr', {
    method: 'POST',
    body: formData
});
const data = await res.json();
console.log(data.text);