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

# Authentication

> How to authenticate with the Veritus Search API

All API endpoints require authentication using an API key. Include your API key in the Authorization header:

```
Authorization: Bearer YOUR_API_KEY
```

## Getting Your API Key

To obtain an API key, you have two options:

1. **Create an account**: Visit [discover.veritus.ai](https://discover.veritus.ai), create an account, and grab your API key from the dashboard.
2. **Contact support**: Reach out to [support@veritus.ai](mailto:support@veritus.ai) for assistance.

<Note>
  We are currently only accepting academic email addresses for account registration.
</Note>

## Usage Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X GET "https://discover.veritus.ai/api/v1/user/getCredits" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python python theme={null}
  import requests

  response = requests.get(
      "https://discover.veritus.ai/api/v1/user/getCredits",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  print(response.json())
  ```

  ```javascript javascript theme={null}
  const response = await fetch(
    "https://discover.veritus.ai/api/v1/user/getCredits",
    {
      headers: {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go go theme={null}
  package main

  import (
      "fmt"
      "net/http"
      "io"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://discover.veritus.ai/api/v1/user/getCredits", nil)
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>

## Important Notes

* Always keep your API key secure and never expose it in client-side code
* Include the `Bearer` prefix before your API key
* The API key must be included in every request
