AI & API Proxy


The Nullshot API proxy is one endpoint in front of every AI model and provider API. It injects the platform's provider credentials (your code never holds a provider key), enforces your usage limits, and records billing. Inside a jam it's automatic and invisible; from your own code you use one Nullshot API key.

Inside a Nullshot app — nothing to set up

Generated apps get two bindings automatically. You never see a key or an endpoint.

ts

env.NULLSHOT_API also exposes video(...), getMedia(taskId), and models(...) (list selectable models for a picker). For anything not covered, env.NULLSHOT_API.fetch(url) forwards to the proxy — pass a relative /ai-gateway/{provider}/... path or a real provider URL.

From your own code — one API key

Outside a jam (a script, a CRM, your own service), create a key at Account → API Keys, then call the proxy directly. It's OpenAI/Anthropic-SDK compatible — just change the base URL and send the key.

bash
ts

Your key carries a monthly spend cap and is billed to your account. No provider keys, ever.

Vision, images, video

  • Vision (read a screenshot): send an image to a vision model (e.g. claude-opus-4-8). The proxy forwards the request body unchanged, so provider-native image inputs pass through.
  • Images / video: the /runware/... route (or env.NULLSHOT_API.image() / .video() in an app).
  • Search / retrieval: the /exa/... route.

Discover models & the full contract

  • Models: GET https://api.nullshot.ai/models?audience=agent (public). Read selectableModels for picker-ready models across text/image/video, each with its routing.
  • Full request contract: GET https://api.nullshot.ai/contract (public) — every route, auth, and body shape in one JSON payload.

Auth reference

| Where | What you send | |---|---| | Inside a jam app | Nothing — env.NULLSHOT_API / env.AI are injected | | Your own code | x-api-key: nsk_... (or Authorization: Bearer nsk_...) |

That's it — ask the proxy, and it handles credentials, limits, and billing for you.