OFR: Optical Feature Recognition

Our API provides a feature to extract visual features from images.

Identify visual features in images.

post

Performs optical feature recognition (OFR) to identify visual features such as objects, landmarks, or logos from images, aiding in image analysis and categorization.

Authorizations
Body
Responses
201

Successfully processed document with vision model

application/json
post
POST /vision HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 414

{
  "image": {
    "source": {
      "imageUri": "text"
    }
  },
  "features": [
    {
      "type": "FACE_DETECTION",
      "maxResults": 1,
      "model": "builtin/stable"
    }
  ],
  "imageContext": {
    "latLongRect": {
      "minLatLng": {
        "latitude": 1,
        "longitude": 1
      },
      "maxLatLng": {
        "latitude": 1,
        "longitude": 1
      }
    },
    "languageHints": [
      "text"
    ],
    "cropHintsParams": {
      "aspectRatios": [
        1
      ]
    },
    "faceRecognitionParams": {
      "celebritySet": [
        "text"
      ]
    },
    "textDetectionParams": {
      "enableTextDetectionConfidenceScore": true
    }
  }
}
201

Successfully processed document with vision model

{
  "pages": [
    {
      "index": 1,
      "markdown": "text",
      "images": [
        {
          "id": "text",
          "top_left_x": 1,
          "top_left_y": 1,
          "bottom_right_x": 1,
          "bottom_right_y": 1,
          "image_base64": "https://example.com"
        }
      ],
      "dimensions": {
        "dpi": 1,
        "height": 1,
        "width": 1
      }
    }
  ],
  "model": "mistral-ocr-latest",
  "usage_info": {
    "pages_processed": 1,
    "doc_size_bytes": 1
  }
}

Last updated

Was this helpful?