---
title: Indexes
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Vectorize](https://developers.cloudflare.com/api/go/resources/vectorize)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Indexes

##### [List Vectorize Indexes](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/list)

client.Vectorize.Indexes.List(ctx, query) (\*SinglePage\[[CreateIndex](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/vectorize/v2/indexes

##### [Get Vectorize Index](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/get)

client.Vectorize.Indexes.Get(ctx, indexName, query) (\*[CreateIndex](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}

##### [Create Vectorize Index](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/create)

client.Vectorize.Indexes.New(ctx, params) (\*[CreateIndex](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes

##### [Delete Vectorize Index](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/delete)

client.Vectorize.Indexes.Delete(ctx, indexName, body) (\*unknown, error)

DELETE/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}

##### [Insert Vectors](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/insert)

client.Vectorize.Indexes.Insert(ctx, indexName, params) (\*[IndexInsertResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexInsertResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/insert

##### [Query Vectors](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/query)

client.Vectorize.Indexes.Query(ctx, indexName, params) (\*[IndexQueryResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexQueryResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/query

##### [Upsert Vectors](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/upsert)

client.Vectorize.Indexes.Upsert(ctx, indexName, params) (\*[IndexUpsertResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexUpsertResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/upsert

##### [Delete Vectors By Identifier](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/delete_by_ids)

client.Vectorize.Indexes.DeleteByIDs(ctx, indexName, params) (\*[IndexDeleteByIDsResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexDeleteByIDsResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/delete\_by\_ids

##### [Get Vectors By Identifier](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/get_by_ids)

client.Vectorize.Indexes.GetByIDs(ctx, indexName, params) (\*[IndexGetByIDsResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexGetByIDsResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/get\_by\_ids

##### [Get Vectorize Index Info](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/info)

client.Vectorize.Indexes.Info(ctx, indexName, query) (\*[IndexInfoResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexInfoResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/info

##### [List Vectors](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/methods/list_vectors)

client.Vectorize.Indexes.ListVectors(ctx, indexName, params) (\*[IndexListVectorsResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes%20%3E%20(model)%20IndexListVectorsResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/list

##### ModelsExpand Collapse

<details>

<summary>

type CreateIndex struct{…}

</summary>

<details>

<summary>

Config CreateIndexConfigOptional

</summary>

Dimensions int64

Specifies the number of dimensions for the index

maximum1536

minimum1

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20dimensions">Link to this property</a>

<details>

<summary>

Metric CreateIndexConfigMetric

Specifies the type of metric to use calculating distance.

</summary>

One of the following:

const CreateIndexConfigMetricCosine CreateIndexConfigMetric = "cosine"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20metric%20%3E%20(member)%200">Link to this property</a>

const CreateIndexConfigMetricEuclidean CreateIndexConfigMetric = "euclidean"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20metric%20%3E%20(member)%201">Link to this property</a>

const CreateIndexConfigMetricDOTProduct CreateIndexConfigMetric = "dot-product"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20metric%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20metric">Link to this property</a>

<details>

<summary>

Preset CreateIndexConfigPresetOptional

Specifies the preset to use for the index.

</summary>

One of the following:

const CreateIndexConfigPresetCfBaaiBgeSmallEnV1\_5 CreateIndexConfigPreset = "@cf/baai/bge-small-en-v1.5"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20preset%20%3E%20(member)%200">Link to this property</a>

const CreateIndexConfigPresetCfBaaiBgeBaseEnV1\_5 CreateIndexConfigPreset = "@cf/baai/bge-base-en-v1.5"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20preset%20%3E%20(member)%201">Link to this property</a>

const CreateIndexConfigPresetCfBaaiBgeLargeEnV1\_5 CreateIndexConfigPreset = "@cf/baai/bge-large-en-v1.5"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20preset%20%3E%20(member)%202">Link to this property</a>

const CreateIndexConfigPresetOpenAITextEmbeddingAda002 CreateIndexConfigPreset = "openai/text-embedding-ada-002"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20preset%20%3E%20(member)%203">Link to this property</a>

const CreateIndexConfigPresetCohereEmbedMultilingualV2\_0 CreateIndexConfigPreset = "cohere/embed-multilingual-v2.0"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20preset%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config%20%3E%20(property)%20preset">Link to this property</a>

</details>

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20config">Link to this property</a>

CreatedOn TimeOptional

Specifies the timestamp the resource was created as an ISO8601 string.

formatdate-time

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

Description stringOptional

Specifies the description of the index.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

ModifiedOn TimeOptional

Specifies the timestamp the resource was modified as an ISO8601 string.

formatdate-time

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

Name stringOptional

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

</details>

[Link to this property](<#(resource)%20vectorize.indexes%20%3E%20(model)%20create_index%20%3E%20(schema)>)

<details>

<summary>

type IndexDeleteVectorsByID struct{…}

</summary>

Count int64Optional

The count of the vectors successfully deleted.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_delete_vectors_by_id%20%3E%20(schema)%20%3E%20(property)%20count">Link to this property</a>

IDs \[]stringOptional

Array of vector identifiers of the vectors that were successfully processed for deletion.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_delete_vectors_by_id%20%3E%20(schema)%20%3E%20(property)%20ids">Link to this property</a>

</details>

[Link to this property](<#(resource)%20vectorize.indexes%20%3E%20(model)%20index_delete_vectors_by_id%20%3E%20(schema)>)

<details>

<summary>

type IndexDimensionConfiguration struct{…}

</summary>

Dimensions int64

Specifies the number of dimensions for the index

maximum1536

minimum1

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_dimension_configuration%20%3E%20(schema)%20%3E%20(property)%20dimensions">Link to this property</a>

<details>

<summary>

Metric IndexDimensionConfigurationMetric

Specifies the type of metric to use calculating distance.

</summary>

One of the following:

const IndexDimensionConfigurationMetricCosine IndexDimensionConfigurationMetric = "cosine"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_dimension_configuration%20%3E%20(schema)%20%3E%20(property)%20metric%20%3E%20(member)%200">Link to this property</a>

const IndexDimensionConfigurationMetricEuclidean IndexDimensionConfigurationMetric = "euclidean"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_dimension_configuration%20%3E%20(schema)%20%3E%20(property)%20metric%20%3E%20(member)%201">Link to this property</a>

const IndexDimensionConfigurationMetricDOTProduct IndexDimensionConfigurationMetric = "dot-product"

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_dimension_configuration%20%3E%20(schema)%20%3E%20(property)%20metric%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_dimension_configuration%20%3E%20(schema)%20%3E%20(property)%20metric">Link to this property</a>

</details>

[Link to this property](<#(resource)%20vectorize.indexes%20%3E%20(model)%20index_dimension_configuration%20%3E%20(schema)>)

<details>

<summary>

type IndexInsert struct{…}

</summary>

Count int64Optional

Specifies the count of the vectors successfully inserted.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_insert%20%3E%20(schema)%20%3E%20(property)%20count">Link to this property</a>

IDs \[]stringOptional

Array of vector identifiers of the vectors successfully inserted.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_insert%20%3E%20(schema)%20%3E%20(property)%20ids">Link to this property</a>

</details>

[Link to this property](<#(resource)%20vectorize.indexes%20%3E%20(model)%20index_insert%20%3E%20(schema)>)

<details>

<summary>

type IndexQuery struct{…}

</summary>

Count int64Optional

Specifies the count of vectors returned by the search

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)%20%3E%20(property)%20count">Link to this property</a>

<details>

<summary>

Matches \[]IndexQueryMatchOptional

Array of vectors matched by the search

</summary>

ID stringOptional

Identifier for a Vector

maxLength64

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)%20%3E%20(property)%20matches%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

Metadata unknownOptional

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)%20%3E%20(property)%20matches%20%3E%20(items)%20%3E%20(property)%20metadata">Link to this property</a>

Score float64Optional

The score of the vector according to the index’s distance metric

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)%20%3E%20(property)%20matches%20%3E%20(items)%20%3E%20(property)%20score">Link to this property</a>

Values \[]float64Optional

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)%20%3E%20(property)%20matches%20%3E%20(items)%20%3E%20(property)%20values">Link to this property</a>

</details>

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)%20%3E%20(property)%20matches">Link to this property</a>

</details>

[Link to this property](<#(resource)%20vectorize.indexes%20%3E%20(model)%20index_query%20%3E%20(schema)>)

<details>

<summary>

type IndexUpsert struct{…}

</summary>

Count int64Optional

Specifies the count of the vectors successfully inserted.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_upsert%20%3E%20(schema)%20%3E%20(property)%20count">Link to this property</a>

IDs \[]stringOptional

Array of vector identifiers of the vectors successfully inserted.

<a href="#(resource)%20vectorize.indexes%20%3E%20(model)%20index_upsert%20%3E%20(schema)%20%3E%20(property)%20ids">Link to this property</a>

</details>

[Link to this property](<#(resource)%20vectorize.indexes%20%3E%20(model)%20index_upsert%20%3E%20(schema)>)

#### IndexesMetadata Index

##### [List Metadata Indexes](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/subresources/metadata_index/methods/list)

client.Vectorize.Indexes.MetadataIndex.List(ctx, indexName, query) (\*[IndexMetadataIndexListResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes.metadata_index%20%3E%20(model)%20IndexMetadataIndexListResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/metadata\_index/list

##### [Create Metadata Index](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/subresources/metadata_index/methods/create)

client.Vectorize.Indexes.MetadataIndex.New(ctx, indexName, params) (\*[IndexMetadataIndexNewResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes.metadata_index%20%3E%20(model)%20IndexMetadataIndexNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/metadata\_index/create

##### [Delete Metadata Index](https://developers.cloudflare.com/api/go/resources/vectorize/subresources/indexes/subresources/metadata_index/methods/delete)

client.Vectorize.Indexes.MetadataIndex.Delete(ctx, indexName, params) (\*[IndexMetadataIndexDeleteResponse](<https://developers.cloudflare.com/api/go/resources/vectorize#(resource)%20vectorize.indexes.metadata_index%20%3E%20(model)%20IndexMetadataIndexDeleteResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/vectorize/v2/indexes/{index\_name}/metadata\_index/delete