👁️

Image Recognition

Identify objects, faces, and text in images using deep learning.

AI/ML Enterprise Featured

Overview

Integrate the Image Recognition into your applications with ease. This API offers high performance, reliability, and comprehensive documentation to get you started quickly.

Features

  • 99.9% Uptime Guarantee
  • 1,000+ requests per hour
  • JSON formatted responses
  • Secure HTTPS endpoints
  • Real-time data processing

Endpoints

GET https://devapi.autoplannerx.com/api/v1/image-recognition/resource

Retrieve main resource data.

POST https://devapi.autoplannerx.com/api/v1/image-recognition/resource

Create a new resource entry.

Code Examples

Get started quickly with code examples in your preferred programming language. All examples use the base URL: https://devapi.autoplannerx.com/api/v1/image-recognition

PHP Examples

GET Request (cURL)

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://devapi.autoplannerx.com/api/v1/image-recognition/data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-Key: YOUR_API_KEY"
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    $data = json_decode($response, true);
    print_r($data);
} else {
    echo "Error: " . $response;
}
?>

POST Request (cURL)

<?php
$postData = [
    "key" => "value",
    "another_key" => "another_value"
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://devapi.autoplannerx.com/api/v1/image-recognition/data");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-Key: YOUR_API_KEY",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);

print_r($data);
?>

Using Guzzle HTTP Client

<?php
require_once "vendor/autoload.php";

use GuzzleHttp\Client;

$client = new Client();
$response = $client->get("https://devapi.autoplannerx.com/api/v1/image-recognition/data", [
    "headers" => [
        "X-API-Key" => "YOUR_API_KEY"
    ]
]);

$data = json_decode($response->getBody(), true);
print_r($data);
?>

JavaScript Examples

GET Request (Fetch API)

fetch("https://devapi.autoplannerx.com/api/v1/image-recognition/data", {
  method: "GET",
  headers: {
    "X-API-Key": "YOUR_API_KEY"
  }
})
.then(response => response.json())
.then(data => {
  console.log(data);
})
.catch(error => {
  console.error("Error:", error);
});

POST Request (Fetch API)

const postData = {
  key: "value",
  another_key: "another_value"
};

fetch("https://devapi.autoplannerx.com/api/v1/image-recognition/data", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify(postData)
})
.then(response => response.json())
.then(data => {
  console.log(data);
})
.catch(error => {
  console.error("Error:", error);
});

Node.js (axios)

const axios = require("axios");

// GET Request
axios.get("https://devapi.autoplannerx.com/api/v1/image-recognition/data", {
  headers: {
    "X-API-Key": "YOUR_API_KEY"
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error("Error:", error.response?.data || error.message);
});

// POST Request
axios.post("https://devapi.autoplannerx.com/api/v1/image-recognition/data", {
  key: "value",
  another_key: "another_value"
}, {
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json"
  }
})
.then(response => {
  console.log(response.data);
});

Python Examples

GET Request (requests)

import requests

url = "https://devapi.autoplannerx.com/api/v1/image-recognition/data"
headers = {
    "X-API-Key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error: {response.status_code}")
    print(response.text)

POST Request (requests)

import requests
import json

url = "https://devapi.autoplannerx.com/api/v1/image-recognition/data"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "key": "value",
    "another_key": "another_value"
}

response = requests.post(url, headers=headers, json=payload)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error: {response.status_code}")

Error Handling

import requests
from requests.exceptions import RequestException

url = "https://devapi.autoplannerx.com/api/v1/image-recognition/data"
headers = {
    "X-API-Key": "YOUR_API_KEY"
}

try:
    response = requests.get(url, headers=headers)
    response.raise_for_status()
    data = response.json()
    print(data)
except RequestException as e:
    print(f"Request failed: {e}")
except ValueError as e:
    print(f"Invalid JSON response: {e}")

Using urllib (Standard Library)

import urllib.request
import urllib.parse
import json

url = "https://devapi.autoplannerx.com/api/v1/image-recognition/data"
headers = {
    "X-API-Key": "YOUR_API_KEY"
}

req = urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(req) as response:
    data = json.loads(response.read().decode())
    print(data)