Docs

Calling APIs: Connections

An app can call OpenAI, Anthropic, Google Gemini, Resend (email) or another API with your key, without the key ever being in the app. Paste the key on the app's Connections page in the dashboard (Claude's add_connection gives you a link to it), then call the API through Makeship:

const res = await box.fetch("openai", "/v1/chat/completions", {
  method: "POST",
  body: { model: "gpt-4.1-mini", messages, stream: true },
});
for await (const e of res.events()) { /* streamed as it arrives */ }

Makeship adds the key on the way out and only ever sends it to that API's own address. Only visitors with an account (guests included) can make calls.

Limits you set

Each Connection has a Limits page, so a busy app or one eager visitor can't run up your bill:

SettingWhat it doesDefault
Calls per visitor per hourEach visitor's calls in one clock hour30 for AI, 5 for email, 60 for custom
Calls per monthAll visitors together, reset on the 1st (UTC)3,000 for AI, 300 for email, 10,000 for custom
Max tokens per callA call asking for more is held to this2,048 for AI
Model, or From for emailEvery call uses it, whatever the app asks forThe app chooses
Other fixed fieldsAny top-level body fields to set on every call, as JSONNone

When a limit is reached, box.fetch throws an error with a code (visitor_limit or monthly_limit), a message you can show, and retryAfter in seconds. The API's own errors come back as a normal response. Outside Makeship, box.fetch throws not_on_boxfort, since your keys only live here.