All Products
Search
Document Center

OpenSearch:Create a table for an API data source

Last Updated:Apr 01, 2026

OpenSearch Vector Search Edition uses a 5-step wizard to create a table. When you select API as the data source type, data is pushed to the instance through API calls after the table is created.

Prerequisites

Before you begin, ensure that you have:

  • An OpenSearch Vector Search Edition instance

  • The vector model you plan to use, so you can supply the correct vector dimension, distance type, and index algorithm during configuration

Before you start: key decisions

Two settings in the wizard are difficult or impossible to change after the table is created. Review them before starting.

Data shards

All index tables in an OpenSearch instance must share the same shard count. The one exception: a single table can have one shard while all others share the same count. Decide on your shard topology before creating the first table.

Vector index parameters

The vector dimension, distance type, and index algorithm must match the model you use to generate embeddings. Check your model's documentation for the correct values:

ParameterOptionsHow to choose
Vector dimensionAny integerMatch your embedding model's output dimension
Distance typeSquareEuclidean, InnerProductMatch your embedding model's similarity metric
Vector index algorithmQc, Linear, HNSWMatch your embedding model's recommended algorithm

Create a table

  1. Log on to the OpenSearch Vector Search Edition console. In the left-side navigation pane, click Instances. Find the target instance and click the instance name or ID. On the instance details page, click Table Management in the left-side pane, then click Add Table.

    image.png

  2. In the Basic table information step, configure the following parameters and click Next.

    image.png

    ParameterDescription
    Table NameA custom name for the table.
    Data ShardsThe number of shards in the table. All index tables in an instance must share the same shard count, or one table can have one shard while all others share the same count.
    Number of Resources for Data UpdatesBilling overview of OpenSearch Vector Search Edition for the international site (alibabacloud.com)The compute resources allocated for data updates. Each instance includes a free quota of 2 resources per data source. Each resource provides 4 CPU cores and 8 GB of memory. Additional resources beyond the free quota are billed. For details, see Billing overview of OpenSearch Vector Search Edition.
    Scenario TemplateThe template used to create the table. Valid values: Common Template, Vector: Image Search, and Vector: Semantic Search for Text.
  3. In the Data synchronization step, set Full Data Source to API and click Next.

    image.png

    Setting the data source to API means data is pushed to the instance through API calls rather than pulled from an external storage system.

  4. In the Field configuration step, add fields for the table and click Next.

    image.png

    The primary key field and vector field are both required. The primary key field must be of the INT or STRING type. The vector field must be of the FLOAT type.

    The vector field is a multi-value FLOAT field by default. Multiple values are separated by the HA3 delimiter (^], encoded as \x1D in UTF format). To use a different separator, enter a custom multi-value delimiter.

  5. In the Index schema step, configure the vector index and click Next.

    image.png

    In the Vector Index section, configure the following parameters:

    ParameterDescription
    Fields ContainedThree fixed fields are supported: primary key field (required), vector field (required), and namespace field (optional). No additional fields can be added.
    Vector DimensionThe dimension of the vectors. Match the output dimension of your embedding model.
    Distance TypeThe metric used to measure vector similarity. Valid values: SquareEuclidean and InnerProduct. Match the metric used by your embedding model.
    Vector Index AlgorithmThe algorithm used to build the vector index. Valid values: Qc, Linear, and HNSW. Match the algorithm recommended by your embedding model.
    Real-time IndexingWhether to build real-time indexes for incremental data pushed via API. Default value: true.

    For advanced vector index settings, see Common configurations of vector indexes.

    image.png

  6. In the Confirm step, click Confirm. The table is created automatically.

    image.png

Verify the table status

To check the creation progress, click Change History in the left-side pane on the instance details page, then click the Data Source Changes tab.

image.png

When the table enters the In Use state, it is ready. Run a test query on the Query Test page to confirm that the table is working correctly.

image.png

Usage notes

Warning

When reindexing an API data source, the system clears all previously synchronized data and re-synchronizes from the specified timestamp in real time. Proceed with caution.

What's next

After the table enters the In Use state, push data to the instance using the OpenSearch API to populate the table for search.