> For the complete documentation index, see [llms.txt](https://docs.sov.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sov.ai/api-reference/api-config.md).

# API Config

**Module:** `sovai.api_config`

## Classes

### `ApiConfig`

```python
class ApiConfig
```

The main API Configuration

**Attributes**

* `token` (`Optional[str]`)
* `base_url` (`str`)
* `token_type` (`str`)
* `verify_ssl` (`bool`)
* `version` (`Optional[str]`)

***

## Functions

### `read_key()`

```python
def read_key(envpath: Union[str, Path]) -> Optional[str]
```

Read .env file with credentials (e.g TOKEN or API\_TOKEN) and store to the ApiConfig

**Returns**

str

***

### `save_key()`

```python
def save_key(envpath: Union[str, Path] = '.env') -> None
```

Save retrieve token from the server to .env file in the root directory

**Returns:** `None`

***
