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

# Quick Start Guide

> Get up and running with the Gather API in minutes

## Get Started in 5 Minutes

This guide will walk you through making your first API request to the Gather API.

<Steps>
  <Step title="Get your API key">
    Contact your Qualifi administrator to obtain your API key (prefixed with `qapi_`).

    <Callout type="info">
      API credentials are created via Eucalyptus (internal admin tool). If you don't have access, contact your Qualifi administrator.
    </Callout>
  </Step>

  <Step title="Set up authentication">
    Configure your HTTP client with the `x-api-key` header. Simply include your API key in the header:

    ```
    x-api-key: your-api-key-here
    ```

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        # Set your API key
        API_KEY="qapi_your-api-key-here"
        ```
      </Tab>

      <Tab title="JavaScript">
        ```javascript theme={null}
        const apiKey = 'qapi_your-api-key-here';
        ```
      </Tab>

      <Tab title="Python">
        ```python theme={null}
        api_key = 'qapi_your-api-key-here'
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Make your first request">
    Retrieve your questions using the GET questions endpoint:

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl -X GET https://api.prod.qualifi.hr/qsi/gather/questions \
          -H "x-api-key: ${API_KEY}" \
          -H "Content-Type: application/json"
        ```
      </Tab>

      <Tab title="JavaScript">
        ```javascript theme={null}
        const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/questions', {
          headers: {
            'x-api-key': apiKey,
            'Content-Type': 'application/json'
          }
        });

        const data = await response.json();
        console.log(data);
        ```
      </Tab>

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

        response = requests.get(
            'https://api.prod.qualifi.hr/qsi/gather/questions',
            headers={
                'x-api-key': api_key,
                'Content-Type': 'application/json'
            }
        )

        data = response.json()
        print(data)
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Create your first question">
    Create a question with text-to-speech audio generation:

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl -X POST https://api.prod.qualifi.hr/qsi/gather/questions \
          -H "x-api-key: ${API_KEY}" \
          -H "Content-Type: application/json" \
          -d '{
            "title": "Tell me about yourself",
            "questionScript": "Tell me about yourself and your background.",
            "generateAudio": true
          }'
        ```
      </Tab>

      <Tab title="JavaScript">
        ```javascript theme={null}
        const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/questions', {
          method: 'POST',
          headers: {
            'x-api-key': apiKey,
            'Content-Type': 'application/json'
          },
          body: JSON.stringify({
            title: 'Tell me about yourself',
            questionScript: 'Tell me about yourself and your background.',
            generateAudio: true
          })
        });

        const question = await response.json();
        console.log('Question created:', question.data);
        ```
      </Tab>

      <Tab title="Python">
        ```python theme={null}
        response = requests.post(
            'https://api.prod.qualifi.hr/qsi/gather/questions',
            headers={
                'x-api-key': api_key,
                'Content-Type': 'application/json'
            },
            json={
                'title': 'Tell me about yourself',
                'questionScript': 'Tell me about yourself and your background.',
                'generateAudio': True
            }
        )

        question = response.json()
        print('Question created:', question['data'])
        ```
      </Tab>
    </Tabs>

    <Callout type="info">
      Audio generation is asynchronous. The initial response includes the question, and the `audioUrl` will be populated when audio generation completes. You can use webhooks to be notified when audio is ready.
    </Callout>
  </Step>

  <Step title="Create your first interview">
    Create an interview with your questions:

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl -X POST https://api.prod.qualifi.hr/qsi/gather/interviews \
          -H "x-api-key: ${API_KEY}" \
          -H "Content-Type: application/json" \
          -d '{
            "title": "Software Engineer Interview",
            "displayName": "Software Engineer Interview",
            "interviewType": "standard",
            "questionIds": ["question-id-from-step-4"]
          }'
        ```
      </Tab>

      <Tab title="JavaScript">
        ```javascript theme={null}
        const response = await fetch('https://api.prod.qualifi.hr/qsi/gather/interviews', {
          method: 'POST',
          headers: {
            'x-api-key': apiKey,
            'Content-Type': 'application/json'
          },
          body: JSON.stringify({
            title: 'Software Engineer Interview',
            displayName: 'Software Engineer Interview',
            interviewType: 'standard',
            questionIds: ['question-id-from-step-4']
          })
        });

        const interview = await response.json();
        console.log('Interview created:', interview.data);
        ```
      </Tab>

      <Tab title="Python">
        ```python theme={null}
        response = requests.post(
            'https://api.prod.qualifi.hr/qsi/gather/interviews',
            headers={
                'x-api-key': api_key,
                'Content-Type': 'application/json'
            },
            json={
                'title': 'Software Engineer Interview',
                'displayName': 'Software Engineer Interview',
                'interviewType': 'standard',
                'questionIds': ['question-id-from-step-4']
            }
        )

        interview = response.json()
        print('Interview created:', interview['data'])
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

## What's Next?

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/questions">
    Explore all available endpoints and their parameters
  </Card>

  <Card title="Guides" icon="book" href="/guides/creating-first-interview">
    Learn how to create interviews and send invites
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api-reference/webhooks">
    Set up webhooks for real-time event notifications
  </Card>

  <Card title="Code Examples" icon="code" href="/code-examples">
    Browse code examples in multiple languages
  </Card>
</CardGroup>

## Common Issues

<AccordionGroup>
  <Accordion title="401 Unauthorized Error">
    Check that your API key is correct and included in the `x-api-key` header.
    Verify the API key is prefixed with `qapi_` and hasn't been revoked.
  </Accordion>

  <Accordion title="404 Not Found">
    Verify you're using the correct base URL and endpoint path. All endpoints
    are prefixed with `/qsi/gather/`.
  </Accordion>

  <Accordion title="429 Too Many Requests">
    You've exceeded the rate limit. Check the `X-RateLimit-Remaining` header and
    wait until the reset time indicated in `X-RateLimit-Reset`.
  </Accordion>
</AccordionGroup>
