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:
| Setting | What it does | Default |
|---|---|---|
| Calls per visitor per hour | Each visitor's calls in one clock hour | 30 for AI, 5 for email, 60 for custom |
| Calls per month | All visitors together, reset on the 1st (UTC) | 3,000 for AI, 300 for email, 10,000 for custom |
| Max tokens per call | A call asking for more is held to this | 2,048 for AI |
| Model, or From for email | Every call uses it, whatever the app asks for | The app chooses |
| Other fixed fields | Any top-level body fields to set on every call, as JSON | None |
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.