📦 DOCUMENTATION SDK

SDK officiels VoxPria – À venir

Bibliothèques préconstruites pour Python, Node.js, PHP, Ruby, Java et C#. Pendant que nous finalisons nos SDK, vous pouvez utiliser directement notre API REST — c’est simple et compatible avec n’importe quel langage.

🛠️ État de développement des SDK

Nous développons activement des SDK officiels pour tous les principaux langages de programmation

🐍

SDK Python

État : En développement

Cible : T2 2026

pip install voxpria

✓ Indications de type incluses

✓ Prise en charge async/await

✓ Python 3.8+

📦

SDK Node.js

État : En développement

Cible : T2 2026

npm install voxpria

✓ Prise en charge de TypeScript

✓ API basée sur les promesses

✓ Node.js 18+

🐘

SDK PHP

État : En développement

Cible : T2 2026

composer require voxpria/sdk

✓ Chargement automatique PSR-4

✓ Client HTTP Guzzle

✓ PHP 8.0+

💎

SDK Ruby

État : Planifié

Cible : T3 2026

gem install voxpria

• Distribution via RubyGems

• Intégration ActiveSupport

• Ruby 3.0+

SDK Java

État : Planifié

Cible : T3 2026

Prise en charge Maven / Gradle

• JDK 11+

• Compatible Spring Boot

• Javadoc complet

#

SDK C#

État : Planifié

Cible : T3 2026

Paquet NuGet

• .NET 6+

• Modèle async/await

• Documentation XML

💻 Utiliser directement l’API REST

En attendant les SDK, vous pouvez utiliser notre API REST depuis n’importe quel langage. Voici des exemples :







🐍 Python Example

import requests

# Trigger an AI voice call
url = "https://api.voxpria.com/api/v1/calls"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "phoneNumber": "+14155551234",
    "agentId": "agent_abc123",
    "engine": "elevenlabs"
}

response = requests.post(url, json=payload, headers=headers)
call = response.json()

print(f"Call ID: {call['data']['id']}")
print(f"Status: {call['data']['status']}")

📦 Node.js Example

const fetch = require('node-fetch');

// Trigger an AI voice call
async function makeCall() {
  const response = await fetch('https://api.voxpria.com/api/v1/calls', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      phoneNumber: '+14155551234',
      agentId: 'agent_abc123',
      engine: 'elevenlabs'
    })
  });

  const call = await response.json();
  console.log(`Call ID: ${call.data.id}`);
  console.log(`Status: ${call.data.status}`);
}

makeCall();

🐘 PHP Example

 '+14155551234',
    'agentId' => 'agent_abc123',
    'engine' => 'elevenlabs'
]));

$response = curl_exec($ch);
$call = json_decode($response, true);

echo "Call ID: " . $call['data']['id'] . "n";
echo "Status: " . $call['data']['status'] . "n";

curl_close($ch);

💎 Ruby Example

require 'net/http'
require 'json'

# Trigger an AI voice call
uri = URI('https://api.voxpria.com/api/v1/calls')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = {
  phoneNumber: '+14155551234',
  agentId: 'agent_abc123',
  engine: 'elevenlabs'
}.to_json

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

call = JSON.parse(response.body)
puts "Call ID: #{call['data']['id']}"
puts "Status: #{call['data']['status']}"

☕ Java Example

import java.net.http.*;
import java.net.URI;
import org.json.*;

// Trigger an AI voice call
public class VoxPriaExample {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        
        JSONObject payload = new JSONObject();
        payload.put("phoneNumber", "+14155551234");
        payload.put("agentId", "agent_abc123");
        payload.put("engine", "elevenlabs");
        
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.voxpria.com/api/v1/calls"))
            .header("Authorization", "Bearer YOUR_API_KEY")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(payload.toString()))
            .build();
            
        HttpResponse response = client.send(request, 
            HttpResponse.BodyHandlers.ofString());
            
        JSONObject call = new JSONObject(response.body())
            .getJSONObject("data");
            
        System.out.println("Call ID: " + call.getString("id"));
        System.out.println("Status: " + call.getString("status"));
    }
}

# C# Example

using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

// Trigger an AI voice call
class Program
{
    static async Task Main()
    {
        var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
        
        var payload = new
        {
            phoneNumber = "+14155551234",
            agentId = "agent_abc123",
            engine = "elevenlabs"
        };
        
        var json = JsonSerializer.Serialize(payload);
        var content = new StringContent(json, Encoding.UTF8, "application/json");
        
        var response = await client.PostAsync(
            "https://api.voxpria.com/api/v1/calls", 
            content
        );
        
        var responseBody = await response.Content.ReadAsStringAsync();
        var call = JsonSerializer.Deserialize(responseBody);
        
        Console.WriteLine($"Call ID: {call.GetProperty("data").GetProperty("id")}");
        Console.WriteLine($"Status: {call.GetProperty("data").GetProperty("status")}");
    }
}

Soyez avisé au lancement des SDK

Inscrivez-vous pour un accès anticipé et soyez les premiers informés du lancement de nos SDK officiels