> ## 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.

# Credits System

> Understanding how credits work in the Veritus Search API

## Credits Deduction

Credits are automatically deducted when a job is created. The deduction happens before the job is queued. Veritus has three credit pools: **Basic**, **Pro**, and **Private Key**.

* **How many credits does a job cost?**
  * You’re charged **1 credit per 100 results requested**
  * Examples: `limit=100` → 1 credit, `limit=200` → 2 credits, `limit=300` → 3 credits
* **Which credit pool is used?**
  * If `scraperKey` is provided: Uses **Private Key Credits** (`privateKeyCreditsBalance`) and enrichment is always enabled
  * If `scraperKey` is not provided and `enrich=true`: Uses **Pro Credits** (`proCreditsBalance`)
  * If `scraperKey` is not provided and `enrich=false`: Uses **Basic Credits** (`basicCreditsBalance`)
* **Insufficient Credits**: If you don't have enough credits, the request will fail with a `403 Forbidden` error:

  ```
  {
    "error": "Insufficient credits"
  }
  ```

## Important Notes

* Credits are deducted immediately when a job is created (before queuing)
* Credits required = 1 credit per 100 results requested (e.g., limit 100 = 1 credit, limit 200 = 2 credits, limit 300 = 3 credits)
* Pro credits are used when `enrich=true`, Basic credits when `enrich=false`, and Private Key credits when `scraperKey` is provided
* Always check your credit balance using the [Get User Credits](/learn/search-api/user-credits) endpoint before creating jobs
* If job creation fails due to insufficient credits, no credits are deducted

## Private Key Credits

Private Key lets you bring your own Firecrawl API key via `scraperKey` when creating a job.

* `scraperKey` is optional, but if provided it must be a valid Firecrawl key with **at least 50 remaining credits**
* Firecrawl website: [firecrawl.dev](https://firecrawl.dev)
* Private Key uses a separate credit pool (`privateKeyCreditsBalance` / `privateKeyCreditsTotal`)
* When `scraperKey` is present, enrichment is always enabled and Private Key credits are used

## Checking Your Credits

Use the [Get User Credits](/learn/search-api/user-credits) endpoint to check your current credit balance:

<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>
