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

# Query VSA cleanup memory

> **Required scope:** write

**Required scope:** `write`

### Request body

`VSAQueryRequest`

**query** `VSAVectorRef` *required*

**top\_k** `integer`

Number of results to return

### Response

`VSAResponse`

**dimension** `integer` *required*

Vector dimension

**enabled** `boolean` *required*

Whether VSA is enabled

**results** `object[][]`

Query results (if applicable)

**vector** `number (float)[]`

Result vector (if applicable)

### Status codes

| Code | Meaning |
| - | - |
| `200` | Query results |
| `400` | Invalid request |
| `401` | Unauthorized — missing or invalid credentials |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |
| `503` | VSA not enabled |

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/api/v1/nsr/vsa/query' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "query": {
    "concept": "string"
  },
  "top_k": 1
}'
```

```json 200 theme={null}
{
  "dimension": 1,
  "enabled": true,
  "results": [
    [
      {
        "0": "s",
        "1": "t",
        "2": "r",
        "3": "i",
        "4": "n",
        "5": "g"
      }
    ]
  ],
  "vector": [
    1.5
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.