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

# API

> API reference for Qdrant: every `qdrant.api.*` operation with input and output types.

Every `qdrant.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Aliases

### list

`aliases.list`

List every collection alias in the cluster

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.aliases.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `aliases` | `object[]` | Yes | — |

> [accordion] aliases full type
>
> ```ts theme={null}
> {
>   alias_name: string,
>   collection_name: string
> }[]
> ```

***

### listForCollection

`aliases.listForCollection`

List the aliases that point to one collection

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.aliases.listForCollection({ collectionName: 'docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `aliases` | `object[]` | Yes | — |

> [accordion] aliases full type
>
> ```ts theme={null}
> {
>   alias_name: string,
>   collection_name: string
> }[]
> ```

***

### update

`aliases.update`

Atomically create, delete or rename aliases, e.g. to switch traffic to a rebuilt collection

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.aliases.update({
	actions: [{
		delete_alias: { alias_name: 'docs_live' },
	}, {
		create_alias: { collection_name: 'docs_v2', alias_name: 'docs_live' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `actions` | `object[]` | Yes | Applied atomically |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] actions full type
>
> ```ts theme={null}
> (
>   {
>     create_alias: {
>       collection_name: string,
>       alias_name: string
>     }
>   } | {
>     delete_alias: {
>       alias_name: string
>     }
>   } | {
>     rename_alias: {
>       old_alias_name: string,
>       new_alias_name: string
>     }
>   }
> )[]
> ```

**Output:** `boolean`

***

## Collections

### create

`collections.create`

Create a collection with dense, sparse or named vector configs, sharding and index settings

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.collections.create({
	collectionName: 'docs',
	vectors: {
		dense: { size: 384, distance: 'Cosine' },
	},
	sparse_vectors: {
		bm25: { modifier: 'idf' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `vectors` | `object` | No | — |
| `sparse_vectors` | `object` | No | — |
| `shard_number` | `number` | No | — |
| `sharding_method` | `auto \| custom` | No | — |
| `replication_factor` | `number` | No | — |
| `write_consistency_factor` | `number` | No | — |
| `on_disk_payload` | `boolean` | No | — |
| `hnsw_config` | `Record<string, any>` | No | — |
| `wal_config` | `Record<string, any>` | No | — |
| `optimizers_config` | `Record<string, any>` | No | — |
| `quantization_config` | `Record<string, any>` | No | — |
| `strict_mode_config` | `Record<string, any>` | No | — |
| `id_tracker` | `Record<string, any>` | No | — |
| `payload` | `Record<string, any>` | No | Payload storage configuration |
| `metadata` | `Record<string, any>` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] vectors full type
>
> ```ts theme={null}
> {
>   size: number,
>   distance: Cosine | Euclid | Dot | Manhattan,
>   datatype?: float32 | float16 | uint8 | turbo4 | turbo8 | turbo16,
>   on_disk?: boolean,
>   multivector_config?: {
>     comparator: max_sim
>   }
> } | Record<string, {
>   size: number,
>   distance: Cosine | Euclid | Dot | Manhattan,
>   datatype?: float32 | float16 | uint8 | turbo4 | turbo8 | turbo16,
>   on_disk?: boolean,
>   multivector_config?: {
>     comparator: max_sim
>   }
> }>
> ```

> [accordion] sparse\_vectors full type
>
> ```ts theme={null}
> Record<string, {
>   modifier?: none | idf
> }>
> ```

**Output:** `boolean`

***

### delete

`collections.delete`

Delete a collection and every point stored in it

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.collections.delete({ collectionName: 'docs_old' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `timeout` | `number` | No | Request timeout in seconds |

**Output:** `boolean`

***

### exists

`collections.exists`

Check whether a collection with the given name exists

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.collections.exists({ collectionName: 'docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `exists` | `boolean` | Yes | — |

***

### get

`collections.get`

Get a collection’s status, point counts, vector configuration and payload indexes

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.collections.get({ collectionName: 'docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | Yes | green \| yellow \| grey \| red |
| `optimizer_status` | `string \| object` | Yes | "ok", or \{ error } when optimizers failed |
| `points_count` | `number \| null` | No | — |
| `indexed_vectors_count` | `number \| null` | No | — |
| `segments_count` | `number` | Yes | — |
| `config` | `Record<string, any>` | Yes | — |
| `payload_schema` | `Record<string, any>` | Yes | — |

> [accordion] optimizer\_status full type
>
> ```ts theme={null}
> string | {
>   error: string
> }
> ```

***

### list

`collections.list`

List the names of all collections in the cluster

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.collections.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `collections` | `object[]` | Yes | — |

> [accordion] collections full type
>
> ```ts theme={null}
> {
>   name: string
> }[]
> ```

***

### update

`collections.update`

Update a collection’s vector, HNSW, optimizer, quantization or strict-mode parameters

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.collections.update({
	collectionName: 'docs',
	optimizers_config: { indexing_threshold: 20000 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `vectors` | `Record<string, Record<string, any>>` | No | — |
| `sparse_vectors` | `Record<string, Record<string, any>>` | No | — |
| `params` | `Record<string, any>` | No | — |
| `hnsw_config` | `Record<string, any>` | No | — |
| `optimizers_config` | `Record<string, any>` | No | — |
| `quantization_config` | `Record<string, any> \| Disabled` | No | — |
| `strict_mode_config` | `Record<string, any>` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

**Output:** `boolean`

***

## Payload Indexes

### create

`payloadIndexes.create`

Index a payload field (keyword, integer, float, geo, text, bool, datetime, uuid) for filtering

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.payloadIndexes.create({
	collectionName: 'docs',
	field_name: 'lang',
	field_schema: { type: 'keyword' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `field_name` | `string` | Yes | Payload key, with dots for nested fields |
| `field_schema` | `keyword \| integer \| float \| geo \| text \| bool \| datetime \| uuid \| object` | Yes | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] field\_schema full type
>
> ```ts theme={null}
> keyword | integer | float | geo | text | bool | datetime | uuid | {
>   type: keyword | integer | float | geo | text | bool | datetime | uuid
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### delete

`payloadIndexes.delete`

Remove the index on a payload field

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.payloadIndexes.delete({ collectionName: 'docs', fieldName: 'lang' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `fieldName` | `string` | Yes | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

## Points

### clearPayload

`points.clearPayload`

Remove every payload key from points selected by ID list or filter

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.points.clearPayload({
	collectionName: 'docs',
	filter: {
		must: [{
			key: 'lang',
			match: { value: 'en' },
		}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `points` | `(number \| string)[]` | No | — |
| `filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### count

`points.count`

Count the points that match a filter, exactly or approximately

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.points.count({
	collectionName: 'docs',
	filter: {
		must: [{
			key: 'lang',
			match: { value: 'en' },
		}],
	},
	exact: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `filter` | `object` | No | — |
| `exact` | `boolean` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | Yes | — |

***

### delete

`points.delete`

Delete points selected by ID list or by filter

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.points.delete({
	collectionName: 'docs',
	points: [1, 2],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `points` | `(number \| string)[]` | No | — |
| `filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### deletePayload

`points.deletePayload`

Remove specific payload keys from points selected by ID list or filter

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.points.deletePayload({
	collectionName: 'docs',
	keys: ['reviewed'],
	points: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `keys` | `string[]` | Yes | — |
| `points` | `(number \| string)[]` | No | — |
| `filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### deleteVectors

`points.deleteVectors`

Remove named vectors from points selected by ID list or filter

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.points.deleteVectors({
	collectionName: 'docs',
	vector: ['bm25'],
	points: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `vector` | `string[]` | Yes | Names of the vectors |
| `points` | `(number \| string)[]` | No | — |
| `filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### get

`points.get`

Retrieve points by ID, optionally with their payloads and vectors

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.points.get({
	collectionName: 'docs',
	ids: [1, 2],
	with_payload: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `ids` | `(number \| string)[]` | Yes | — |
| `with_payload` | `boolean \| string[] \| object` | No | — |
| `with_vector` | `boolean \| string[]` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] with\_payload full type
>
> ```ts theme={null}
> boolean | string[] | {
>   include: string[]
> } | {
>   exclude: string[]
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   payload?: Record<string, any> | null,
>   vector?: number[] | number[][] | Record<string, number[] | number[][] | {
>     indices: number[],
>     values: number[]
>   }> | null,
>   shard_key?: string | number | null,
>   order_value?: number | null
> }[]
> ```

***

### overwritePayload

`points.overwritePayload`

Replace the whole payload of points selected by ID list or filter

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.points.overwritePayload({
	collectionName: 'docs',
	payload: { url: 'https://example.com/guide', lang: 'de' },
	points: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `payload` | `Record<string, any>` | Yes | — |
| `key` | `string` | No | Not supported. Use setPayload instead |
| `points` | `(number \| string)[]` | No | — |
| `filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### scroll

`points.scroll`

Page through points matching a filter. Pass next\_page\_offset back as offset to get the next page

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.points.scroll({
	collectionName: 'docs',
	filter: {
		must: [{
			key: 'lang',
			match: { value: 'en' },
		}],
	},
	limit: 100,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `filter` | `object` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number \| string` | No | `next_page_offset` of the previous page |
| `order_by` | `string \| object` | No | — |
| `with_payload` | `boolean \| string[] \| object` | No | — |
| `with_vector` | `boolean \| string[]` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] order\_by full type
>
> ```ts theme={null}
> string | {
>   key: string,
>   direction?: asc | desc,
>   start_from?: number | string
> }
> ```

> [accordion] with\_payload full type
>
> ```ts theme={null}
> boolean | string[] | {
>   include: string[]
> } | {
>   exclude: string[]
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `points` | `object[]` | Yes | — |
| `next_page_offset` | `number \| string \| null` | No | — |

> [accordion] points full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   payload?: Record<string, any> | null,
>   vector?: number[] | number[][] | Record<string, number[] | number[][] | {
>     indices: number[],
>     values: number[]
>   }> | null,
>   shard_key?: string | number | null,
>   order_value?: number | null
> }[]
> ```

***

### setPayload

`points.setPayload`

Merge payload keys into points selected by ID list or filter, optionally under a nested key

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.points.setPayload({
	collectionName: 'docs',
	payload: { reviewed: true },
	points: [1],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `payload` | `Record<string, any>` | Yes | — |
| `key` | `string` | No | Nested path to set the payload under |
| `points` | `(number \| string)[]` | No | — |
| `filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### updateVectors

`points.updateVectors`

Replace specific named vectors on existing points, keeping the others

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.points.updateVectors({
	collectionName: 'docs',
	points: [{
		id: 1,
		vector: {
			dense: [0.12, 0.08, 0.91, 0.33],
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `points` | `object[]` | Yes | — |
| `update_filter` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] points full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   vector: number[] | number[][] | {
>     model: string
>   } | Record<string, number[] | number[][] | {
>     indices: number[],
>     values: number[]
>   } | {
>     model: string
>   }>
> }[]
> ```

> [accordion] update\_filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

### upsert

`points.upsert`

Insert or replace points with their vectors and payloads, waiting for the write by default

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.points.upsert({
	collectionName: 'docs',
	points: [{
		id: 1,
		vector: [0.12, 0.08, 0.91, 0.33],
		payload: { url: 'https://example.com/guide', lang: 'en' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `points` | `object[]` | Yes | — |
| `update_filter` | `object` | No | Only overwrite existing points that match this filter |
| `update_mode` | `upsert \| insert_only \| update_only` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `wait` | `boolean` | No | Wait until the change is applied (Qdrant defaults to false) |
| `ordering` | `weak \| medium \| strong` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] points full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   vector: number[] | number[][] | {
>     model: string
>   } | Record<string, number[] | number[][] | {
>     indices: number[],
>     values: number[]
>   } | {
>     model: string
>   }>,
>   payload?: Record<string, any> | null
> }[]
> ```

> [accordion] update\_filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operation_id` | `number \| null` | No | — |
| `status` | `string` | Yes | acknowledged \| completed \| wait\_timeout |

***

## Query

### batch

`query.batch`

Run several universal queries against one collection in a single request

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.query.batch({
	collectionName: 'docs',
	searches: [{
		query: [0.12, 0.08, 0.91, 0.33],
		limit: 3,
	}, { query: 1, limit: 3 }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `searches` | `object[]` | Yes | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] searches full type
>
> ```ts theme={null}
> {
>   prefetch?: {
>     prefetch?: (recursive) | (recursive)[],
>     query?: number[] | number[][] | number | string | {
>     },
>     using?: string,
>     filter?: {
>       must?: Record<string, any> | Record<string, any>[],
>       should?: Record<string, any> | Record<string, any>[],
>       must_not?: Record<string, any> | Record<string, any>[],
>       min_should?: {
>         conditions: Record<string, any>[],
>         min_count: number
>       }
>     },
>     params?: Record<string, any>,
>     score_threshold?: number,
>     limit?: number,
>     lookup_from?: {
>       collection: string,
>       vector?: string,
>       shard_key?: string | number | (string | number)[] | {
>       }
>     }
>   } | {
>     prefetch?: (recursive) | (recursive)[],
>     query?: number[] | number[][] | number | string | {
>     },
>     using?: string,
>     filter?: {
>       must?: Record<string, any> | Record<string, any>[],
>       should?: Record<string, any> | Record<string, any>[],
>       must_not?: Record<string, any> | Record<string, any>[],
>       min_should?: {
>         conditions: Record<string, any>[],
>         min_count: number
>       }
>     },
>     params?: Record<string, any>,
>     score_threshold?: number,
>     limit?: number,
>     lookup_from?: {
>       collection: string,
>       vector?: string,
>       shard_key?: string | number | (string | number)[] | {
>       }
>     }
>   }[],
>   query?: number[] | number[][] | number | string | {
>   },
>   using?: string,
>   filter?: {
>     must?: Record<string, any> | Record<string, any>[],
>     should?: Record<string, any> | Record<string, any>[],
>     must_not?: Record<string, any> | Record<string, any>[],
>     min_should?: {
>       conditions: Record<string, any>[],
>       min_count: number
>     }
>   },
>   params?: Record<string, any>,
>   score_threshold?: number,
>   limit?: number,
>   offset?: number,
>   with_payload?: boolean | string[] | {
>     include: string[]
>   } | {
>     exclude: string[]
>   },
>   with_vector?: boolean | string[],
>   lookup_from?: {
>     collection: string,
>     vector?: string,
>     shard_key?: string | number | (string | number)[] | {
>     }
>   },
>   shard_key?: string | number | (string | number)[] | {
>   }
> }[]
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   points: {
>     id: number | string,
>     payload?: Record<string, any> | null,
>     vector?: number[] | number[][] | Record<string, number[] | number[][] | {
>       indices: number[],
>       values: number[]
>     }> | null,
>     shard_key?: string | number | null,
>     order_value?: number | null,
>     version: number,
>     score: number
>   }[]
> }[]
> ```

***

### facet

`query.facet`

Count points per distinct value of an indexed payload field

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.query.facet({ collectionName: 'docs', key: 'lang', exact: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `key` | `string` | Yes | Indexed payload field |
| `limit` | `number` | No | — |
| `filter` | `object` | No | — |
| `exact` | `boolean` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hits` | `object[]` | Yes | — |

> [accordion] hits full type
>
> ```ts theme={null}
> {
>   value: string | number | boolean,
>   count: number
> }[]
> ```

***

### groups

`query.groups`

Run a universal query and group hits by a payload field, e.g. one result per document

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.query.groups({
	collectionName: 'docs',
	query: [0.12, 0.08, 0.91, 0.33],
	group_by: 'document_id',
	group_size: 1,
	limit: 10,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `prefetch` | `object \| object[]` | No | — |
| `query` | `number[] \| number[][] \| number \| string \| object` | No | — |
| `using` | `string` | No | Named vector to search |
| `filter` | `object` | No | — |
| `params` | `Record<string, any>` | No | Search params, e.g. \{ hnsw\_ef, exact } |
| `score_threshold` | `number` | No | — |
| `limit` | `number` | No | — |
| `with_payload` | `boolean \| string[] \| object` | No | — |
| `with_vector` | `boolean \| string[]` | No | — |
| `lookup_from` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `group_by` | `string` | Yes | — |
| `group_size` | `number` | No | — |
| `with_lookup` | `string \| object` | No | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] prefetch full type
>
> ```ts theme={null}
> {
>   prefetch?: (recursive) | (recursive)[],
>   query?: number[] | number[][] | number | string | {
>   },
>   using?: string,
>   filter?: {
>     must?: Record<string, any> | Record<string, any>[],
>     should?: Record<string, any> | Record<string, any>[],
>     must_not?: Record<string, any> | Record<string, any>[],
>     min_should?: {
>       conditions: Record<string, any>[],
>       min_count: number
>     }
>   },
>   params?: Record<string, any>,
>   score_threshold?: number,
>   limit?: number,
>   lookup_from?: {
>     collection: string,
>     vector?: string,
>     shard_key?: string | number | (string | number)[] | {
>     }
>   }
> } | {
>   prefetch?: (recursive) | (recursive)[],
>   query?: number[] | number[][] | number | string | {
>   },
>   using?: string,
>   filter?: {
>     must?: Record<string, any> | Record<string, any>[],
>     should?: Record<string, any> | Record<string, any>[],
>     must_not?: Record<string, any> | Record<string, any>[],
>     min_should?: {
>       conditions: Record<string, any>[],
>       min_count: number
>     }
>   },
>   params?: Record<string, any>,
>   score_threshold?: number,
>   limit?: number,
>   lookup_from?: {
>     collection: string,
>     vector?: string,
>     shard_key?: string | number | (string | number)[] | {
>     }
>   }
> }[]
> ```

> [accordion] query full type
>
> ```ts theme={null}
> number[] | number[][] | number | string | {
> }
> ```

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] with\_payload full type
>
> ```ts theme={null}
> boolean | string[] | {
>   include: string[]
> } | {
>   exclude: string[]
> }
> ```

> [accordion] lookup\_from full type
>
> ```ts theme={null}
> {
>   collection: string,
>   vector?: string,
>   shard_key?: string | number | (string | number)[] | {
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

> [accordion] with\_lookup full type
>
> ```ts theme={null}
> string | {
>   collection: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `groups` | `object[]` | Yes | — |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id: string | number,
>   hits: {
>     id: number | string,
>     payload?: Record<string, any> | null,
>     vector?: number[] | number[][] | Record<string, number[] | number[][] | {
>       indices: number[],
>       values: number[]
>     }> | null,
>     shard_key?: string | number | null,
>     order_value?: number | null,
>     version: number,
>     score: number
>   }[],
>   lookup?: {
>     id: number | string,
>     payload?: Record<string, any> | null,
>     vector?: number[] | number[][] | Record<string, number[] | number[][] | {
>       indices: number[],
>       values: number[]
>     }> | null,
>     shard_key?: string | number | null,
>     order_value?: number | null
>   } | null
> }[]
> ```

***

### points

`query.points`

Universal query: nearest-neighbour, hybrid fusion with prefetch, recommend, discover, or order-by

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.query.points({
	collectionName: 'docs',
	query: [0.12, 0.08, 0.91, 0.33],
	limit: 5,
	with_payload: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `prefetch` | `object \| object[]` | No | — |
| `query` | `number[] \| number[][] \| number \| string \| object` | No | — |
| `using` | `string` | No | Named vector to search |
| `filter` | `object` | No | — |
| `params` | `Record<string, any>` | No | Search params, e.g. \{ hnsw\_ef, exact } |
| `score_threshold` | `number` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `with_payload` | `boolean \| string[] \| object` | No | — |
| `with_vector` | `boolean \| string[]` | No | — |
| `lookup_from` | `object` | No | — |
| `shard_key` | `string \| number \| (string \| number)[] \| object` | No | — |
| `consistency` | `number \| majority \| quorum \| all` | No | — |
| `timeout` | `number` | No | Request timeout in seconds |

> [accordion] prefetch full type
>
> ```ts theme={null}
> {
>   prefetch?: (recursive) | (recursive)[],
>   query?: number[] | number[][] | number | string | {
>   },
>   using?: string,
>   filter?: {
>     must?: Record<string, any> | Record<string, any>[],
>     should?: Record<string, any> | Record<string, any>[],
>     must_not?: Record<string, any> | Record<string, any>[],
>     min_should?: {
>       conditions: Record<string, any>[],
>       min_count: number
>     }
>   },
>   params?: Record<string, any>,
>   score_threshold?: number,
>   limit?: number,
>   lookup_from?: {
>     collection: string,
>     vector?: string,
>     shard_key?: string | number | (string | number)[] | {
>     }
>   }
> } | {
>   prefetch?: (recursive) | (recursive)[],
>   query?: number[] | number[][] | number | string | {
>   },
>   using?: string,
>   filter?: {
>     must?: Record<string, any> | Record<string, any>[],
>     should?: Record<string, any> | Record<string, any>[],
>     must_not?: Record<string, any> | Record<string, any>[],
>     min_should?: {
>       conditions: Record<string, any>[],
>       min_count: number
>     }
>   },
>   params?: Record<string, any>,
>   score_threshold?: number,
>   limit?: number,
>   lookup_from?: {
>     collection: string,
>     vector?: string,
>     shard_key?: string | number | (string | number)[] | {
>     }
>   }
> }[]
> ```

> [accordion] query full type
>
> ```ts theme={null}
> number[] | number[][] | number | string | {
> }
> ```

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   must?: Record<string, any> | Record<string, any>[],
>   should?: Record<string, any> | Record<string, any>[],
>   must_not?: Record<string, any> | Record<string, any>[],
>   min_should?: {
>     conditions: Record<string, any>[],
>     min_count: number
>   }
> }
> ```

> [accordion] with\_payload full type
>
> ```ts theme={null}
> boolean | string[] | {
>   include: string[]
> } | {
>   exclude: string[]
> }
> ```

> [accordion] lookup\_from full type
>
> ```ts theme={null}
> {
>   collection: string,
>   vector?: string,
>   shard_key?: string | number | (string | number)[] | {
>   }
> }
> ```

> [accordion] shard\_key full type
>
> ```ts theme={null}
> string | number | (string | number)[] | {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `points` | `object[]` | Yes | — |

> [accordion] points full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   payload?: Record<string, any> | null,
>   vector?: number[] | number[][] | Record<string, number[] | number[][] | {
>     indices: number[],
>     values: number[]
>   }> | null,
>   shard_key?: string | number | null,
>   order_value?: number | null,
>   version: number,
>   score: number
> }[]
> ```

***

## Snapshots

### create

`snapshots.create`

Create a snapshot of a collection on the node and wait for it to finish

**Risk:** `write`

```ts theme={null}
await corsair.qdrant.api.snapshots.create({ collectionName: 'docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `creation_time` | `string \| null` | No | — |
| `size` | `number` | Yes | — |
| `checksum` | `string \| null` | No | — |

***

### delete

`snapshots.delete`

Delete a collection snapshot from the node

**Risk:** `destructive`

```ts theme={null}
await corsair.qdrant.api.snapshots.delete({ collectionName: 'docs', snapshotName: 'docs-2026-11-05-20-09-51.snapshot' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |
| `snapshotName` | `string` | Yes | — |

**Output:** `boolean`

***

### list

`snapshots.list`

List the snapshots stored for a collection

**Risk:** `read`

```ts theme={null}
await corsair.qdrant.api.snapshots.list({ collectionName: 'docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionName` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   name: string,
>   creation_time?: string | null,
>   size: number,
>   checksum?: string | null
> }[]
> ```

***


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