curl --request POST \
--url 'https://api.elkapi.com/v1/moderations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
}'
import requests
url = "https://api.elkapi.com/v1/moderations"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/moderations";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"id": "id",
"model": "gpt-5.5",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}
Native OpenAI Format
Create Moderation
- Check whether text content violates usage policies
POST
/
v1
/
moderations
curl --request POST \
--url 'https://api.elkapi.com/v1/moderations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
}'
import requests
url = "https://api.elkapi.com/v1/moderations"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/moderations";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"id": "id",
"model": "gpt-5.5",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}
curl --request POST \
--url 'https://api.elkapi.com/v1/moderations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
}'
import requests
url = "https://api.elkapi.com/v1/moderations"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/moderations";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"input": "The weather is great today, perfect for a walk.",
"model": "gpt-5.5"
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"id": "id",
"model": "gpt-5.5",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}
Authorizations
string
required
All endpoints require Bearer Token authentication.Add it to the request headers:
Authorization: Bearer YOUR_API_KEY
Body
string or array<string>
required
string
default:"gpt-5.5"
Example:
gpt-5.5Response
string
string
default:"gpt-5.5"
Example:
gpt-5.5⌘I