REFERENCE

Gateway inference

Your app calls Sunesix's models with your own PartnerAppApiKey instead of holding a provider credential. This is the same funnel every human chat turn goes through — one hop fewer, not a second, ungoverned path.

Request

POST /partner-apps/ai/chat/
{
  "model_id": "claude-sonnet-5",
  "prompt": "Summarize this week's flagged conversations."
}
200 response
{
  "success": true,
  "data": {
    "text": "...",
    "model": "claude-sonnet-5",
    "provider": "anthropic",
    "usage": { "input_tokens": 812, "output_tokens": 140 }
  }
}

Allowed models

Requires the ai.invoke capability, and model_id must be in your app's allowed_models list — a Superadmin sets that list at approval, not you. Requesting a model outside it returns 403 model_not_allowed.

Who pays

Whether the installing company's balance or your own developer balance is charged for tokens is an inference-billing setting a reviewer sets per app, alongside a monthly cap. A developer-pays app burns real tokens whatever its retail price is — including a free one — so check your billing mode before assuming a free listing costs you nothing.

Outbound guardrail signature

If your app is OUTBOUND-capable, Sunesix calls your endpoint the mirror-image way: every request carries an X-Insights-Signature header, HMAC-SHA256 over the body using your outbound_secret. Verify it before trusting a call claims to be from Sunesix.

Your endpoint receives
{
  "company_id": 4,
  "prompt": "...",
  "phase": "input"
}
Your endpoint returns
{ "allow": true }