# Quickstart

### Create a Dataset

The first step is to [create a dataset](https://app.anndb.com/datasets/new) for your data. AnnDB provides multiple dataset types which provide out-of-the-box solutions for image similarity search, text semantic search, question answering, or raw approximate nearest neighbours search in case you want to use your own vector embeddings.

![](/files/-MYkEgiQwI-yWuBWlUbd)

### Create an API Key

Next, you will need to [create an API key](https://app.anndb.com/api_keys/new) to authenticate your client application with the AnnDB API. You can either a universal API key for all datasets, or you can create a dataset-specific API key to limit the access scope.

![](/files/-MYjygWgNhyd6F-beWdV)

### Install AnnDB

AnnDB provides client implementations in the following languages: [Python](https://github.com/anndb-com/anndb-api-client-python), [Ruby](https://github.com/anndb-com/anndb-api-client-ruby). Clients allow you to modify and search the data stored in your datasets.&#x20;

{% tabs %}
{% tab title="Python" %}

```
pip install anndb-api
```

{% endtab %}

{% tab title="Ruby" %}

```
gem install anndb_api
```

{% endtab %}
{% endtabs %}

### Hello, world!

This example application shows, how easy it is to build an image similarity search service with AnnDB in just a few lines of code.

{% tabs %}
{% tab title="Python" %}

```python
import anndb_api

# Create a client instance
client = anndb_api.Client('<YOUR_API_KEY')

# Load the dataset
dataset = client.images('<DATASET_NAME>')

# Insert the data
for url in img_urls:
    id = dataset.insert(url, metadata={'src_url': url})
    
# Delete some of it
dataset.delete(id)

# Query top 5 similar images
items = dataset.search_image(img_urls[-1], 5)

# Query top 5 similar images using textual query
items = dataset.search_text('cute puppy', 5)
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'anndb_api'

# Create a client instance
client = AnndbApi::Client.new("<YOUR_API_KEY")

# Load the dataset
dataset = client.images("<DATASET_NAME>")

img_urls.each do |url|
    id = dataset.insert(url, metadata={ "src_url": url })
end
    
# Delete some of it
dataset.delete(id)

# Query top 5 similar images
items = dataset.search_image(img_urls.last, 5)

# Query top 5 similar images using textual query
items = dataset.search_text("cute puppy", 5)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.anndb.com/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
