Predict in batch
curl --request POST \
--url https://api.finowl.co/v1/gender/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "lead_1",
"type": "name",
"value": "Alice"
},
{
"id": "lead_2",
"type": "email",
"value": "alice.johnson@example.com"
},
{
"id": "lead_3",
"type": "username",
"value": "prenses",
"country": "TR",
"forceToGenderize": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{id: 'lead_1', type: 'name', value: 'Alice'},
{id: 'lead_2', type: 'email', value: 'alice.johnson@example.com'},
{
id: 'lead_3',
type: 'username',
value: 'prenses',
country: 'TR',
forceToGenderize: true
}
]
})
};
fetch('https://api.finowl.co/v1/gender/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finowl.co/v1/gender/batch"
payload = { "items": [
{
"id": "lead_1",
"type": "name",
"value": "Alice"
},
{
"id": "lead_2",
"type": "email",
"value": "alice.johnson@example.com"
},
{
"id": "lead_3",
"type": "username",
"value": "prenses",
"country": "TR",
"forceToGenderize": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.finowl.co/v1/gender/batch"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"lead_1\",\n \"type\": \"name\",\n \"value\": \"Alice\"\n },\n {\n \"id\": \"lead_2\",\n \"type\": \"email\",\n \"value\": \"alice.johnson@example.com\"\n },\n {\n \"id\": \"lead_3\",\n \"type\": \"username\",\n \"value\": \"prenses\",\n \"country\": \"TR\",\n \"forceToGenderize\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.finowl.co/v1/gender/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'id' => 'lead_1',
'type' => 'name',
'value' => 'Alice'
],
[
'id' => 'lead_2',
'type' => 'email',
'value' => 'alice.johnson@example.com'
],
[
'id' => 'lead_3',
'type' => 'username',
'value' => 'prenses',
'country' => 'TR',
'forceToGenderize' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.finowl.co/v1/gender/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"id\": \"lead_1\",\n \"type\": \"name\",\n \"value\": \"Alice\"\n },\n {\n \"id\": \"lead_2\",\n \"type\": \"email\",\n \"value\": \"alice.johnson@example.com\"\n },\n {\n \"id\": \"lead_3\",\n \"type\": \"username\",\n \"value\": \"prenses\",\n \"country\": \"TR\",\n \"forceToGenderize\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.finowl.co/v1/gender/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"lead_1\",\n \"type\": \"name\",\n \"value\": \"Alice\"\n },\n {\n \"id\": \"lead_2\",\n \"type\": \"email\",\n \"value\": \"alice.johnson@example.com\"\n },\n {\n \"id\": \"lead_3\",\n \"type\": \"username\",\n \"value\": \"prenses\",\n \"country\": \"TR\",\n \"forceToGenderize\": true\n }\n ]\n}")
.asString();{
"data": [
{
"index": 0,
"id": "lead_1",
"charged_credits": 1,
"data": {
"result_status": "identified",
"gender": "female",
"confidence": 0.98
}
},
{
"index": 1,
"id": "lead_2",
"charged_credits": 1,
"data": {
"result_status": "identified",
"gender": "female",
"confidence": 0.95
}
},
{
"index": 2,
"id": "lead_3",
"charged_credits": 1,
"data": {
"result_status": "unknown",
"gender": null
}
}
],
"billing_status": "confirmed"
}{
"error": {
"code": "invalid_input"
}
}{
"error": {
"code": "unauthorized"
}
}{
"error": {
"code": "rate_limited"
}
}{
"data": [
{
"index": 123,
"id": "<string>",
"charged_credits": 123,
"data": {
"result_status": "identified",
"gender": "male",
"confidence": 123,
"country": "<string>"
},
"error": {
"code": "<string>",
"status": 502,
"action": "inspect_billing_before_retry"
}
}
],
"billing_status": "confirmed"
}{
"error": {
"code": "provider_unavailable"
}
}{
"error": {
"code": "provider_response_unconfirmed"
}
}Gender
Predict in batch
Predicts gender for 1 to 50 mixed inputs in one request. Results come back in the same
order as items. A 200 response can contain individual item errors, so check each entry.
Costs 1 credit per item. The whole batch is rejected with quota_exceeded if you
do not have enough credits for every item.
POST
/
v1
/
gender
/
batch
Predict in batch
curl --request POST \
--url https://api.finowl.co/v1/gender/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "lead_1",
"type": "name",
"value": "Alice"
},
{
"id": "lead_2",
"type": "email",
"value": "alice.johnson@example.com"
},
{
"id": "lead_3",
"type": "username",
"value": "prenses",
"country": "TR",
"forceToGenderize": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{id: 'lead_1', type: 'name', value: 'Alice'},
{id: 'lead_2', type: 'email', value: 'alice.johnson@example.com'},
{
id: 'lead_3',
type: 'username',
value: 'prenses',
country: 'TR',
forceToGenderize: true
}
]
})
};
fetch('https://api.finowl.co/v1/gender/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.finowl.co/v1/gender/batch"
payload = { "items": [
{
"id": "lead_1",
"type": "name",
"value": "Alice"
},
{
"id": "lead_2",
"type": "email",
"value": "alice.johnson@example.com"
},
{
"id": "lead_3",
"type": "username",
"value": "prenses",
"country": "TR",
"forceToGenderize": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.finowl.co/v1/gender/batch"
payload := strings.NewReader("{\n \"items\": [\n {\n \"id\": \"lead_1\",\n \"type\": \"name\",\n \"value\": \"Alice\"\n },\n {\n \"id\": \"lead_2\",\n \"type\": \"email\",\n \"value\": \"alice.johnson@example.com\"\n },\n {\n \"id\": \"lead_3\",\n \"type\": \"username\",\n \"value\": \"prenses\",\n \"country\": \"TR\",\n \"forceToGenderize\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.finowl.co/v1/gender/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'id' => 'lead_1',
'type' => 'name',
'value' => 'Alice'
],
[
'id' => 'lead_2',
'type' => 'email',
'value' => 'alice.johnson@example.com'
],
[
'id' => 'lead_3',
'type' => 'username',
'value' => 'prenses',
'country' => 'TR',
'forceToGenderize' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.finowl.co/v1/gender/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"id\": \"lead_1\",\n \"type\": \"name\",\n \"value\": \"Alice\"\n },\n {\n \"id\": \"lead_2\",\n \"type\": \"email\",\n \"value\": \"alice.johnson@example.com\"\n },\n {\n \"id\": \"lead_3\",\n \"type\": \"username\",\n \"value\": \"prenses\",\n \"country\": \"TR\",\n \"forceToGenderize\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.finowl.co/v1/gender/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"id\": \"lead_1\",\n \"type\": \"name\",\n \"value\": \"Alice\"\n },\n {\n \"id\": \"lead_2\",\n \"type\": \"email\",\n \"value\": \"alice.johnson@example.com\"\n },\n {\n \"id\": \"lead_3\",\n \"type\": \"username\",\n \"value\": \"prenses\",\n \"country\": \"TR\",\n \"forceToGenderize\": true\n }\n ]\n}")
.asString();{
"data": [
{
"index": 0,
"id": "lead_1",
"charged_credits": 1,
"data": {
"result_status": "identified",
"gender": "female",
"confidence": 0.98
}
},
{
"index": 1,
"id": "lead_2",
"charged_credits": 1,
"data": {
"result_status": "identified",
"gender": "female",
"confidence": 0.95
}
},
{
"index": 2,
"id": "lead_3",
"charged_credits": 1,
"data": {
"result_status": "unknown",
"gender": null
}
}
],
"billing_status": "confirmed"
}{
"error": {
"code": "invalid_input"
}
}{
"error": {
"code": "unauthorized"
}
}{
"error": {
"code": "rate_limited"
}
}{
"data": [
{
"index": 123,
"id": "<string>",
"charged_credits": 123,
"data": {
"result_status": "identified",
"gender": "male",
"confidence": 123,
"country": "<string>"
},
"error": {
"code": "<string>",
"status": 502,
"action": "inspect_billing_before_retry"
}
}
],
"billing_status": "confirmed"
}{
"error": {
"code": "provider_unavailable"
}
}{
"error": {
"code": "provider_response_unconfirmed"
}
}Authorizations
Your Finowl API key, for example finowl_3f9a.... Create keys in the dashboard under API Keys.
Body
application/json
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
The batch ran. Each entry has either data or error.