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

# Introduction

Pulze allows for extra customization and labeling of requests via the use of headers.

Currently, the following customizations are possible:

* Weights to override App settings (`pulze-weights`)
* Labels as a way to tag the requests (`pulze-labels`)
* Policies to change the behaviour of the requests (`pulze-policies`) (coming soon!)

<Tabs>
  <Tab title="Pulze Labels">
    You can send a key-value dictionary to store your log with specific labels.

    For example, you may decide to store all the tests with a `{type: "test"}` label. These labels are
    stored inside the log's request (as a string-string pair) and response and can be used for filtering and searching.

    Send a stringified JSON object in the headers:

    <CodeGroup>
      ```bash Request with custom labels theme={null}
      curl ...
      -H ...
      -H "Pulze-Labels: {\"type\": \"test\", \"attempt\": 3, \"is_test\": true}" \
      ...
      ```

      ```JSON Parsed labels theme={null}
      {
        "type": "test",
        "attempt": "3",
        "is_test": "true"
      }
      ```
    </CodeGroup>

    <br />

    <Note>Remember that the values can only be strings. Everything else will be parsed using python's `str()`.</Note>

    You can read more about Labels [here](/features/custom-headers/labels).
  </Tab>

  <Tab title="Pulze Weights">
    Every request is done using an API Key, which acts like a "password" for a specific App. These in turn have specific
    Settings which allow Pulze to retrieve the optimal models for your specific request.

    Your use-case might include an App which requires fast models,
    or models with high quality, or low cost, or a mix of those three. These labels are called:

    <Snippet file="weight-types.mdx" />

    You can send headers alongside *any request* containing said weights and they will superseed the settings for your App:

    <CodeGroup>
      ```bash Request with custom weights theme={null}
      curl ...
      -H "Authorization: Bearer <$PULZE_API_KEY>" \
      -H ...
      -H "Pulze-Weights: {\"quality\": 0.8, \"latency\": 0.5, \"cost\": 0.3}" \
      ...
      ```

      ```JSON Parsed weights theme={null}
        {
          "quality": 0.8,
          "latency": 0.5,
          "cost": 0.3
        }
      ```
    </CodeGroup>

    <br />

    <Note>These weights can be auto-added to the Log's labels as well. [Read more here](/features/custom-headers/labels).</Note>

    You can read more about Weights [here](/features/custom-headers/weights).
  </Tab>

  <Tab title="Pulze Policies">
    You may decide to perform certain specific actions for this particular log.

    For example, you might decide that this log's content shouldn't be logged, and that any failed request should be retried up to 1 time:

    <CodeGroup>
      ```bash Request with custom policies theme={null}
      curl ...
      -H ...
      -H "Pulze-Policies: {\"privacy_level\": 3, \"max_switch_model_retries\": 1}" \
      ...
      ```

      ```JSON Parsed policies theme={null}
        {
          "privacy_level": 3,
          "max_switch_model_retries": 1
        }
      ```
    </CodeGroup>

    <br />

    <Note>These policies can be auto-added to the Log's labels as well. [Read more here](/features/custom-headers/labels).</Note>

    You can read more about Policies [here](/features/custom-headers/policies).
  </Tab>
</Tabs>
