curl --request GET \
--url http://localhost:3051/api/v1/job/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3051/api/v1/job/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3051/api/v1/job/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3051",
CURLOPT_URL => "http://localhost:3051/api/v1/job/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3051/api/v1/job/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3051/api/v1/job/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3051/api/v1/job/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "pre",
"status": "queued",
"api_key_id": "<string>",
"api_key_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"is_prohibited": true,
"reason": "<string>",
"nsfw": true,
"output_image_url": "<string>",
"error_code": "<string>"
}Get job status
Retrieve the current status of a moderation job. Jobs are scoped to your client account.
curl --request GET \
--url http://localhost:3051/api/v1/job/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3051/api/v1/job/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3051/api/v1/job/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3051",
CURLOPT_URL => "http://localhost:3051/api/v1/job/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3051/api/v1/job/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3051/api/v1/job/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3051/api/v1/job/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "pre",
"status": "queued",
"api_key_id": "<string>",
"api_key_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"is_prohibited": true,
"reason": "<string>",
"nsfw": true,
"output_image_url": "<string>",
"error_code": "<string>"
}job:read scope. Requests without this scope receive a 403 FORBIDDEN response. See
authentication.api_key_id, with that key’s current name
in api_key_name. Both are null for a job sent from the dashboard, and for any job created before
key attribution shipped. api_key_name is resolved when you read the job, so a key you deleted
resolves to null while api_key_id still identifies it.Authorizations
API key from the Omnifence dashboard
Path Parameters
Response
Default Response
pre, post, chat, text, image, video, audio, generate queued, processing, completed, failed Id of the API key the job was submitted with. Null for jobs submitted from a dashboard session, and for jobs created before key attribution shipped.
Display name of that API key, resolved at read time. Null when the key was never named or has since been deleted. api_key_id still identifies it.
True when the content was rejected, false when it passed, null while the job is still pending.
Why the content was rejected. Names the specific policy or custom category that tripped. Present only on a reject.
Informational label: whether an image/video contains nudity or sexual content. Decoupled from is_prohibited, so NSFW content is not rejected on its own. Present only when the NSFW classifier ran.
Output image URL for a non-moderation generate job (presigned HTTPS when stored internally). Present only on those jobs once they complete.
Set when the job failed before reaching a moderation decision.