Skip to main content
The AI proxy lets your app call Anthropic, OpenAI, and Gemini through Major. You use each provider’s official SDK as usual, but point it at the proxy and authenticate with the app’s Major token instead of a provider API key. Usage is billed at cost against your organization’s credits and shows up in the usage dashboard.

Example requests

  • “Add a Summarize button that uses Claude to summarize the selected ticket.”
  • “Classify each new lead as hot, warm, or cold with GPT and store the label.”
  • “Generate a product image from the description field with Gemini.”

Enable it for an app

The proxy is enabled per app. When you enable it, the app gets a default monthly spending limit of $10.
Open the app in the editor, go to the Settings tab, and turn on Enable AI proxy for this app in the AI Proxy section. You can change the monthly spending limit there.

Use it in your code

Two environment variables are available in the app’s runtime, in the editor preview, and after deploy: Call the proxy from server code only, so the token never reaches the browser. Use the provider’s own SDK, not a unified SDK, and never hard-code keys or proxy URLs.
For Gemini, set httpOptions.baseUrl to the /genai prefix only. The SDK adds /v1beta/models/... itself. Streaming (generateContentStream) and token counting (countTokens) use the same client.

Images and audio

Image endpoints are stateless: input images live only in that request’s body, and nothing is stored on the server.

Supported endpoints

Only these endpoints are available. Any other path returns endpoint_not_allowed. Not supported: embeddings, video generation, file uploads, the OpenAI Assistants API, and Gemini cached contents, tuning, and the Live API.

Spending limits and errors

Each request is checked before it reaches the provider: The monthly limit counts only this app’s proxy usage and resets at the start of each month.
Agents and the Platform Agent choose their models separately. See agent models and Settings > Models.