Create a read-only API key
create_api_keyGenerate a read-only API key so a website can read a project's published content. The key is returned once, so store it immediately.
Instructions
Mints the credential a website reads this project with. IMPORTANT: the response carries the whole key exactly once. Show it to the person and tell them to put it in their environment — it cannot be retrieved afterwards. The key is read-only and returns published content only, so it is safe in a server environment; it is NOT safe in browser code unless the project has an allowed-origins list configured. Prefer this over handing a site the agent token, which can write and delete. Requires the apikey.write grant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What this key is for, so a list of them is readable a year later. | |
| projectId | Yes | The project id, as `prj_...`. |