OpenAI API
The adapter reads daily organization totals from the Completions Usage endpoint. Content and project identifiers stay outside portal observations.
Access
The adapter runs in the customer environment and sends selected JSON events to the organization-scoped portal webhook.
Request
A synthetic single event uses fields validated by the handler.
/api/integrations/webhook/00000000-0000-4000-8000-000000000001curl -i -X POST 'https://portal.rfi-irfos.com/api/integrations/webhook/00000000-0000-4000-8000-000000000001' \
-H 'Authorization: Bearer $SYNTHETIC_WEBHOOK_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"id":"synthetic-event-001","type":"security.alert","title":"Synthetic alert","severity":"medium"}'Response
The portal webhook returns acceptance and duplicate status. An event is stored as a technical observation.
{"data":{"accepted":true,"duplicate":false}}Error codes
400 for an invalid payload, 401 for an invalid secret, 413 for an oversized body, 415 for an unsupported media type, 429 for the minute limit, and 503 for a storage failure.
Evidence
| Code evidence | Route details |
|---|---|
connectors/ai_providers/rfi_openai.py | Source |
app/api/v1/integrations/openai-adapter/route.ts | Source |
npm run test:ai-provider-connectors | Test · Passed locally |
This branch contains source evidence and the listed local test results. Live also requires evidence of production operation; until then the status remains Preview.