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

# Configuration Options

> Configure the Observ SDK when creating an instance to control tracing, caching, and debugging behavior

## Configuration Reference

| Option        | Type      | Default        | Description                            |
| ------------- | --------- | -------------- | -------------------------------------- |
| `apiKey`      | `string`  | —              | Your Observ API key (required)         |
| `recall`      | `boolean` | `false`        | Enable semantic caching                |
| `environment` | `string`  | `"production"` | Environment tag for filtering          |
| `debug`       | `boolean` | `false`        | Enable debug logging (TypeScript only) |

## Option Details

### apiKey

**Required** - Your Observ API key for authentication and tracing.

Get your API key from [Settings → API Keys](https://observ.dev/settings/api-keys).

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const ob = new Observ({
      apiKey: "your-observ-api-key",
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    ob = Observ(
        api_key="your-observ-api-key",
    )
    ```
  </Tab>
</Tabs>

### recall

Intelligently cache similar prompts and reduce costs in a few lines of code.

When enabled, Observ analyzes the semantic meaning of prompts and returns cached responses for similar requests, even if the exact wording differs.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const ob = new Observ({
      apiKey: "your-observ-api-key",
      recall: true, // Enable semantic caching
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    ob = Observ(
        api_key="your-observ-api-key",
        recall=True,  # Enable semantic caching
    )
    ```
  </Tab>
</Tabs>

<Tip>
  Semantic caching can reduce costs by up to 85% on similar prompts. It's
  especially effective for: - Customer support chatbots - FAQ systems - Repeated
  queries with slight variations
</Tip>

### environment

Tag traces with an environment identifier for filtering in the dashboard.

Useful for separating production, staging, development, and test traces.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const ob = new Observ({
      apiKey: "your-observ-api-key",
      environment: "staging",
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    ob = Observ(
        api_key="your-observ-api-key",
        environment="staging",
    )
    ```
  </Tab>
</Tabs>

Common values: `"production"`, `"staging"`, `"development"`, `"test"`

### debug

<Note>TypeScript only - This option is not available in the Python SDK.</Note>

Enable detailed logging for debugging integration issues.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const ob = new Observ({
      apiKey: "your-observ-api-key",
      debug: true, // Enable debug logging
    });
    ```
  </Tab>
</Tabs>

Debug mode logs:

* API calls to Observ servers
* Caching hits/misses
* Tracing events
* Error details

## Complete Example

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    import Observ from "observ-sdk";

    const ob = new Observ({
      apiKey: process.env.OBSERV_API_KEY,
      recall: true,
      environment: process.env.NODE_ENV || "development",
      debug: process.env.NODE_ENV === "development",
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    from observ import Observ

    ob = Observ(
        api_key=os.getenv("OBSERV_API_KEY"),
        recall=True,
        environment=os.getenv("ENVIRONMENT", "development"),
    )
    ```
  </Tab>
</Tabs>

## Environment Variables

<Tabs>
  <Tab title=".env">
    ```bash theme={null}
    OBSERV_API_KEY=your-observ-api-key
    ENVIRONMENT=production
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import Observ from "observ-sdk";

    const ob = new Observ({
      apiKey: process.env.OBSERV_API_KEY,
      environment: process.env.ENVIRONMENT,
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    from observ import Observ

    ob = Observ(
        api_key=os.getenv("OBSERV_API_KEY"),
        environment=os.getenv("ENVIRONMENT"),
    )
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="Usage Guide" icon="book" href="/provider-sdks/usage">
    Learn how to wrap provider clients
  </Card>

  <Card title="Session Tracking" icon="users" href="/features/sessions">
    Group related calls with sessions
  </Card>

  <Card title="Custom Metadata" icon="tag" href="/features/metadata">
    Attach metadata to traces
  </Card>

  <Card title="Dashboard" icon="gauge" href="https://observ.dev/dashboard">
    View your traces and analytics
  </Card>
</CardGroup>
