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

# Configuration & Ontologies

> Endpoints for user configuration and ontology management

## User configuration

Store and retrieve per-user configuration for your Cognee Cloud tenant.

**`POST /api/v1/configuration/store_user_configuration`** — Store a configuration object.

**`GET /api/v1/configuration/get_user_configuration/{config_id}`** — Retrieve a specific configuration by ID.

**`GET /api/v1/configuration/get_user_configuration/`** — Retrieve all configurations for the authenticated user.

## Ontologies

Ontologies define the structural schema for knowledge graph extraction. They specify which entity types and relationships Cognee should look for during [cognify](/core-concepts/main-operations/legacy-operations/cognify). See [Ontologies](/core-concepts/further-concepts/ontologies) for the underlying concept.

**`GET /api/v1/ontologies`** — List uploaded ontologies.

**`POST /api/v1/ontologies`** — Upload an ontology file.

```bash theme={null}
curl -X POST https://your-tenant.aws.cognee.ai/api/v1/ontologies \
  -H "X-Api-Key: your-key" \
  -F "ontology_key=my_domain_ontology" \
  -F "ontology_file=@my_ontology.owl" \
  -F "description=Domain ontology for entity extraction"
```

| Parameter       | Type   | Required | Description                               |
| --------------- | ------ | -------- | ----------------------------------------- |
| `ontology_key`  | string | yes      | User-defined identifier for this ontology |
| `ontology_file` | file   | yes      | Ontology file (OWL format)                |
| `description`   | string | no       | Human-readable description                |

**`DELETE /api/v1/ontologies/{ontology_key}`** — Delete an uploaded ontology by key.

```bash theme={null}
curl -X DELETE https://your-tenant.aws.cognee.ai/api/v1/ontologies/my_domain_ontology \
  -H "X-Api-Key: your-key"
```

On success, returns:

```json theme={null}
{"status": "success", "ontology_key": "my_domain_ontology"}
```

| Status code | Meaning                       |
| ----------- | ----------------------------- |
| `200`       | Ontology deleted successfully |
| `400`       | `ontology_key` not found      |
| `500`       | Internal error (filesystem)   |

<Info>
  Ontologies are optional. Without one, Cognee uses its default extraction pipeline. Define an ontology when you need domain-specific entity types or relationships.
</Info>

## LLM helpers

The tenant exposes two LLM helper endpoints that power the **Graph Model** editor and the **Prompt** editor in the UI. They are also usable directly with an API key.

**`POST /api/v1/llm/infer-schema`** — Propose a JSON schema (entity types and relationships) from sample text and/or uploaded files. The request is `multipart/form-data`:

```bash theme={null}
curl -X POST https://your-tenant.aws.cognee.ai/api/v1/llm/infer-schema \
  -H "X-Api-Key: your-key" \
  -F "text=Einstein developed general relativity in 1915." \
  -F "data=@sample.pdf" \
  -F 'parameters={"temperature":0.1}'
```

| Form field   | Type        | Required             | Description                                                                      |
| ------------ | ----------- | -------------------- | -------------------------------------------------------------------------------- |
| `text`       | string      | one of `text`/`data` | Inline sample text to analyze                                                    |
| `data`       | file(s)     | one of `text`/`data` | One or more sample files (uses the same loader engine as ingestion)              |
| `parameters` | JSON string | no                   | Forwarded to the LLM. Allowed keys: `temperature`, `max_tokens`, `top_p`, `seed` |

The response shape is `{ "graphSchema": { ... } }`, validated against the graph model utility before being returned. The endpoint returns `400` when neither `text` nor `data` is supplied, `422` when the LLM output is not valid JSON, and `500` for other inference errors.

**`POST /api/v1/llm/custom-prompt`** — Generate a starter cognify prompt for a given graph model. The request is JSON:

```bash theme={null}
curl -X POST https://your-tenant.aws.cognee.ai/api/v1/llm/custom-prompt \
  -H "X-Api-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{"graph_model": { ... }, "parameters": {}}'
```

Returns `{ "customPrompt": "..." }`. The same `parameters` keys (`temperature`, `max_tokens`, `top_p`, `seed`) are accepted.

<Info>
  Both endpoints live on the tenant API (the per-tenant API base URL shown on the [API Keys](/cognee-cloud/ui/api-keys) page), not the platform management API.
</Info>
