> Reverse Contact API documentation. This is the Markdown copy of https://docs.reversecontact.com/sdk/python/client-options
> Every page is listed at https://docs.reversecontact.com/llms.txt, every endpoint with its credit cost and status at https://docs.reversecontact.com/catalog.json

# Client options

> Configure the Reverse Contact Python client with timeouts, retries, custom httpx connections, shared options, application metadata and debug logging.

- Last verified: 2026-11-04

`ReverseContact` and `AsyncReverseContact` accept these keyword-only constructor options.

| Argument | Default | Meaning |
| -------- | ------- | ------- |
| `api_key` | `RC_API_KEY` | Your API key |
| `base_url` | `RC_BASE_URL`, then `https://api.reversecontact.com` | API origin |
| `timeout` | `90` | Seconds per HTTP attempt, or an `httpx.Timeout` |
| `max_retries` | `4` | Retries after the first attempt |
| `default_headers` | none | Headers added to every request |
| `http_client` | a client the SDK creates | Your own `httpx.Client` or `httpx.AsyncClient`, for a proxy or connection pool settings |
| `sleep` | `time.sleep` or `asyncio.sleep` | Function used for retry and polling delays. Async clients require an awaitable |
| `clock` | `time.monotonic` | Monotonic clock used for polling deadlines |
| `app_info` | none | `{"name": ..., "version": ...}` of your integration, added to the `User-Agent` |

Close the client when you are done, with a `with` block or `client.close()`. If you pass an `http_client`, close that client yourself. Use `client.with_options()` to change options in a copy that shares the connection pool.

Debug logging is off by default. Set `RC_LOG=debug` before creating the client, or set the `reversecontact` logger to `logging.DEBUG`. The logs show the method, path, status, attempt, retry delay and request id. They never show the API key, the request body or the query values.

**Client options**

```python [Python SDK]
import logging
import os

from reversecontact import ReverseContact

logging.basicConfig()
logging.getLogger("reversecontact").setLevel(logging.DEBUG)

with ReverseContact(
    api_key=os.environ["RC_API_KEY"],
    timeout=120.0,
    max_retries=2,
    app_info={"name": "my-crm-sync", "version": "1.4.0"},
) as client:
    fast = client.with_options(timeout=30.0, max_retries=0)
    print(fast.usage.retrieve().quotas)
```

The package also exports its models, such as `Person` and `Company`, and the request and response models of every operation in `reversecontact.types`.

## Copy options without a new pool

`client.with_options()` accepts `api_key`, `base_url`, `timeout`, `max_retries`, `default_headers`, `app_info`, `sleep` and `clock`. Options you omit keep their existing values. Additional `default_headers` merge with the current headers.

The returned client uses the original HTTP pool. Closing the copy leaves that pool open. Keep the original client open while using its copies.

Read `client.base_url` for the configured API origin, without a trailing slash. API methods accept per-request `timeout`, `max_retries` and `headers`. Wait helpers have overall deadline controls, described in [Timeouts and cancellation](https://docs.reversecontact.com/sdk/python/timeouts).

`max_retries` must be a non-negative integer. Invalid values raise `ReverseContactError`. See [Install and configure](https://docs.reversecontact.com/sdk/python/install) to create a client and [Async client](https://docs.reversecontact.com/sdk/python/async-client) to manage async connections.

Return to the [Python SDK overview](https://docs.reversecontact.com/sdk/python).

## FAQ

### How do I change the Python SDK API base URL?

Pass `base_url` to the client. Without an explicit value, the SDK reads `RC_BASE_URL`, then defaults to `https://api.reversecontact.com`.

### Does with_options create a new connection pool?

`client.with_options()` shares the original pool and returns a client with copied options. Closing the copy leaves the shared pool open.

### How do I enable Python SDK debug logs?

Set `RC_LOG=debug` before creating the client or set the `reversecontact` logger to `logging.DEBUG`. Logs omit API keys, request bodies and query values.

### Can I supply my own httpx client?

Pass an `httpx.Client` to `ReverseContact` or an `httpx.AsyncClient` to `AsyncReverseContact` using `http_client`. Close the supplied client yourself.
