> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptbank.club/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Bank Quick Start: Your First API Call in 5 Minutes

> Create your first prompt and queue an AI image generation with Prompt Bank. Covers API key setup, creating a prompt, and triggering a generation.

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.

<Steps>
  <Step title="Get your API key">
    All Prompt Bank API requests require a Bearer token. To create one, sign in at [promptbank.club](https://www.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:

    ```
    Authorization: Bearer pb_live_...
    ```

    Keep your key private. Never embed it directly in client-side code or commit it to source control.
  </Step>

  <Step title="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.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X POST https://www.promptbank.club/api/v1/prompts \
        -H "Authorization: Bearer pb_live_..." \
        -H "Content-Type: application/json" \
        -d '{
          "title": "Neon cityscape at dusk",
          "prompt": "A sprawling cyberpunk city at dusk, neon signs reflecting in rain-soaked streets, cinematic lighting, ultra-detailed",
          "promptType": "image",
          "modelId": "fal-ai/recraft/v4.1/text-to-image"
        }'
      ```

      ```javascript fetch theme={null}
      const response = await fetch('https://www.promptbank.club/api/v1/prompts', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer pb_live_...',
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          title: 'Neon cityscape at dusk',
          prompt: 'A sprawling cyberpunk city at dusk, neon signs reflecting in rain-soaked streets, cinematic lighting, ultra-detailed',
          promptType: 'image',
          modelId: 'fal-ai/recraft/v4.1/text-to-image',
        }),
      });

      const data = await response.json();
      ```
    </CodeGroup>

    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.

    ```json theme={null}
    {
      "data": {
        "id": "prompt_01j9abc123def456",
        "title": "Neon cityscape at dusk",
        "prompt": "A sprawling cyberpunk city at dusk, neon signs reflecting in rain-soaked streets, cinematic lighting, ultra-detailed",
        "promptType": "image",
        "platform": null,
        "status": "active",
        "images": [],
        "vaultIds": [],
        "createdAt": "2024-11-15T10:23:00.000Z",
        "updatedAt": "2024-11-15T10:23:00.000Z"
      },
      "error": null
    }
    ```
  </Step>

  <Step title="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"`.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X POST https://www.promptbank.club/api/v1/generations \
        -H "Authorization: Bearer pb_live_..." \
        -H "Content-Type: application/json" \
        -d '{
          "modelId": "fal-ai/recraft/v4.1/text-to-image",
          "prompt": "A sprawling cyberpunk city at dusk, neon signs reflecting in rain-soaked streets, cinematic lighting, ultra-detailed",
          "generationType": "image"
        }'
      ```

      ```javascript fetch theme={null}
      const response = await fetch('https://www.promptbank.club/api/v1/generations', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer pb_live_...',
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          modelId: 'fal-ai/recraft/v4.1/text-to-image',
          prompt: 'A sprawling cyberpunk city at dusk, neon signs reflecting in rain-soaked streets, cinematic lighting, ultra-detailed',
          generationType: 'image',
        }),
      });

      const data = await response.json();
      ```
    </CodeGroup>

    The API responds immediately with `202 Accepted`. Use the `statusUrl` in the response to poll for the completed result.

    ```json theme={null}
    {
      "data": {
        "success": true,
        "clientJobId": "my-job-001",
        "falRequestId": "fal_req_abc123xyz",
        "statusUrl": "https://queue.fal.run/fal-ai/recraft/v4.1/text-to-image/requests/fal_req_abc123xyz/status"
      },
      "error": null
    }
    ```
  </Step>

  <Step title="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.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X POST https://www.promptbank.club/api/v1/prompts/prompt_01j9abc123def456/save \
        -H "Authorization: Bearer pb_live_..." \
        -H "Content-Type: application/json" \
        -d '{
          "vaultId": 42
        }'
      ```

      ```javascript fetch theme={null}
      const response = await fetch(
        'https://www.promptbank.club/api/v1/prompts/prompt_01j9abc123def456/save',
        {
          method: 'POST',
          headers: {
            'Authorization': 'Bearer pb_live_...',
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            vaultId: 42,
          }),
        }
      );

      const data = await response.json();
      ```
    </CodeGroup>

    A successful response confirms the prompt is now associated with the vault:

    ```json theme={null}
    {
      "data": {
        "id": "prompt_01j9abc123def456",
        "title": "Neon cityscape at dusk",
        "vaultIds": [42],
        "updatedAt": "2024-11-15T10:25:30.000Z"
      },
      "error": null
    }
    ```
  </Step>
</Steps>

You have now created a prompt, queued an AI image generation, and organized your work into a vault. From here, explore the [API Reference](/api-reference/overview) for the full list of endpoints or read the [Guides](/guides/manage-prompts) to learn more advanced workflows.
