External Bias Integration

Version: 1.1.0 Base URL: https://api.athenatrust.ai/v1

POST /model-fairness-signals

Ingest a fairness signal from an external bias detection tool.

Request

POST /api/v1/model-fairness-signals
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body

Field
Type
Required
Description

externalToolId

string

Yes

Tool identifier: ibm_aif360, fairlearn, aws_clarify, google_vertex, custom

externalToolVersion

string

No

Version of the external tool

modelId

string

Yes

Your AI model identifier

modelVersion

string

No

Version of your model

metricName

string

Yes

Fairness metric name (see supported metrics)

metricValue

number

Yes

Metric value (0 to 1 normalized)

threshold

number

No

Acceptable threshold for this metric

passesThreshold

boolean

No

Whether metric passes the threshold

protectedAttribute

string

Yes

Protected attribute name (for example, gender)

privilegedGroup

string

No

Privileged group identifier

unprivilegedGroup

string

No

Unprivileged group identifier

sampleSize

integer

No

Number of samples analyzed

confidenceInterval

object

No

{ lower: number, upper: number }

rawPayload

object

Yes

Raw output from external tool

signalTimestamp

string

Yes

ISO 8601 timestamp when signal was generated

Supported Metric Names

Category
Metrics

Group Fairness

demographic_parity, equalized_odds, equal_opportunity, disparate_impact, statistical_parity_difference

Individual Fairness

consistency, flip_rate

Calibration

calibration_error, predictive_parity

Custom

custom

Example Request

Response

Error Codes

Code
HTTP Status
Description

FAIRNESS_INVALID_SOURCE

400

Unknown external tool ID

FAIRNESS_INVALID_METRIC

400

Unsupported metric name

SIGNAL_IN_FUTURE

400

Timestamp is in the future

SIGNAL_TOO_OLD

400

Signal older than 90 days

FAIRNESS_RATE_LIMIT

429

Max 100 signals per hour

GET /model-fairness-signals

List ingested fairness signals with optional filters.

Request

Query Parameters

Parameter
Type
Default
Description

modelId

string

Filter by model ID

externalToolId

string

Filter by external tool

protectedAttribute

string

Filter by protected attribute

passesThreshold

boolean

Filter by threshold status

startDate

string

ISO 8601 start date

endDate

string

ISO 8601 end date

page

integer

1

Page number

limit

integer

50

Results per page (max 100)

sortBy

string

signalTimestamp

Sort field

sortOrder

string

desc

asc or desc

Response

GET /model-fairness-signals/:id

Get a single fairness signal by ID.

Response

Returns the full signal object as shown above.

GET /bias/amplification

List bias amplification alerts.

Query Parameters

Parameter
Type
Default
Description

status

string

open, acknowledged, resolved, false_positive

severity

string

low, medium, high, critical

protectedAttribute

string

Filter by attribute

startDate

string

ISO 8601 start date

endDate

string

ISO 8601 end date

page

integer

1

Page number

limit

integer

50

Results per page (max 100)

Response

GET /bias/amplification/:id

Get a single amplification alert by ID.

Response

Returns the full alert object with the related fairness signal:

PATCH /bias/amplification/:id

Update an amplification alert status.

Request Body

Field
Type
Required
Description

status

string

Yes

open, acknowledged, resolved, false_positive

resolutionNotes

string

No

Notes about resolution

resolvedBy

string

No

User who resolved

Example Request

Response

POST /bias/amplification/analyze/:signalId

Trigger on demand amplification analysis for a specific fairness signal.

Response

Rate Limits

Endpoint
Limit

POST /model-fairness-signals

100 per hour

GET endpoints

Standard rate limits apply

POST /bias/amplification/analyze

10 per minute

Next Steps

Last updated