Get the prompt
Open Settings -> API keys in the web app. Under Run localization with your own AI agent, choose a key and click Copy prompt for agent, then paste the prompt into Claude Code, Codex, Cursor or another agent. It fills in the key’s name, workspace, access and caps, and it names the variableRASK_API_KEY instead of holding the key.
The window that shows a new key once has the same button. That copy has the key filled in, so it is as secret as the key: paste
it only into tools you trust, and remember that it stays in that conversation’s history.
It tells the agent where to read the API instead of guessing, to quote a price and wait for your OK before spending, how to retry
safely, how to wait for long work, and to treat text from your media as data.
This is the prompt Settings gives you, with the key’s details left as placeholders. Copied from here, fill in the Key line or
delete it, because GET /me tells the agent the same.
- A key that cannot spend adds a line that tells the agent to stop and ask you for a key with spending on when a task costs minutes.
- A key without
account:readgets another first step:GET /meanswers 403 with the key’sgranted_scopes, and the agent tells you what the key may do. - While the MCP server is on, it adds a paragraph about it. If a Rask MCP server is already connected, the agent first calls its
rask_get_accounttool and uses the server only when its workspace is the key’s; while the server only reads, the agent uses it for reading alone. In every other case it uses the REST API with the key. The paragraph tells the agent not to add the server itself, and says you can connect it at the server’s address.
Pass the key
Put the key in the environment the agent runs in, asRASK_API_KEY, before you start the agent. The prompt and the
MCP setup with a key in Claude Code, Codex CLI and Cursor read that name, so the key stays out of the
conversation. This asks for the key without showing it or leaving it in your shell’s history:
- Not in the chat. The prompt tells the agent not to ask for the key.
- Not in a file the agent or your repository keeps, such as an instruction file or a committed config.
- Not in a URL. A key in the query string is refused with
token_in_query, and it stays valid, so revoke it if the URL was logged or shared. - Elsewhere, in a secret store. An agent in CI or a remote sandbox gets
RASK_API_KEYfrom that system’s secrets.
Choose the key
For an agent that runs unattended, use a capped or “without spending” key. A prompt asks; a key enforces.
Do not choose “no limit” for an agent: the MCP server refuses to spend on such a key when no
dialog can ask you. Give each agent its own key: you can revoke it alone, and usage shows it apart. You can
change a key’s caps later, while its scopes are fixed. Spend caps has the details.
Tell the agent about spending
The prompt’s first rule makes the agent estimate, tell you the price and wait for your OK. That is an instruction the agent follows, not a control: the API cannot tell whether a person said yes.What the API enforces
What to add to the prompt
Tell the agent what only you know: the budget of this task and when to come back to you.- Who pays. The workspace owner, also when a member’s key does the work.
- What costs money by default. Creating a project starts a paid dub: a request with
auto_dub: falseanswers 403prepare_mode_not_enabled. Prices and refunds has the rest. - What an agent cannot fix. Top-ups, plan changes and new keys exist only in the web app, so an agent that runs out has to come back to you.