Introduction
Welcome to the DeepAI API! You can use our API to process images and videos to get data about the demographics of people present, faces detected, and nudity detected. You can even flag media that contains nudity so you can remove it from (or promote it?) within your online community.
Authentication
Image Recognition APIs
Celebrity Recognition
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/celebrity-recognition
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/celebrity-recognition
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/celebrity-recognition
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/celebrity-recognition
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/celebrity-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/celebrity-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/celebrity-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/celebrity-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/celebrity-recognition",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/celebrity-recognition",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/celebrity-recognition",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/celebrity-recognition",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("celebrity-recognition", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("celebrity-recognition", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("celebrity-recognition", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("celebrity-recognition", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("celebrity-recognition", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("celebrity-recognition", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("celebrity-recognition", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("celebrity-recognition", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("celebrity-recognition", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("celebrity-recognition", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{"celebrities": [{"name": "arnold schwarzenegger", "confidence": "0.97", "bounding_box": [411, 1253, 223, 224] }, {"name": "kim_kardashian", "confidence": "0.92", "bounding_box": [630, 988, 167, 185]}]}
Recognize famous people within an image.
HTTP Request
POST https://api.deepai.org/api/celebrity-recognition
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image |
Facial Recognition
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-recognition
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-recognition
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-recognition
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-recognition
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-recognition",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-recognition",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-recognition",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-recognition",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-recognition", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-recognition", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-recognition", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-recognition", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-recognition", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-recognition", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-recognition", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-recognition", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-recognition", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-recognition", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
This face detection API detects and recognizes faces in any image or video frame. By leveraging a deep neural network trained on small, blurry, and shadowy faces of all ages, this service is able to automatically detect faces with a high level of accuracy.
HTTP Request
POST https://api.deepai.org/api/facial-recognition
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image |
Facial Expression Recognition
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-expression-recognition
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-expression-recognition
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-expression-recognition
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/facial-expression-recognition
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-expression-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-expression-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-expression-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/facial-expression-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-expression-recognition",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-expression-recognition",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-expression-recognition",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/facial-expression-recognition",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-expression-recognition", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-expression-recognition", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-expression-recognition", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-expression-recognition", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-expression-recognition", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("facial-expression-recognition", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-expression-recognition", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-expression-recognition", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-expression-recognition", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("facial-expression-recognition", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
HTTP Request
POST https://api.deepai.org/api/facial-expression-recognition
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image |
Content Moderation
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/content-moderation
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/content-moderation
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/content-moderation', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/content-moderation', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/content-moderation",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/content-moderation",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("content-moderation", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("content-moderation", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("content-moderation", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("content-moderation", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("content-moderation", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The content moderation API analyzes images and videos to detect the presence of adult content, hate symbols, guns, and offensive words found amongst text within images. You can use this service to automatically moderate user generated content in your web or mobile app community, meet compliance needs for broadcast media, or block users from uploading prohibited content to your website in real-time.
HTTP Request
POST https://api.deepai.org/api/content-moderation
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image |
Demographic Recognition
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/demographic-recognition
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/demographic-recognition
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/demographic-recognition
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/demographic-recognition
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/demographic-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/demographic-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/demographic-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/demographic-recognition', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/demographic-recognition",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/demographic-recognition",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/demographic-recognition",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/demographic-recognition",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("demographic-recognition", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("demographic-recognition", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("demographic-recognition", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("demographic-recognition", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("demographic-recognition", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("demographic-recognition", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("demographic-recognition", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("demographic-recognition", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("demographic-recognition", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("demographic-recognition", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
[
{
"age_range": [
32,
47
],
"cultural_appearance_confidence": 0.96,
"gender": "Female",
"age_range_confidence": 0.47,
"bounding_box": [
79,
112,
75,
76
],
"gender_confidence": 0.96,
"cultural_appearance": "White"
},
{
"age_range": [
15,
31
],
"cultural_appearance_confidence": 0.99,
"gender": "Female",
"age_range_confidence": 0.64,
"bounding_box": [
153,
112,
76,
76
],
"gender_confidence": 0.98,
"cultural_appearance": "Black"
}
]
Predict and label the age, gender, and cultural appearance of people in an image or video.
HTTP Request
POST https://api.deepai.org/api/demographic-recognition
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | value | Description |
---|---|---|
Age | range | A min and max age that the person could be. |
Gender | string | male or female |
Cultural appearance | string | The cultural appearance of the person. |
bounding_box | null | top, left, width, height. |
_confidence | decimal | percentage confidence in the associated prediction value, 1 being 100% confident. |
Nudity Detection
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/nsfw-detector
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/nsfw-detector
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/nsfw-detector
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/nsfw-detector
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/nsfw-detector', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/nsfw-detector', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/nsfw-detector', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/nsfw-detector', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/nsfw-detector",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/nsfw-detector",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/nsfw-detector",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/nsfw-detector",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("nsfw-detector", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("nsfw-detector", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("nsfw-detector", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("nsfw-detector", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("nsfw-detector", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("nsfw-detector", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("nsfw-detector", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("nsfw-detector", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("nsfw-detector", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("nsfw-detector", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"nsfw_score": 0.041
}
Detects the likelihood that an image contains nudity and should be considered NSFW. Returns a number between 0 and 1, with 1 being 100% likely to contain nudity and be NSFW.
HTTP Request
POST https://api.deepai.org/api/nsfw-detector
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | value | Description |
---|---|---|
nsfw_score | decimal | Percentage confidence that the image contains nudity, 1 being 100% confident. |
DenseCap
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/densecap
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/densecap
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/densecap
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/densecap
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/densecap', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/densecap', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/densecap', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/densecap', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/densecap",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/densecap",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/densecap",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/densecap",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("densecap", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("densecap", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("densecap", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("densecap", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("densecap", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("densecap", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("densecap", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("densecap", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("densecap", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("densecap", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
[
{
"caption": "a man and woman",
"bounding_box": [
474.69186401367,
42.693943023682,
255.11962890625,
385.82168579102
],
"confidence": 4.7148518562317
},
{
"caption": "two men wearing white shirts",
"bounding_box": [
-1.8633418083191,
-0.4395763874054,
442.74349975586,
465.0071105957
],
"confidence": 4.68070936203
},
{
"caption": "two women wearing glasses",
"bounding_box": [
320.3271484375,
25.797981262207,
252.1183013916,
382.01626586914
],
"confidence": 2.6904807090759
}
]
Captions an image by labeling every object the model detects is present within the image. The output is the labeled image along with a JSON snippet that includes each label and its coordinates within the image.
HTTP Request
POST https://api.deepai.org/api/densecap
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | Value | Description |
---|---|---|
caption | null | The description of the detected object. |
bounding_box | null | top, left, width, height. |
confidence | null | The pertentage confidence in the caption predicted, 1 being 100% confident. |
Scene Recognition
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/places
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/places
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/places
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/places
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/places', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/places', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/places', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/places', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/places",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/places",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/places",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/places",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("places", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("places", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("places", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("places", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("places", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("places", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("places", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("places", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("places", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("places", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
Detect and label the apparent location of the scene within a given image or video. e.g. outdoors in a garden, inside a kitchen, or around snowy mountains.
HTTP Request
POST https://api.deepai.org/api/places
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | Value | Description |
---|---|---|
name | null | The name of the detected place. |
confidence | null | From 0 to 1, the confidence in the detected place. |
Waifu2x
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/waifu2x
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/waifu2x
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/waifu2x', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/waifu2x', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/waifu2x",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/waifu2x",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("waifu2x", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("waifu2x", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("waifu2x", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("waifu2x", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("waifu2x", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Waifu2x is an algorithm that upscales images while reducing noise within the image. It gets its name from the anime-style art known as 'waifu' that it was largely trained on. Even though waifus made up most of the training data, this waifu2x api still performs well on photographs and other types of imagery. You can use Waifu2x to double the size of your images while reducing noise.
HTTP Request
POST https://api.deepai.org/api/waifu2x
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | value | Description |
---|---|---|
output_url | url | The url of the processed image. |
Neural Talk 2
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/neuraltalk
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/neuraltalk
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/neuraltalk', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/neuraltalk', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/neuraltalk",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/neuraltalk",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("neuraltalk", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("neuraltalk", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("neuraltalk", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("neuraltalk", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("neuraltalk", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output": "a group of people standing in a room\n",
"job_id": 452328
}
Summarizes the content of an image in a one sentence description.
HTTP Request
POST https://api.deepai.org/api/neuraltalk
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | Value | Description |
---|---|---|
output | string | The image caption output by the neuraltalk2 model. |
Image Similarity
# Example posting a image URL:
curl \
-F 'image1=YOUR_IMAGE_URL' \
-F 'image2=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/image-similarity
# Example posting a local image file:
curl \
-F 'image1=@/path/to/your/file.jpg' \
-F 'image2=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/image-similarity
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/image-similarity', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image1' => 'YOUR_IMAGE_URL',
'image2' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/image-similarity', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image1' => File.new('/path/to/your/file.jpg'),
'image2' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/image-similarity",
data={
'image1': 'YOUR_IMAGE_URL',
'image2': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/image-similarity",
files={
'image1': open('/path/to/your/file.jpg', 'rb'),
'image2': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("image-similarity", {
image1: "YOUR_IMAGE_URL",
image2: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("image-similarity", {
image1: document.getElementById('yourFileInputId'),
image2: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("image-similarity", {
image1: fs.createReadStream("/path/to/your/file.jpg"),
image2: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("image-similarity", new {
image1 = "YOUR_IMAGE_URL",
image2 = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("image-similarity", new {
image1 = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
image2 = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"distance": 0
}
Image Similarity compares two images and returns a value that tells you how visually similar they are. The lower the the score, the more contextually similar the two images are with a score of '0' being identical. Sifting through datasets looking for duplicates or finding a visually similar set of images can be painful - so let computer vision do it for you with this API.
HTTP Request
POST https://api.deepai.org/api/image-similarity
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image1 | image | The image url or file upload of the first image to compare |
image2 | image | The image url or file upload of the second image to compare |
Response Data
Parameter | value | Description |
---|---|---|
distance | number | the amount of disimilarity the two images have relative to one another. A distance of 0 means the two images are identical. |
CNNMRF
# Example posting a image URL:
curl \
-F 'content=YOUR_IMAGE_URL' \
-F 'style=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/CNNMRF
# Example posting a local image file:
curl \
-F 'content=@/path/to/your/file.jpg' \
-F 'style=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/CNNMRF
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/CNNMRF', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'content' => 'YOUR_IMAGE_URL',
'style' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/CNNMRF', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'content' => File.new('/path/to/your/file.jpg'),
'style' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/CNNMRF",
data={
'content': 'YOUR_IMAGE_URL',
'style': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/CNNMRF",
files={
'content': open('/path/to/your/file.jpg', 'rb'),
'style': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("CNNMRF", {
content: "YOUR_IMAGE_URL",
style: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("CNNMRF", {
content: document.getElementById('yourFileInputId'),
style: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("CNNMRF", {
content: fs.createReadStream("/path/to/your/file.jpg"),
style: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("CNNMRF", new {
content = "YOUR_IMAGE_URL",
style = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("CNNMRF", new {
content = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
style = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Transfers the style from one image onto the content of another image.
HTTP Request
POST https://api.deepai.org/api/CNNMRF
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
content | image | The image url or file upload to provide the content |
style | image | The image url or file upload to provide the style |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Deep Mask
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepmask
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepmask
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepmask', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepmask', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/deepmask",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/deepmask",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepmask", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepmask", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepmask", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepmask", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepmask", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Generates a collection of image boundaries for object detection.
HTTP Request
POST https://api.deepai.org/api/deepmask
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload to provide the content |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Image Colorization
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/colorizer
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/colorizer
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/colorizer",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/colorizer",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("colorizer", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("colorizer", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("colorizer", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("colorizer", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("colorizer", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Colorize black and white images or videos using the image colorization API. Add color to old family photos and historic images, or bring an old film back to life with colorization.
HTTP Request
POST https://api.deepai.org/api/colorizer
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Neural Style
# Example posting a image URL:
curl \
-F 'style=YOUR_IMAGE_URL' \
-F 'content=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/neural-style
# Example posting a local image file:
curl \
-F 'style=@/path/to/your/file.jpg' \
-F 'content=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/neural-style
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/neural-style', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'style' => 'YOUR_IMAGE_URL',
'content' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/neural-style', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'style' => File.new('/path/to/your/file.jpg'),
'content' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/neural-style",
data={
'style': 'YOUR_IMAGE_URL',
'content': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/neural-style",
files={
'style': open('/path/to/your/file.jpg', 'rb'),
'content': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("neural-style", {
style: "YOUR_IMAGE_URL",
content: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("neural-style", {
style: document.getElementById('yourFileInputId'),
content: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("neural-style", {
style: fs.createReadStream("/path/to/your/file.jpg"),
content: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("neural-style", new {
style = "YOUR_IMAGE_URL",
content = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("neural-style", new {
style = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
content = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Transfers the style from one image onto the content of another image.
HTTP Request
POST https://api.deepai.org/api/neural-style
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
content | image | The image url or file upload to provide the content |
style | image | The image url or file upload to provide the style |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Super Resolution
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/torch-srgan
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/torch-srgan
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/torch-srgan
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/torch-srgan
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/torch-srgan",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/torch-srgan",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/torch-srgan",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/torch-srgan",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("torch-srgan", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("torch-srgan", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("torch-srgan", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("torch-srgan", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("torch-srgan", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("torch-srgan", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("torch-srgan", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("torch-srgan", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("torch-srgan", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("torch-srgan", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
The Super Resolution API uses machine learning to clarify, sharpen, and upscale the photo without losing its content and defining characteristics. Blurry images are unfortunately common and are a problem for professionals and hobbyists alike. Super resolution uses machine learning techniques to upscale images in a fraction of a second.
HTTP Request
POST https://api.deepai.org/api/torch-srgan
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Deep Dream
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
curl \
-F 'video=YOUR_VIDEO_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
# Example posting a local video file:
curl \
-F 'video=@/path/to/your/file.mp4' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Example posting a video URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => 'YOUR_VIDEO_URL',
}
)
puts r
# Example posting a local video file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'video' => File.new('/path/to/your/file.mp4'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/deepdream",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/deepdream",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
# Ensure your pyOpenSSL pip package is up to date
# Example posting a video URL:
import requests
r = requests.post(
"https://api.deepai.org/api/deepdream",
data={
'video': 'YOUR_VIDEO_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local video file:
import requests
r = requests.post(
"https://api.deepai.org/api/deepdream",
files={
'video': open('/path/to/your/file.mp4', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a video URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
video: "YOUR_VIDEO_URL",
});
console.log(resp);
})()
// Example posting file picker input video (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
video: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local video file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
video: fs.createReadStream("/path/to/your/file.mp4"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepdream", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepdream", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
// Video Mode: Supports files, URLs, and YouTube URLs. See full details and other options at https://deepai.org/api-docs/#video-recognition-api
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a video URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepdream", new {
video = "YOUR_VIDEO_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local video file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepdream", new {
video = File.OpenRead("C:\\path\\to\\your\\file.mp4"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Exaggerates feature attributes or textures using information that the bvlc_googlenet model learned during training.
HTTP Request
POST https://api.deepai.org/api/deepdream
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload to provide the content |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Image Inpainting
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/inpainting
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/inpainting
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/inpainting', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/inpainting', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/inpainting",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/inpainting",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("inpainting", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("inpainting", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("inpainting", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("inpainting", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("inpainting", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
{
"output_url": "https://api.deepai.org/media/results/450814/c525e660-585d-4d8e-9550-1f6f46197d07/result18246509.jpg"
}
Fills in a a rectangular hole centered in an image by creating pixels that make the filled in image look natural.
HTTP Request
POST https://api.deepai.org/api/inpainting
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
image | image | The image url or file upload that you want processed |
Response Data
Parameter | Default | Description |
---|---|---|
output_url | null | The image url of the processed image. |
Text Analysis APIs
Sentiment Analysis
# Example posting a text URL:
curl \
-F 'text=YOUR_TEXT_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/sentiment-analysis
# Example posting a local text file:
curl \
-F 'text=@/path/to/your/file.txt' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/sentiment-analysis
# Example directly sending a text string:
curl \
-F 'text=YOUR_TEXT_HERE' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/sentiment-analysis
# Example posting a text URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/sentiment-analysis', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => 'YOUR_TEXT_URL',
}
)
puts r
# Example posting a local text file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/sentiment-analysis', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => File.new('/path/to/your/file.txt'),
}
)
puts r
# Example directly sending a text string:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/sentiment-analysis', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => 'YOUR_TEXT_HERE',
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a text URL:
import requests
r = requests.post(
"https://api.deepai.org/api/sentiment-analysis",
data={
'text': 'YOUR_TEXT_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local text file:
import requests
r = requests.post(
"https://api.deepai.org/api/sentiment-analysis",
files={
'text': open('/path/to/your/file.txt', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example directly sending a text string:
import requests
r = requests.post(
"https://api.deepai.org/api/sentiment-analysis",
data={
'text': 'YOUR_TEXT_HERE',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a text URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("sentiment-analysis", {
text: "YOUR_TEXT_URL",
});
console.log(resp);
})()
// Example posting file picker input text (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("sentiment-analysis", {
text: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local text file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("sentiment-analysis", {
text: fs.createReadStream("/path/to/your/file.txt"),
});
console.log(resp);
})()
// Example directly sending a text string:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("sentiment-analysis", {
text: "YOUR_TEXT_HERE",
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a text URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("sentiment-analysis", new {
text = "YOUR_TEXT_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local text file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("sentiment-analysis", new {
text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
});
Console.Write(api.objectAsJsonString(resp));
// Example directly sending a text string:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("sentiment-analysis", new {
text = "YOUR_TEXT_HERE",
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
[
"Positive",
"Negative"
]
This sentiment analysis API extracts sentiment in a given string of text. Sentiment analysis, also called 'opinion mining', uses natural language processing, text analysis and computational linguistics to identify and detect subjective information from the input text. This algorithm classifies each sentence in the input as very negative, negative, neutral, positive, or very positive.
HTTP Request
POST https://api.deepai.org/api/sentiment-analysis
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
text | text | Enter one or more sentences: |
Text Summarization
# Example posting a text URL:
curl \
-F 'text=YOUR_TEXT_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/summarization
# Example posting a local text file:
curl \
-F 'text=@/path/to/your/file.txt' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/summarization
# Example directly sending a text string:
curl \
-F 'text=YOUR_TEXT_HERE' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/summarization
# Example posting a text URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/summarization', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => 'YOUR_TEXT_URL',
}
)
puts r
# Example posting a local text file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/summarization', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => File.new('/path/to/your/file.txt'),
}
)
puts r
# Example directly sending a text string:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/summarization', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => 'YOUR_TEXT_HERE',
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a text URL:
import requests
r = requests.post(
"https://api.deepai.org/api/summarization",
data={
'text': 'YOUR_TEXT_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local text file:
import requests
r = requests.post(
"https://api.deepai.org/api/summarization",
files={
'text': open('/path/to/your/file.txt', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example directly sending a text string:
import requests
r = requests.post(
"https://api.deepai.org/api/summarization",
data={
'text': 'YOUR_TEXT_HERE',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a text URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("summarization", {
text: "YOUR_TEXT_URL",
});
console.log(resp);
})()
// Example posting file picker input text (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("summarization", {
text: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local text file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("summarization", {
text: fs.createReadStream("/path/to/your/file.txt"),
});
console.log(resp);
})()
// Example directly sending a text string:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("summarization", {
text: "YOUR_TEXT_HERE",
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a text URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("summarization", new {
text = "YOUR_TEXT_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local text file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("summarization", new {
text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
});
Console.Write(api.objectAsJsonString(resp));
// Example directly sending a text string:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("summarization", new {
text = "YOUR_TEXT_HERE",
});
Console.Write(api.objectAsJsonString(resp));
Reduces the size of a document by only keeping the most relevant sentences from it. This model aims to reduce the size to 20% of the original.
HTTP Request
POST https://api.deepai.org/api/summarization
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
text | text | Enter a few paragraphs of text: |
Text Tagging
# Example posting a text URL:
curl \
-F 'text=YOUR_TEXT_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/text-tagging
# Example posting a local text file:
curl \
-F 'text=@/path/to/your/file.txt' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/text-tagging
# Example directly sending a text string:
curl \
-F 'text=YOUR_TEXT_HERE' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/text-tagging
# Example posting a text URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text-tagging', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => 'YOUR_TEXT_URL',
}
)
puts r
# Example posting a local text file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text-tagging', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => File.new('/path/to/your/file.txt'),
}
)
puts r
# Example directly sending a text string:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text-tagging', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'text' => 'YOUR_TEXT_HERE',
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a text URL:
import requests
r = requests.post(
"https://api.deepai.org/api/text-tagging",
data={
'text': 'YOUR_TEXT_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local text file:
import requests
r = requests.post(
"https://api.deepai.org/api/text-tagging",
files={
'text': open('/path/to/your/file.txt', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example directly sending a text string:
import requests
r = requests.post(
"https://api.deepai.org/api/text-tagging",
data={
'text': 'YOUR_TEXT_HERE',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a text URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("text-tagging", {
text: "YOUR_TEXT_URL",
});
console.log(resp);
})()
// Example posting file picker input text (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("text-tagging", {
text: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local text file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("text-tagging", {
text: fs.createReadStream("/path/to/your/file.txt"),
});
console.log(resp);
})()
// Example directly sending a text string:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("text-tagging", {
text: "YOUR_TEXT_HERE",
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a text URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("text-tagging", new {
text = "YOUR_TEXT_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local text file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("text-tagging", new {
text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
});
Console.Write(api.objectAsJsonString(resp));
// Example directly sending a text string:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("text-tagging", new {
text = "YOUR_TEXT_HERE",
});
Console.Write(api.objectAsJsonString(resp));
Extracts the most relevant and unique words from a sample of text. These words can then be used to classify documents.
HTTP Request
POST https://api.deepai.org/api/text-tagging
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
text | text | Enter a few paragraphs of text: |
Parsey McParseface
# Example posting a text URL:
curl \
-F 'sentence=YOUR_TEXT_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/parseymcparseface
# Example posting a local text file:
curl \
-F 'sentence=@/path/to/your/file.txt' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/parseymcparseface
# Example directly sending a text string:
curl \
-F 'sentence=YOUR_TEXT_HERE' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/parseymcparseface
# Example posting a text URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/parseymcparseface', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'sentence' => 'YOUR_TEXT_URL',
}
)
puts r
# Example posting a local text file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/parseymcparseface', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'sentence' => File.new('/path/to/your/file.txt'),
}
)
puts r
# Example directly sending a text string:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/parseymcparseface', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'sentence' => 'YOUR_TEXT_HERE',
}
)
puts r
# Ensure your pyOpenSSL pip package is up to date
# Example posting a text URL:
import requests
r = requests.post(
"https://api.deepai.org/api/parseymcparseface",
data={
'sentence': 'YOUR_TEXT_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local text file:
import requests
r = requests.post(
"https://api.deepai.org/api/parseymcparseface",
files={
'sentence': open('/path/to/your/file.txt', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example directly sending a text string:
import requests
r = requests.post(
"https://api.deepai.org/api/parseymcparseface",
data={
'sentence': 'YOUR_TEXT_HERE',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a text URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("parseymcparseface", {
sentence: "YOUR_TEXT_URL",
});
console.log(resp);
})()
// Example posting file picker input text (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("parseymcparseface", {
sentence: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local text file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("parseymcparseface", {
sentence: fs.createReadStream("/path/to/your/file.txt"),
});
console.log(resp);
})()
// Example directly sending a text string:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("parseymcparseface", {
sentence: "YOUR_TEXT_HERE",
});
console.log(resp);
})()
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a text URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("parseymcparseface", new {
sentence = "YOUR_TEXT_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local text file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("parseymcparseface", new {
sentence = File.OpenRead("C:\\path\\to\\your\\file.txt"),
});
Console.Write(api.objectAsJsonString(resp));
// Example directly sending a text string:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("parseymcparseface", new {
sentence = "YOUR_TEXT_HERE",
});
Console.Write(api.objectAsJsonString(resp));
The above command returns JSON structured like this:
[
{
"sentence":"I like to watch dogs run across the grass.",
"tree":{
"ROOT":[
{
"index":2,
"token":"like",
"label":"VERB",
"pos":"VBP",
"tree":{
"nsubj":[
{
"index":1,
"token":"I",
"label":"PRON",
"pos":"PRP"
}
],
"xcomp":[
{
"index":4,
"token":"watch",
"label":"VERB",
"pos":"VB",
"tree":{
"aux":[
{
"index":3,
"token":"to",
"label":"PRT",
"pos":"TO"
}
],
"ccomp":[
{
"index":6,
"token":"run",
"label":"VERB",
"pos":"VB",
"tree":{
"nsubj":[
{
"index":5,
"token":"dogs",
"label":"NOUN",
"pos":"NNS"
}
],
"prep":[
{
"index":7,
"token":"across",
"label":"ADP",
"pos":"IN",
"tree":{
"pobj":[
{
"index":9,
"token":"grass",
"label":"NOUN",
"pos":"NN",
"tree":{
"det":[
{
"index":8,
"token":"the",
"label":"DET",
"pos":"DT"
}
]
}
}
]
}
}
]
}
}
]
}
}
],
"punct":[
{
"index":10,
"token":".",
"label":".",
"pos":"."
}
]
}
}
]
}
}
]
Parses an input sentence in English and outputs the parse tree.
HTTP Request
POST https://api.deepai.org/api/parseymcparseface
Headers
Parameter | Default | Description |
---|---|---|
Api-Key | null | Your production API Key. |
Form Fields
Name | Type | Description |
---|---|---|
sentence | text | Enter one or more sentences: |
Video Recognition API
Some models support videos, their API docs will show video examples.
Simply pass a field named "video" instead of "image".
The API will return immediately with the status. Re-check the status every 1 minute until it is complete.
Video Input Types
These are the types that can be passed to the "video" field:
- Video file upload
- Video file URL
- Youtube URL
Options
- frames_per_second
- Pass this field to set to the number of FPS to analyze or process.
- If not set, it will be caclulated automatically.
- default of 2 FPS for models that output JSON
- default to match input FPS for models that
Video API Response
{
"id": "ba832b4a072e40fab7475d661e0a76b1",
"status": "running",
"status_url": "https://api.deepai.org/video-content-analysis/ba832b4a072e40fab7475d661e0a76b1"
}
The "status_url" field should be requested to see the updated status.
Get video job status:
curl https://api.deepai.org/video-content-analysis/3cfe25dd6f2f4f949bb1b222e54b9a9b
Response before finishing:
{
"est_total_cost": 0.6833333333333333,
"id": "ba832b4a072e40fab7475d661e0a76b1",
"status": "pending",
"status_url": "http://api.deepai.org/video-content-analysis/ba832b4a072e40fab7475d661e0a76b1"
}
Response after finishing:
{
"est_total_cost": 0.6777777777777777,
"id": "6dff1eff2e1540c0a22615dad12791b4",
"results_url": "https://api.deepai.org/video-content-analysis/ba832b4a072e40fab7475d661e0a76b1/results",
"status_url": "http://api.deepai.org/video-content-analysis/ba832b4a072e40fab7475d661e0a76b1",
"status": "completed"
}
After finishing, "results_url" will point to a JSON file of results, or a re-combined video output file.