Skip to main content
Clients send the same OpenAI Files requests they would send to OpenAI. Auth and the consumer slug are the same as chat.
List, retrieve, download, and delete use the same host and key:
On a Private data plane, add X-AG-Gateway-Slug as in the chat snippets. Wrong methods are 400. Extra path tails (/files/{id}/other) are 404. TrustGate does not rewrite the multipart body and does not own file identity or retention — upstream file IDs are returned as-is. OpenAI SDKs use the same consumer base URL: client.files.create(), list(), retrieve(), content(), and delete().

Providers

Custom / OpenAI-compatible, Groq, Gemini / Vertex, Bedrock, Cohere, and other chat-only providers do not expose a Files store. They are left out of the candidate pool. Anthropic Files is GA on the Claude API — TrustGate does not send the old files-api-2025-04-14 beta header. The response is Anthropic-shaped (type, mime_type, size_bytes); it is not rewritten to OpenAI object / purpose. purpose is optional. Claude Files is not available on Bedrock or Vertex. Gemini files.upload uses a different wire format and is out of scope. A JSON model field (including @provider/model) is used only to pin a registry. Upload itself is multipart and has no model rewrite.

Routing

  1. The consumer’s registries are filtered to those that advertise files.
  2. Model resolution and load balancing run on that pool.
  3. Pinning a registry that cannot store files is a 400, not a failover.
  4. An empty capable pool is a 503.
Attach at least one files-capable registry to the consumer. A mixed chat + files pool is fine: chat still uses every chat-capable member; files skip the rest.