Marnix/ Docs
PricingStudioChangelogBlogDocumentation
Sign in

01·Getting Started

Getting StartedVoice vs Text Mode

02·Building Apps

Using Voice ModeIterating on Your AppExample Prompts

03·Integrations

Integrations OverviewSupabase — Save user data & loginsStripe — Accept paymentsPostHog — Know how people use your appGitHub — Sync your codeComposio — Gmail, Slack, Calendar & more

04·Features

Marnix RemoteExporting Your CodeMarnix AI — LLM without API keys

05·Account

Credits & PlansFAQ

Features

Marnix AI — LLM without API keys

Every app you build has a built-in LLM. No OpenAI/Anthropic account needed, no key setup — it just works.

AI features with zero setup

Every app deployed through Marnix gets a built-in LLM — no OpenAI or Anthropic account required, no API keys to paste, no user dashboards to navigate. When your app needs AI (chatbot, content generator, summarizer, classifier), it calls Marnix AI and gets a streaming response. Your users never see a “paste your API key” prompt.

Marnix handles auth, rate limits, and billing. Each call costs 3 Marnix credits (~$0.03) and is deducted from your balance — the app builder's — not the end user's. That means you can ship an AI chatbot to a friend with zero friction.

What you get included

Free plan (300 credits) covers ~60 AI calls after one starter build. Pro plan (2,000 credits) covers ~500 AI calls on top of your builds. Business plan (5,000 credits) covers ~1,500+. Plenty for a working chatbot with real traffic.

How to use it in a prompt

You don't have to do anything special — just describe the AI feature you want and Marnix wires it up:

  • “Build me a chatbot that helps users plan weekly meals.”
  • “Add an AI summarize button that condenses long notes into three bullet points.”
  • “When a user pastes a URL, call an AI to extract the page title, author, and a one-line summary.”
  • “Classify every submitted ticket as 'bug', 'feature', or 'question'.”

Marnix reads the MARNIX_AI_KEY environment variable (injected at deploy time) and generates a server-side proxy route for you. You don't need to touch any of this unless you want to customize the integration.

Under the hood — the server-proxy pattern

If you export your code or want to customize the AI behavior, here's what Marnix generates. Every app has a route handler that forwards requests to Marnix AI with your key:

// app/api/chat/route.ts export async function POST(req: Request) { const { messages } = await req.json() const res = await fetch('https://marnix.ai/api/marnix-ai/chat', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.MARNIX_AI_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ messages, stream: true }), }) return new Response(res.body, { headers: { 'Content-Type': 'text/plain; charset=utf-8' }, }) }

Your browser code calls /api/chat (your own route), never marnix.ai/api/marnix-ai/chat directly. That keeps the key off the browser where anyone could steal it.

Three example patterns

1. Streaming chatbot

Perfect for conversational UIs — responses stream word-by-word so the UI feels alive.

// Client component const res = await fetch('/api/chat', { method: 'POST', body: JSON.stringify({ messages: [ { role: 'system', content: 'You are a helpful meal-planning assistant.' }, { role: 'user', content: userInput }, ], }), }) const reader = res.body!.getReader() const decoder = new TextDecoder() let acc = '' while (true) { const { done, value } = await reader.read() if (done) break acc += decoder.decode(value, { stream: true }) setReply(acc) }

2. Single-shot content generation

For summarizers, rewriters, or any one-shot generation where streaming isn't needed. Set stream: false and you get JSON with token usage and remaining credits.

// Server route const res = await fetch('https://marnix.ai/api/marnix-ai/chat', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.MARNIX_AI_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ messages: [{ role: 'user', content: `Summarize in 3 bullets: ${text}` }], stream: false, maxTokens: 512, }), }) const { message, creditsRemaining } = await res.json() // message = "• First bullet\n• Second bullet\n• Third bullet"

3. Classifier / extractor

Use a strict system prompt to get structured output. Parse the result as JSON.

const res = await fetch('https://marnix.ai/api/marnix-ai/chat', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.MARNIX_AI_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ system: 'Reply with ONLY one JSON object: { "category": "bug" | "feature" | "question", "urgency": 1-5 }. No prose.', messages: [{ role: 'user', content: ticketText }], stream: false, maxTokens: 128, }), }) const { message } = await res.json() const classification = JSON.parse(message) // { category: "bug", urgency: 4 }

Request options

  • messages — array of { role, content }. Roles: user, assistant, system. Up to 100 messages per call.
  • system — optional top-level system prompt (alternative to a system-role message).
  • stream — true (default) returns plain-text chunks; false returns a full JSON response.
  • maxTokens — max output tokens. Default 1,024. Hard cap 4,096.

Error handling

Non-2xx responses return JSON with an error code and a human-readable message:

  • 402 insufficient_credits — the builder is out of Marnix credits. Show a clear empty state like “This app is out of AI credits. Try again later.” The response includes creditsRemaining.
  • 429 rate_limit_exceeded — per-app caps are 60 calls/minute and 5,000 calls/day. Response includes limit: 'minute' | 'day'. Retry after the window clears.
  • 401 invalid_api_key — the MARNIX_AI_KEY is missing or invalid. Rare — usually means the deploy didn't complete or the app was deleted. Re-deploy to fix.
  • 400 bad_request — malformed JSON, missing messages, or bad role. Fix the request shape.

Security — the one rule

Never put MARNIX_AI_KEY in client code

The key is server-only. If you ever put it in a NEXT_PUBLIC_* env var or reference it in a 'use client' component, anyone can steal it from the browser and burn your credits. Always proxy through a server-side route. Marnix generates the proxy for you by default — keep it that way.

Model & reliability

Marnix AI uses Claude Haiku 4.5 via the Vercel AI Gateway. Haiku is fast (streaming kicks in within ~400ms) and handles the vast majority of chatbot / summarizer / classifier use cases cleanly. The Gateway adds automatic failover — if Anthropic has an outage, requests route through a fallback provider without code changes.

We'll add more model tiers (including Sonnet for harder reasoning) in a future update. For now, one model keeps the pricing clean: 3 credits, every call.

Marnix

Build apps at the speed of voice. Talk to Marnix, watch it ship.

Product

  • Pricing
  • Changelog
  • Studio
  • Status

Resources

  • Documentation
  • Integrations
  • Blog
  • Ideas

Company

  • Support
  • Contact
  • Privacy
  • Terms

© 2026 Skylark Technologies B.V.

Singel 542 · 1017AZ Amsterdam·KVK 96454121