Calling providers
<METHOD> https://api.sociaro.com/<provider>/<provider-native-path>The first path segment selects the provider; everything after it is the provider’s own API path, forwarded verbatim.
| Provider | Prefix | Auth header | Upstream API |
|---|---|---|---|
| OpenAI | /openai | Authorization: Bearer | api.openai.com |
| Anthropic | /anthropic | x-api-key | api.anthropic.com |
| Alibaba (DashScope) | /alibaba | Authorization: Bearer | DashScope |
| BytePlus (Ark) | /byteplus | Authorization: Bearer | BytePlus Ark |
| MuleRouter | /mulerouter | Authorization: Bearer | MuleRouter |
(The exact provider list for your organization may differ — GET /gw/me
shows which providers your key is entitled to.)
Transparency guarantees
Section titled “Transparency guarantees”- Request and response bodies are never modified — what the provider sends is what you receive, byte-for-byte.
- SSE streaming is passed through unbuffered; time-to-first-token is the provider’s own.
- Provider errors (4xx/5xx) are forwarded as-is — your provider-specific error handling keeps working.
- The only header the gateway touches is the provider auth header (replaced
with the real credential).
traceparentand all other headers pass through.
Gateway-added response header
Section titled “Gateway-added response header”| Header | Meaning |
|---|---|
X-Gateway-Request-Id | Unique ID (ULID) for every request. Include it when contacting support — it links directly to logs and usage records. |
Errors the gateway returns itself
Section titled “Errors the gateway returns itself”Before forwarding, the gateway enforces auth, entitlements, rate limits and
budgets — see the error contract for the full table
(401, 403, 429, 402, 502/504).
Attribution
Section titled “Attribution”Tag any request with metadata for cost allocation; tags become dimensions in
GET /gw/stats:
- Canonical headers (configured per deployment):
X-Project,X-Department,X-Persona, … - Arbitrary tags: any
X-Attr-<name>header, e.g.X-Attr-Team: growth,X-Attr-Feature: chat— stored under the lowercased<name>.
curl https://api.sociaro.com/openai/v1/chat/completions \ -H "Authorization: Bearer gw_live_..." \ -H "X-Project: alpha" \ -H "X-Attr-Feature: onboarding" \ -d '{...}'Then:
curl "https://api.sociaro.com/gw/stats?group_by=feature&since=7d" \ -H "Authorization: Bearer gw_live_..."Long-running media jobs
Section titled “Long-running media jobs”Video/image/3d generation endpoints (BytePlus Seedance, Alibaba Wan, MuleRouter, …) follow the same proxy model but have an asynchronous create→poll lifecycle with its own billing semantics — see async jobs.