Skip to content

Welcome to Voidonยถ

Advanced AI Router Platform

Voidon is a comprehensive AI platform that provides intelligent microservices for text processing, model routing, anonymization, and document analysis. Built with scalability and privacy in mind.

๐Ÿš€ Key Featuresยถ

  • Intelligent AI Routerยถ

    Automatically selects the optimal AI model based on your requirements, balancing cost, performance, availability, multimodality and context length.

  • Privacy-First Anonymizationยถ

    Advanced PII detection and removal with semantic context preservation for secure text processing.

  • OpenAI Compatible APIยถ

    Drop-in replacement for OpenAI API with the /v1/chat/completions endpoint - no code changes required.

  • Document Intelligenceยถ

    Extract and process text from PDFs, Word documents, and other file formats with OCR capabilities and anonymize them.

๐Ÿƒโ€โ™‚๏ธ Quick Startยถ

Get started with Voidon in minutes:

Bash
1
2
3
4
5
6
7
8
9
curl -X POST https://api.voidon.astramind.ai/v1/chat/completions \
  -H "Authorization: Bearer your-voidon-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'
Python
import openai


client = openai.OpenAI(
    api_key="your-voidon-api-key",
    base_url="https://api.voidon.astramind.ai/v1"
)

response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices.message.content)
Python
import requests
import json

API_KEY = "your-voidon-api-key"
API_URL = "https://api.voidon.astramind.ai/v1/chat/completions"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "model": "auto",
    "messages": [{"role": "user", "content": "Hello!"}]
}

response = requests.post(API_URL, headers=headers, data=json.dumps(payload))

if response.status_code == 200:
    print(response.json()['choices']['message']['content'])
else:
    print(f"Error: {response.status_code} - {response.text}")
JavaScript
import OpenAI from 'openai';

const openai = new OpenAI({
    apiKey: 'your-voidon-api-key',
    baseURL: 'https://api.voidon.astramind.ai/v1'
});

async function main() {
    const response = await openai.chat.completions.create({
        model: 'auto',
        messages: [{ role: 'user', content: 'Hello!' }],
    });
    console.log(response.choices.message.content);
}

main();
JavaScript
const apiKey = 'your-voidon-api-key';
const apiUrl = 'https://api.voidon.astramind.ai/v1/chat/completions';

const payload = {
    model: 'auto',
    messages: [{ role: 'user', content: 'Hello!' }],
};

fetch(apiUrl, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${apiKey}`,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
})
.then(res => res.json())
.then(data => {
    console.log(data.choices.message.content);
})
.catch(error => console.error('Error:', error));
TypeScript
import OpenAI from 'openai';

const openai = new OpenAI({
    apiKey: 'your-voidon-api-key',
    baseURL: 'https://api.voidon.astramind.ai/v1'
});

async function main() {
    const response = await openai.chat.completions.create({
        model: 'auto',
        messages: [{ role: 'user', content: 'Hello!' }],
    });
    console.log(response.choices?.message?.content);
}

main();
TypeScript
const apiKey: string = 'your-voidon-api-key';
const apiUrl: string = 'https://api.voidon.astramind.ai/v1/chat/completions';

interface Message {
    role: 'user' | 'assistant' | 'system';
    content: string;
}

const payload: { model: string; messages: Message[] } = {
    model: 'auto',
    messages: [{ role: 'user', content: 'Hello!' }],
};

async function main() {
    try {
        const response = await fetch(apiUrl, {
            method: 'POST',
            headers: {
                'Authorization': `Bearer ${apiKey}`,
                'Content-Type': 'application/json'
            },
            body: JSON.stringify(payload)
        });

        if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
        }

        const data = await response.json();
        console.log(data.choices?.message?.content);
    } catch (error) {
        console.error('Error:', error);
    }
}

main();
PHP
<?php
require_once __DIR__ . '/vendor/autoload.php';

$client = OpenAI::factory()
    ->withApiKey('your-voidon-api-key')
    ->withBaseUri('api.voidon.astramind.ai/v1') 
    ->make();

$response = $client->chat()->create([
    'model' => 'auto',
    'messages' => [
        ['role' => 'user', 'content' => 'Hello!'],
    ],
]);

echo $response->choices->message->content; // Oggetto
// echo $response['choices']['message']['content']; // Array
PHP
<?php

$apiKey = 'your-voidon-api-key';
$url = 'https://api.voidon.astramind.ai/v1/chat/completions';

$payload = json_encode([
    'model' => 'auto',
    'messages' => [
        ['role' => 'user', 'content' => 'Hello!']
    ]
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $apiKey
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
echo $data['choices']['message']['content'];
Go
package main

import (
    "context"
    "fmt"
    "github.com/sashabaranov/go-openai"
)

func main() {
    config := openai.DefaultConfig("your-voidon-api-key")
    config.BaseURL = "https://api.voidon.astramind.ai/v1"
    client := openai.NewClientWithConfig(config)

    resp, err := client.CreateChatCompletion(
        context.Background(),
        openai.ChatCompletionRequest{
            Model: "auto",
            Messages: []openai.ChatCompletionMessage{
                {Role: openai.ChatMessageRoleUser, Content: "Hello!"},
            },
        },
    )
    if err != nil {
        fmt.Printf("Error: %v\n", err)
        return
    }
    fmt.Println(resp.Choices.Message.Content)
}
Go
package main

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

func main() {
    apiKey := "your-voidon-api-key"
    url := "https://api.voidon.astramind.ai/v1/chat/completions"

    requestBody, _ := json.Marshal(map[string]interface{}{
        "model": "auto",
        "messages": []map[string]string{
            {"role": "user", "content": "Hello!"},
        },
    })

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(requestBody))
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)

    var result map[string]interface{}
    json.Unmarshal(body, &result)


    choices := result["choices"].([]interface{})
    firstChoice := choices.(map[string]interface{})
    message := firstChoice["message"].(map[string]interface{})
    content := message["content"].(string)

    fmt.Println(content)
}
Java
// Dep: com.theokanning.openai-service
// Note: configuration of base_url with this lib requires
// the creation of a custom Retrofit instance 
import com.theokanning.openai.completion.chat.ChatCompletionRequest;
import com.theokanning.openai.completion.chat.ChatMessage;
import com.theokanning.openai.service.OpenAiService;
import java.util.List;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.jackson.JacksonConverterFactory;
import java.time.Duration;

public class VoidonExample {
    public static void main(String[] args) {
        String apiKey = "your-voidon-api-key";
        String baseUrl = "https://api.voidon.astramind.ai/"; // La v1 รจ nel path dell'endpoint

        // Configurazione client avanzata per impostare il Base URL
        OkHttpClient client = OpenAiService.defaultClient(apiKey, Duration.ofSeconds(60))
                .newBuilder()
                .build();
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(baseUrl)
                .client(client)
                .addConverterFactory(JacksonConverterFactory.create())
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                .build();

        OpenAiService service = new OpenAiService(retrofit.create(com.theokanning.openai.service.OpenAiApi.class));

        ChatCompletionRequest request = ChatCompletionRequest.builder()
            .model("auto")
            .messages(List.of(new ChatMessage("user", "Hello!")))
            .build();

        var response = service.createChatCompletion(request);
        System.out.println(response.getChoices().get(0).getMessage().getContent());
    }
}
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.io.IOException;

public class VoidonHttpExample {
    public static void main(String[] args) throws IOException, InterruptedException {
        String apiKey = "your-voidon-api-key";
        String url = "https://api.voidon.astramind.ai/v1/chat/completions";

        String jsonPayload = """
        {
            "model": "auto",
            "messages": [{"role": "user", "content": "Hello!"}]
        }
        """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .header("Authorization", "Bearer " + apiKey)
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
                .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());

        // Semplice parsing del JSON per l'esempio
        String responseBody = response.body();
        String content = responseBody.split("\"content\":\"").split("\"");
        System.out.println(content);
    }
}
Ruby
require 'openai'

client = OpenAI::Client.new(
  access_token: 'your-voidon-api-key',
  uri_base: 'https://api.voidon.astramind.ai/' # La libreria aggiunge /v1
)

response = client.chat(
  parameters: {
    model: 'auto',
    messages: [{ role: 'user', content: 'Hello!' }]
  }
)

puts response.dig('choices', 0, 'message', 'content')
Ruby
require 'uri'
require 'net/http'
require 'json'

api_key = 'your-voidon-api-key'
uri = URI('https://api.voidon.astramind.ai/v1/chat/completions')

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{api_key}"
request['Content-Type'] = 'application/json'
request.body = JSON.dump({
  "model": "auto",
  "messages": [{ "role": "user", "content": "Hello!" }]
})

response = http.request(request)

response_data = JSON.parse(response.read_body)
puts response_data.dig('choices', 0, 'message', 'content')

๐ŸŽฏ Example Use Casesยถ

  • ๐Ÿค– Efficient and Privacy First Agents


    Build intelligent agent systems with automatic model selection and privacy-preserving features.

    Python JS

  • ๐Ÿ›ก Data Privacy Chat Solutions


    Process sensitive documents and messages while automatically removing PII and maintaining compliance.

    Python JS

๐Ÿ“š Next Stepsยถ


Need help? Explore the API reference.