AI agent and bot detection
Tell helpful agents from hostile bots. POST /v1/score/bot scores ai agent and bot detection from 0 to 1000 for $0.002 a call.
Tell the agents that work for your customers from the bots that attack them. Some automated traffic is a customer's own agent placing an order. Some is a script testing stolen cards. Describe the session, and get a score for how likely it is automated abuse.
| Endpoint | Price | Group |
|---|---|---|
POST /v1/score/bot | $0.002 per call | Policy & Abuse |
Request
Send what you know in one context object. session is required; every other field is optional. A field can hold text, JSON or CSV.
curl https://api.finic.ai/v1/score/bot \
--header "Authorization: Bearer $FINIC_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"context": {
"session": { "duration_seconds": 60, "checkout_attempts": 42, "distinct_cards": 42, "pointer_events": 0, "median_ms_between_actions": 140 },
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/126.0.0.0 Safari/537.36",
"ip": { "address": "192.0.2.146", "type": "datacenter", "city": "Ashburn", "region": "VA", "sessions_today": 300 },
"account": { "signed_in": false, "checkout": "guest" },
"device": { "webdriver": true, "plugins": 0, "screen": "800x600" }
}
}'Fields you send
Send the details, not only an ID: an account ID tells the score nothing, but the account's age, profile and history do. Fields that are not in this list are also read.
| Field | Description | |
|---|---|---|
session | Required | What the session did: its events or its counts, with timings. |
user_agent | Optional | The full user agent string, with any client hints. |
ip | Optional | The IP address with what your lookup says about it: country, city and network type. An address by itself says little. |
account | Optional | A description of the account in use, not an account ID: its age, its history, and whether the customer has set up an agent. |
declared_agent | Optional | What the client says it is, if it identifies itself as an agent, and who it says it acts for. |
device | Optional | A description of the device: its fingerprint traits, and the other sessions seen on it. |
other_context | Optional | Any other information, structured or unstructured, that is useful for scoring. |
Response
score runs from 0, the lowest risk, to 1000, the highest. questions are the yes/no questions behind it, each with the probability that the answer is yes.
{
"score": 968,
"questions": [
{
"text": "Are actions arriving faster than a person could click?",
"probability": 0.97
},
{
"text": "Is one client trying many cards or accounts?",
"probability": 0.96
},
{
"text": "Does the browser report traits of an automation tool?",
"probability": 0.94
},
{
"text": "Is this an agent acting for a signed-in customer?",
"probability": 0.04
}
],
"request_id": "req_01M4YF1068X8B4C458ENPD4JHT"
}The questions behind the score
- Are actions arriving faster than a person could click?
- Is one client trying many cards or accounts?
- Does the browser report traits of an automation tool?
- Is this an agent acting for a signed-in customer?
Every organization gets the same questions for this score. To use your own questions, or to calibrate a score to your own outcomes, copy it to a custom scoring model in the Finic app (Starter plan and above).
Turn the score into an action
These thresholds are examples. Choose your own, and change them as you learn.
| Score | Action | Example |
|---|---|---|
| Under 300 | Approve | Let the session go on. |
| 300 to 599 | Step up | Show a challenge. |
| 600 to 849 | Review | Flag the session for an analyst. |
| 850 or more | Block | End the session. |
Errors
| Status | type | When |
|---|---|---|
| 400 | invalid_request | context is missing, is not a JSON object, or a required field (session) is empty. param names the field. |
| 401 | authentication_error | The API key is missing or not valid. |
| 402 | insufficient_credit | The organization has no credit. Add credit in the Finic app. |
| 429 | rate_limited | Too many requests. Retry with exponential backoff. |
See the API reference for every error and limit, and Pricing for what a call costs.
Content moderation
Decide posts, listings and messages by your policies. POST /v1/score/content scores content moderation from 0 to 1000 for $0.002 a call.
AI token fraud
Stop free-credit farming, stolen cards and leaked keys. POST /v1/score/ai_token_fraud scores ai token fraud from 0 to 1000 for $0.002 a call.