What is the API endpoint?
POST https://gateplex.ai/api/public/intercepts
How do I authenticate?
Send your project API key as either Authorization: Bearer gplx_... or X-Gateplex-Api-Key: gplx_.... Generate keys in Dashboard → Settings → API Keys.
What fields are required in the intercept payload?
Only event_type is required. Optional: agent_id (uuid), input, output, model, latency_ms, flagged, metadata.
What does a successful response look like?
A JSON object: { "ok": true, "intercept": { "id": "...", "created_at": "...", "event_type": "...", "flagged": false } } with HTTP 200.
What error codes can I expect?
400 invalid payload, 401 missing/invalid API key, 429 rate limit exceeded, 500 internal error. All errors return JSON with an `error` field.
Does Gateplex work with streaming responses?
Yes. Log a single intercept after the stream completes with the assembled output, or log per-chunk if you need fine-grained tracking.
Is there an SDK?
Yes — gateplex-python on PyPI. A TypeScript SDK is on the roadmap. You can also call the REST API directly from any language.
What is the MCP server and how do I use it?
Gateplex exposes an MCP server at https://gateplex.ai/mcp with three tools: log_intercept, get_feed, check_guardrails. Install via Smithery or point your MCP client at the endpoint with your Gateplex API key as a bearer token.
How do I test my integration?
Send a test intercept with event_type 'llm_call' from curl, then check the live feed in your dashboard. You should see it appear within a second.