Connect your agent to Sunra
Connecting takes one URL and a browser sign-in. There is no API key to create — Sunra MCP signs in with your Sunra account, so the whole setup is: point your client at the server, allow it, and start asking.
Start on the MCP page
Open the Sunra MCP page, or MCP → Connect inside the product, and pick your tool under Choose your AI tool. That tab carries the two things you need: the server URL as a field you can copy, and your client's own steps.
Take the URL from that page rather than from anywhere else: it always shows the one your account should use.
Claude Code, Codex, Cursor, Antigravity and Grok Bot
These five share one setup prompt, because the agent does the work itself.
- Copy the setup prompt from your tool's tab.
- Paste it into the agent and send it.
- The agent installs the Sunra CLI from npm (the
@sunra/clipackage) and runssunra login. sunra loginopens your browser. Sign in to Sunra and click Allow on the consent page.- The agent then runs
sunra whoami,sunra balance --jsonandsunra tools, and tells you which account is connected, what your balance is and what it can make.
If your agent runs somewhere without a browser — a remote box, a sandbox, a terminal session you reached over SSH — the consent page gives you an authorization code instead. Copy it back to the agent and it finishes the sign-in with that.
Claude and ChatGPT
These two add Sunra as a connector in their own settings, so the steps live in the app rather than in a prompt.
Claude
- On Claude's tab, click Add Sunra to Claude. Claude opens its Add custom connector dialog with the name and the server URL already filled in. Review them and click Add.
- Click Connect, sign in to Sunra, and click Allow.
- Start a new chat and ask for an image, a video, music or a 3D model.
To do it by hand instead, go to Customize → Connectors → Add custom connector in Claude and paste the URL from the MCP page.
ChatGPT
- Click Open ChatGPT Plugins on ChatGPT's tab.
- In Plugins, click +, choose Add custom MCP server, name it Sunra and paste the server URL.
- Choose OAuth, accept the warning, and click Create as a plugin.
- Install the plugin from Personal. When ChatGPT asks, sign in to Sunra and click Allow.
Any other MCP client
Any client that supports remote MCP servers with OAuth sign-in can connect: add a custom or remote server, give it the URL from the MCP page, choose OAuth rather than a token or header, and complete the browser sign-in when it prompts you. Clients differ in where that lives — look under MCP, connectors, plugins or integrations in their settings.
What this connection is for
This is Creative access, paid for with credits. You can ask your assistant to complete a creative task with a defined scope and end condition, including scripts or multiple outputs, without staying present throughout. Your authorisation and spending-confirmation settings still apply.
Unless Sunra agrees otherwise in writing, independent production programs that repeatedly accept data or generation requests, scheduled or business-triggered workflows, and software integrations must use the Sunra API, even for personal or internal use. Manual starts or using an agent do not exempt them. See the examples and Terms before setting up automation.
What you are agreeing to
The consent page names the app that is asking and what it will be able to do: make images, video and audio with your credits, and see your balance and history. It stays connected until you disconnect it.
If you are in a team, decide which balance should pay before you start generating. Your agent can list the teams you belong to and select one; until it does, it works against your personal credits.
Check that it works
Ask the agent, in plain words, to check its Sunra connection. A healthy setup can answer three things:
- Which account it is signed in as
- What your balance is
- What it can make — the list of Sunra tools it can see
In the CLI clients that is sunra whoami, sunra balance --json and sunra tools. In Claude or ChatGPT, asking for your balance is enough: an answer means the connector is live. Then try one image and check it lands in a project in your account — if it fails, see Troubleshooting generations.
Reconnect or disconnect an app
Both live under Your connected apps on the Connect page, which lists every app you have allowed and when it last used your account.
- Reconnect — a connection can expire. The page says so, and reconnecting is the same sign-in again: for a CLI client, re-send the setup prompt to the agent you used; for Claude or ChatGPT, connect Sunra again in its own settings.
- Disconnect — click Disconnect on the row. That app loses access to your Sunra account right away. To use it again, connect it and allow it again.
Disconnecting an app doesn't touch anything it already made: the projects and files stay in your account.