set_site_secret
Save a secret for a site’s server code
Description
Save a secret (an API key) for a hosted site's server code: key in UPPER_CASE, value. Write-only: the value is never shown again, and the site's functions/_worker.js reads it as env.<KEY>. Never put secrets in page files, which are public. Needs a paid plan or a funded balance. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
namerequired | string | the page name, which is its address: spring-sale is served at https://spring-sale.hermoso.page |
keyrequired | string | e.g. STRIPE_SECRET_KEY |
valuerequired | string | the secret itself |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/set_site_secret.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"set_site_secret","arguments":{"name":"<string>","key":"<string>","value":"<string>"}}}
CLI
hermoso call set_site_secret --json '{"name":"<string>","key":"<string>","value":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
disconnect_domainDisconnect a domain from a pagedelete_site_secretDelete a site secretdomain_statusCheck a connected domainrollback_pageRoll a hosted project backconnect_domainServe a page on your own domainlist_site_usageHosting usage of hosted projectsunpublish_pageTake a hosted page offlineset_site_spend_capCap hosting spendget_pageRead a hosted pageexport_siteDownload a hosted project as a zip