Typical vault workflow
1
Create a vault
Create a new vault by sending a
POST request to /api/v1/vaults. Supply a name, an optional description, and a visibility setting:2
Add prompts to the vault
Once you have prompt IDs, add up to 50 at a time with The response returns the updated vault with the new
POST /api/v1/vaults/{vaultId}/prompts. Use the integer id values returned when you created each prompt:promptCount.3
Set visibility to share the vault
When your vault is ready to share, update its Other users can now discover and fork your vault.
visibility with a PATCH request:Vault visibility
You can create vaults at any visibility level and change them at any time. Private vault — only you can see it:Adding prompts to a vault
UsePOST /api/v1/vaults/{vaultId}/prompts to associate existing prompts with a vault. Pass an array of integer prompt id values in promptIds. You can add up to 50 at a time:
promptIds values are the integer id fields returned when you created each prompt. You can also add a prompt directly to a vault at creation time by including a vaultId integer in the POST /api/v1/prompts body.
Removing a prompt from a vault
To remove a prompt from a vault without deleting the underlying prompt, useDELETE /api/v1/vaults/{vaultId}/prompts/{vaultPromptId}. The vaultPromptId is the ID of the vault-prompt association (returned when you add prompts), not the prompt’s own ID:
Pinning and unpinning prompts
Pinning a prompt marks it as featured within the vault. Pinned prompts are surfaced at the top of vault listings. Use thevaultPromptId — the ID of the vault-prompt association, returned when you add a prompt — not the prompt’s own id.
Pin a prompt:
200 OK response confirms the prompt is now pinned.
Unpin a prompt:
200 OK response confirms the prompt is no longer pinned.
Moving prompts between vaults
To transfer a prompt from one vault to another, usePOST /api/v1/vaults/{vaultId}/prompts/{vaultPromptId}/move with a targetVaultId integer in the body:
Forking a vault
Forking copies all prompts from apublic or unlisted vault into a new vault owned by your account. The forked vault starts as private.
public or unlisted. The original vault and its owner are not affected.
Next steps
- Learn how to run image and video generations and save outputs to a vault in the Generate Media guide.
- Need to create prompts first? See Manage Prompts.