---
title: "Get a brain"
description: "Fetch one brain by id, including its skills and metadata. Returns 404\nif you have no access to it."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: AI Gateway API › Brains

`GET /brains/{brain_id}`

Fetch one brain by id, including its skills and metadata. Returns 404
if you have no access to it.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `brain_id` (`get_brain.path.brain_id`; string, required)
  - format `uuid`

## Header parameters

- `X-App-Id` (`get_brain.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`
- `X-On-Behalf-Of` (`get_brain.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`get_brain.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://truememory-api.mvstg.com/brains/<brain_id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/brains/<brain_id>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/brains/<brain_id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "id": "string",
  "user_id": "string",
  "app_id": "string",
  "name": "string",
  "description": "string",
  "emoji": "string",
  "usage_hint": "string",
  "visibility": "private",
  "skills": [
    {
      "id": "string",
      "key": "string",
      "name": "string"
    }
  ],
  "document_count": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "skill_ids": [
    "string"
  ]
}
```

- `id` (`get_brain.response.200.id`; string, required)
- `user_id` (`get_brain.response.200.user_id`; any of, required)
  - any of: `string`, `null`
- `app_id` (`get_brain.response.200.app_id`; any of, required)
  - any of: `string`, `null`
- `name` (`get_brain.response.200.name`; string, required)
- `description` (`get_brain.response.200.description`; any of, required)
  - any of: `string`, `null`
- `created_at` (`get_brain.response.200.created_at`; string, required)
  - format `date-time`
- `updated_at` (`get_brain.response.200.updated_at`; string, required)
  - format `date-time`
- `skill_ids` (`get_brain.response.200.skill_ids`; array<string>, required) — Ids of ``skills``, for clients that only need to seed a multi-select. Derived rather than stored so it cannot disagree with ``skills``.
- `emoji` (`get_brain.response.200.emoji`; any of, optional)
  - any of: `string`, `null`
- `usage_hint` (`get_brain.response.200.usage_hint`; any of, optional)
  - any of: `string`, `null`
- `visibility` (`get_brain.response.200.visibility`; string, optional)
  - one of `"private"`, `"app"`, `"public"`; default `"private"`
- `skills` (`get_brain.response.200.skills`; array<object>, optional)
  - `id` (`get_brain.response.200.skills.id`; string, required)
  - `key` (`get_brain.response.200.skills.key`; string, required)
  - `name` (`get_brain.response.200.skills.name`; string, required)
- `document_count` (`get_brain.response.200.document_count`; integer, optional)
  - default `0`

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`get_brain.response.422.detail`; array<object>, optional)
  - `loc` (`get_brain.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`get_brain.response.422.detail.msg`; string, required)
  - `type` (`get_brain.response.422.detail.type`; string, required)
  - `input` (`get_brain.response.422.detail.input`; unknown, optional)
  - `ctx` (`get_brain.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/brains/get/index.md
