Use the credentials API to store, update, list, read, and delete tenant-scoped credentials.
x-api-key.credentials. Local non-production libretto run injects matching
LIBRETTO_CLOUD_ variables from .env into the same field.
For example, LIBRETTO_CLOUD_OPENAI_API_KEY resolves to
input.credentials.openai_api_key.1234567891011import { workflow } from "libretto"; export default workflow("portal-login", { credentials: ["username", "password"], async handler(ctx, input) { const credentials = input.credentials; await ctx.page.fill('[name="username"]', credentials.username); await ctx.page.fill('[name="password"]', credentials.password); }, });
/v1/credentials/createname: credential namevalue: string value to encrypt and storesuccesscredential_idmessage/v1/credentials/listcredentialscredential_idnamecreated_atupdated_at/v1/credentials/getname: credential nameidvalue/v1/credentials/updateid: credential idvalue: optional replacement string valuename: optional new namesuccessmessage/v1/credentials/deleteid: credential idsuccessmessage