# Get started

#### 1. Create Credential for Private Image

```bash

curl -X POST https://api.yottalabs.ai/v2/container-registry-auths \
  -H "X-Api-Key: {X-Api-Key}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-private-registry",
    "type": "DOCKER_HUB",
    "username": "myuser",
    "password": "mypassword"
  }'
```

#### 2. Create VM

```bash
curl -X POST https://api.yottalabs.ai/v2/vms \
  -H "X-Api-Key: {X-Api-Key}" \
  -H "Content-Type: application/json" \
  -d '{
    "vmTypeId": 1,
    "region": "us-east-1",
    "name": "dev-vm",
    "isSpot": 0,
    "volumeMountPaths": {
      "123": "/mnt/data",
      "456": "/mnt/models"
    }
  }'
```

#### 3. Create Pod with GPU

<pre class="language-bash"><code class="lang-bash"><strong>curl -X POST https://api.yottalabs.ai/v2/pods \
</strong>  -H "X-Api-Key: {X-Api-Key}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "training-pod",
    "image": "pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime",
    "gpuType": "NVIDIA_RTX_4090_24G",
    "gpuCount": 2,
    "containerVolumeInGb": 100
  }'
</code></pre>

#### 4. Create Elastic Endpoint (QUEUE Mode)

```bash
curl -X POST https://api.yottalabs.ai/v2/serverless \
  -H "X-Api-Key: {X-Api-Key}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "api-endpoint",
    "image": "vllm/vllm-openai:latest",
    "containerRegistryAuthId": 123,
    "resources": [
      {
        "region": "us-east-1",
        "gpuType": "NVIDIA_RTX_4090_24G",
        "gpuCount": 1
      }
    ],
    "workers": 2,
    "containerVolumeInGb": 120,
    "expose": {
      "port": 8000,
      "protocol": "http"
    },
    "serviceMode": "QUEUE"
  }'
```

#### 5. List and Monitor Resources

```bash
# List VMs
curl https://api.yottalabs.ai/v2/vms?page=1&size=10 \
  -H "X-Api-Key: {X-Api-Key}"

# List Pods
curl https://api.yottalabs.ai/v2/pods \
  -H "X-Api-Key: {X-Api-Key}"

# List Endpoints
curl https://api.yottalabs.ai/v2/serverless \
  -H "X-Api-Key: {X-Api-Key}"
```


---

# 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.yottalabs.ai/api-and-sdk/api-guides/get-started.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.
