Skip to main content
This guide walks you through the minimum steps to go from zero to a completed AI image generation using the Prompt Bank API. By the end you will have an API key, a saved prompt, a queued generation, and the prompt stored in a vault — all through plain HTTP requests.
1

Get your API key

All Prompt Bank API requests require a Bearer token. To create one, sign in at promptbank.club, open Account Settings, and navigate to the API Keys tab. Click Create API key, enter a descriptive name, and copy the key immediately — Prompt Bank only shows the full secret once.Pass the key in the Authorization header of every request using the format below:
Keep your key private. Never embed it directly in client-side code or commit it to source control.
2

Create your first prompt

Send a POST request to /api/v1/prompts with a JSON body that describes your prompt. The promptType field tells Prompt Bank what kind of media you intend to generate, and modelId pins the prompt to a specific model.
A successful request returns 201 Created with the new prompt object wrapped in the standard response envelope. Save the id field — you will need it in the next steps.
3

Queue a generation

With your prompt created, submit it to /api/v1/generations to kick off an AI image generation job. Include the modelId, the full prompt text, and set generationType to "image".
The API responds immediately with 202 Accepted. Use the statusUrl in the response to poll for the completed result.
4

Save your prompt to a vault

Vaults keep your prompts organized. Once you have a vault ID (create one in the dashboard or via POST /api/v1/vaults), save your prompt to it by calling the save endpoint with the prompt’s ID in the path. The vaultId must be an integer.
A successful response confirms the prompt is now associated with the vault:
You have now created a prompt, queued an AI image generation, and organized your work into a vault. From here, explore the API Reference for the full list of endpoints or read the Guides to learn more advanced workflows.