## List the domains and subdomains available for generation

`datasets.invent_domains()  -> DatasetInventDomainsResponse`

**get** `/api/v1/datasets/invent/domains`

Returns every domain code accepted by `POST /datasets/invent`, each with its subdomain codes. Static — safe to cache.

### Returns

- `class DatasetInventDomainsResponse: …`

  - `domains: List[Domain]`

    - `code: str`

      Code to send in `domains`.

    - `title: str`

      Human-readable name.

    - `subdomains: List[DomainSubdomain]`

      Subdomains available within this domain. Empty when the domain has no subdivision — send the domain code alone.

      - `code: str`

        Qualified code to send in `subdomains` — copy it as-is rather than assembling it.

      - `title: str`

        Human-readable name.

### Example

```python
import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
response = client.datasets.invent_domains()
print(response.domains)
```

#### Response

```json
{
  "domains": [
    {
      "code": "medical",
      "title": "Medical",
      "subdomains": [
        {
          "code": "medical.symptoms_diagnosis",
          "title": "Symptoms diagnosis"
        }
      ]
    }
  ]
}
```
