Getting Started with Img2.Info API

3/21/2024

Getting Started with Img2.Info API

Welcome to Img2.Info! This guide will help you get started with our OCR API service.

Quick Start

  1. Sign Up: Create an account at img2.info
  2. Get API Key: Navigate to your dashboard and copy your API key
  3. Make Your First Request: Try this simple example
curl -X POST https://img2.info/api/v1/extract-data \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileUrl": "https://iili.io/3NuHSrN.png",
    "schema": {
      "licensePlate": {
        "type": "string",
        "description": "license plate number"
      },
      "state": {
        "type": "string",
        "description": "State"
      }
    }
  }'

Features

  • High accuracy OCR powered by AI
  • Support for multiple languages
  • Structured data extraction
  • Fast processing times
  • Simple REST API

Basic Usage

Here's a simple example using JavaScript:

const response = await fetch('https://img2.info/api/v1/extract-data', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    fileUrl: "https://iili.io/3NuHSrN.png",
    schema: {
      licensePlate: { 
        type: "string", 
        description: "license plate number"
      },
      state: {
        type: "string", 
        description: "State" 
      }
    }
  })
});

const data = await response.json();
console.log(data.extracted_text);

Next Steps

  1. Check out our API Documentation
  2. Try our demo page

Need help? Contact our support team at support@img2.info