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

# Authorization

> Use API keys in the Authorization header to access ModelRunner APIs.

## Authorization

All API requests require an API key and must include it using the Key scheme in the `Authorization` header.

<Steps>
  <Step title="Create an API key">
    Go to your ModelRunner Dashboard, open <b>Profile</b> → <b>Keys</b>, and select <b>Create key</b>.

    <Tip>
      Give your key a descriptive name and minimal required permissions.
    </Tip>
  </Step>

  <Step title="Copy and store the key securely">
    Copy the generated key value (for example, <code>modelrunner\_key</code>) and store it in your password manager or environment variables.

    <Warning>
      Treat API keys like passwords. Do not commit them to version control.
    </Warning>
  </Step>

  <Step title="Use the key in request headers">
    Include the key using the <code>Authorization</code> header with the Key scheme:

    ```bash theme={null}
    Authorization: Key modelrunner_key
    ```

    <CodeGroup>
      ```bash cURL theme={null}
      curl -H "Authorization: Key modelrunner_key" \
           https://queue.modelrunner.run/bytedance/sdxl-lightning-4step/requests/FeLpfyrYRTXxsY7EB7Ehy
      ```

      ```javascript Node.js theme={null}
      import fetch from 'node-fetch';

      const res = await fetch('http://queue.modelrunner.run/bytedance/sdxl-lightning-4step/requests/FeLpfyrYRTXxsY7EB7Ehy', {
        headers: { Authorization: 'Key modelrunner_key' }
      });
      ```
    </CodeGroup>

    <Check>
      You should receive a 200 response when the header is set correctly.
    </Check>
  </Step>
</Steps>
