API Playground

Failed to connect to API server. Please check your connection and try again.
200 OK 156ms 1.2 KB
{
  "ok": true,
  "answer": "According to the company policies document, vacation rules are as follows:\n\n1. **Annual Days**: 22 working days per year worked.\n2. **Accumulation**: Up to 5 days can be carried to the next year.\n3. **Request**: Must be requested at least 15 days in advance.\n4. **Approval**: Direct supervisor must approve the dates.\n\nWould you like more information about any specific aspect?",
  "meta": {
    "conversation_id": "conv_a1b2c3d4e5f6",
    "rag_used": true,
    "sources": [
      {
        "doc_id": "doc_policies_2026",
        "chunk_id": "chunk_42",
        "score": 0.92
      }
    ],
    "usage": {
      "prompt_tokens": 1024,
      "completion_tokens": 256,
      "total_tokens": 1280
    },
    "subscription": {
      "plan": "vantio-core-business",
      "status": "active"
    }
  }
}
No response yet
Click "Send" to make a request
Code Snippet
curl -X POST 'https://api.vantio.pro/v1/chat' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer vdek_prod_a1b2c3d4e5f6' \
  -H 'X-Tenant-ID: ES/vantio/core/acme-corp/dev-team' \
  -d '{
  "message": "What are the vacation policies?",
  "app_id": "app_demo_assistant",
  "metadata": {
    "conversation_id": null,
    "stream": false
  }
}'
import requests

url = "https://api.vantio.pro/v1/chat"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer vdek_prod_a1b2c3d4e5f6",
    "X-Tenant-ID": "ES/vantio/core/acme-corp/dev-team"
}
data = {
    "message": "What are the vacation policies?",
    "app_id": "app_demo_assistant",
    "metadata": {
        "conversation_id": None,
        "stream": False
    }
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://api.vantio.pro/v1/chat', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer vdek_prod_a1b2c3d4e5f6',
    'X-Tenant-ID': 'ES/vantio/core/acme-corp/dev-team'
  },
  body: JSON.stringify({
    message: 'What are the vacation policies?',
    app_id: 'app_demo_assistant',
    metadata: {
      conversation_id: null,
      stream: false
    }
  })
});

const data = await response.json();
console.log(data);
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    url := "https://api.vantio.pro/v1/chat"

    payload := map[string]interface{}{
        "message": "What are the vacation policies?",
        "app_id":  "app_demo_assistant",
        "metadata": map[string]interface{}{
            "conversation_id": nil,
            "stream":          false,
        },
    }

    jsonData, _ := json.Marshal(payload)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer vdek_prod_a1b2c3d4e5f6")
    req.Header.Set("X-Tenant-ID", "ES/vantio/core/acme-corp/dev-team")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}