> ## Documentation Index
> Fetch the complete documentation index at: https://actianvectorai-docs-low-effort-fixes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# gRPC endpoints

> gRPC endpoints for VectorAI DB.

VectorAI DB provides high-performance gRPC endpoints for applications that require low-latency operations and efficient binary communication. gRPC uses Protocol Buffers for serialization and HTTP/2 for transport.

From this page you can learn about the gRPC connection details, understand when to choose gRPC over REST, and run a sample workflow using the Python SDK.

## Connection details

* **Default port**: 6574.
* **Protocol**: gRPC over HTTP/2.
* **Serialization**: Protocol Buffers (protobuf).

For standard web applications and quick prototyping, the [REST API](/api-reference/rest) may be simpler to integrate.

## Client libraries

The Python SDK supports gRPC endpoints for communication with VectorAI DB. For more information about using the Python SDK with gRPC endpoints, see [Python SDK](/sdks/python/quickstart).

## Create a collection and run a search

The following example connects to a VectorAI DB gRPC endpoint, creates a collection with 128-dimensional cosine vectors, inserts a point, and runs a similarity search. After running this code you should see the search results printed to the console, confirming that your gRPC connection is working.

```python theme={null}
from actian_vectorai import (
    Distance,
    PointStruct,
    VectorAIClient,
    VectorParams,
)

# Connect to gRPC endpoint (default port 6574)
with VectorAIClient("localhost:6574") as client:
    # Health check
    info = client.health_check()
    print(f"Connected to {info['title']} v{info['version']}")

    # Create a collection
    client.collections.create(
        "my_collection",
        vectors_config=VectorParams(size=128, distance=Distance.Cosine),
    )

    # Insert a point
    client.points.upsert(
        "my_collection",
        points=[
            PointStruct(
                id=1,
                vector=[0.1] * 128,
                payload={"category": "example"}
            )
        ]
    )

    # Perform search operations
    results = client.points.search(
        "my_collection",
        vector=[0.1] * 128,
        limit=10
    )
    print(f"Found {len(results)} results")
```
