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

# Quickstart

> Get started with the Firemoon Studio API in minutes

## Get started in three steps

Generate your first AI image with the Firemoon Studio API.

### Step 1: Create your API key

<AccordionGroup>
  <Accordion icon="key" title="Create API key in dashboard">
    Create your API key directly from the Firemoon Studio dashboard:

    1. Sign in to [Firemoon Studio](https://firemoon.studio)
    2. Navigate to the [API Keys page](https://firemoon.studio/keys)
    3. Click "Add key" and provide a description
    4. Copy your API key immediately - you won't be able to see it again!

    <Button href="https://firemoon.studio/keys">
      Go to API Keys
    </Button>

    <Tip>You can create multiple API keys for different environments (development, staging, production).</Tip>
  </Accordion>
</AccordionGroup>

### Step 2: Make your first API call

<AccordionGroup>
  <Accordion icon="code" title="Generate an image with FLUX">
    Generate your first image:

    <CodeGroup>
      ```javascript title="JavaScript" theme={null}
      const response = await fetch('https://firemoon.studio/api/v1/flux/dev', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          prompt: 'A beautiful sunset over mountains',
          num_images: 1,
          image_size: 'landscape_4_3',
          guidance_scale: 3.5
        })
      });

      const result = await response.json();
      console.log('Generated image:', result.images[0].url);
      ```

      ```python title="Python" theme={null}
      import requests

      response = requests.post(
          'https://firemoon.studio/api/v1/flux/dev',
          headers={
              'Authorization': 'Bearer YOUR_API_KEY',
              'Content-Type': 'application/json'
          },
          json={
              'prompt': 'A beautiful sunset over mountains',
              'num_images': 1,
              'image_size': 'landscape_4_3',
              'guidance_scale': 3.5
          }
      )

      result = response.json()
      print('Generated image:', result['images'][0]['url'])
      ```
    </CodeGroup>

    <Tip>Replace `YOUR_API_KEY` with the API key you created in your dashboard.</Tip>
  </Accordion>

  <Accordion icon="video" title="Generate a video with Kling">
    Create a short video with our Kling integration:

    <CodeGroup>
      ```javascript title="JavaScript" theme={null}
      const response = await fetch('https://firemoon.studio/api/v1/kling/kling-2-1-master', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          prompt: 'A butterfly emerging from its chrysalis',
          duration: '5',
          aspect_ratio: '16:9'
        })
      });

      const result = await response.json();
      console.log('Generated video:', result.videos[0].url);
      ```

      ```python title="Python" theme={null}
      import requests

      response = requests.post(
          'https://firemoon.studio/api/v1/kling/kling-2-1-master',
          headers={
              'Authorization': 'Bearer YOUR_API_KEY',
              'Content-Type': 'application/json'
          },
          json={
              'prompt': 'A butterfly emerging from its chrysalis',
              'duration': '5',
              'aspect_ratio': '16:9'
          }
      )

      result = response.json()
      print('Generated video:', result['videos'][0]['url'])
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Next steps

Now that you've made your first API call, explore:

<CardGroup cols={2}>
  <Card title="API Reference" icon="terminal" href="/api-reference/overview">
    Complete API documentation with all endpoints.
  </Card>

  <Card title="Provider Guides" icon="layers" href="/providers/overview">
    Learn about FLUX, Ideogram, Kling, and other providers.
  </Card>

  <Card title="Authentication" icon="shield" href="/essentials/authentication">
    Best practices for API key management.
  </Card>

  <Card title="Error Handling" icon="alert-triangle" href="/essentials/error-handling">
    Handle errors and edge cases gracefully.
  </Card>
</CardGroup>

<Warning>
  **Need help?** Contact us at [hi@firemoon.studio](mailto:hi@firemoon.studio).
</Warning>
