# BaseAPIResponse

> **Class** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/_openapi_client/_response/BaseAPIResponse)

## Signature

```python
BaseAPIResponse(
    self,
    *,
    raw: httpx.Response,
    cast_to: type[R],
    client: BaseClient[Any, Any],
    stream: bool,
    stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None,
    options: FinalRequestOptions,
    retries_taken: int = 0,
)
```

## Extends

- `Generic[R]`

## Constructors

```python
__init__(
    self,
    *,
    raw: httpx.Response,
    cast_to: type[R],
    client: BaseClient[Any, Any],
    stream: bool,
    stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None,
    options: FinalRequestOptions,
    retries_taken: int = 0,
) -> None
```

| Name | Type |
|------|------|
| `raw` | `httpx.Response` |
| `cast_to` | `type[R]` |
| `client` | `BaseClient[Any, Any]` |
| `stream` | `bool` |
| `stream_cls` | `type[Stream[Any]] \| type[AsyncStream[Any]] \| None` |
| `options` | `FinalRequestOptions` |
| `retries_taken` | `int` |


## Properties

- `http_response`
- `retries_taken`
- `headers`
- `http_request`
- `status_code`
- `url`
- `method`
- `http_version`
- `elapsed`
- `is_closed`

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/33995e14a84c53b65b82482b3d2fe0624b379bda/python/langsmith/_openapi_client/_response.py#L48)