AI Applications
Build and scale AI-native products with access to leading models through a single integration.
Access the world's leading AI models through a single integration. Optimize for cost, performance, and reliability without the complexity of managing multiple providers.
response = client.responses.create(
model="auto",
input="Name a fast, all-in-one AI API.",
)
print(response.output_text)Intelligent Routing
Route requests based on cost, latency, quality, and availability. Compare models, configure routing preferences, or let Nayra automatically select the optimal route for every request.
Performance
Access high-performance inference across multiple providers. Optimize for faster response times and higher throughput without compromising your choice of model.
Use cases
Build and scale AI-native products with access to leading models through a single integration.
Leverage the best models for code generation, reasoning, debugging, and software development.
Power complex agentic workflows with intelligent model selection and optimized inference.
Automate workflows at scale while optimizing inference costs and performance across tasks.
Consolidate AI infrastructure, simplify provider management, and centralize inference spending.
Experiment, benchmark, and evaluate models without building separate integrations.
Developer docs
Change your endpoint, not your infrastructure. Access the entire AI ecosystem through a single API.
Request API access# pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["NAYRA_BASE_URL"],
api_key=os.environ["NAYRA_API_KEY"],
)
response = client.responses.create(
model="auto",
input="Explain the difference between intelligence and knowledge.",
)
print(response.output_text)// Node.js ES module (.mjs or .mts): bun add openai
import OpenAI from "openai";
const baseURL = process.env.NAYRA_BASE_URL;
const apiKey = process.env.NAYRA_API_KEY;
if (!baseURL || !apiKey) {
throw new Error("Set NAYRA_BASE_URL and NAYRA_API_KEY.");
}
const client = new OpenAI({ baseURL, apiKey });
const response = await client.responses.create({
model: "auto",
input: "Explain the difference between intelligence and knowledge.",
});
console.log(response.output_text);// In a Cargo project, save as src/main.rs.
// cargo add reqwest --features blocking,json
// cargo add serde_json
use reqwest::blocking::Client;
use serde_json::json;
use std::{env, error::Error};
fn main() -> Result<(), Box<dyn Error>> {
let base = env::var("NAYRA_BASE_URL")?;
let key = env::var("NAYRA_API_KEY")?;
let url = format!("{}/responses", base.trim_end_matches('/'));
let response = Client::new()
.post(url)
.bearer_auth(key)
.json(&json!({
"model": "auto",
"input": "Explain the difference between intelligence and knowledge."
}))
.send()?
.error_for_status()?;
println!("{}", response.text()?);
Ok(())
}// In a Go module: go get github.com/openai/openai-go/v3
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
"github.com/openai/openai-go/v3/responses"
)
func main() {
base, key := os.Getenv("NAYRA_BASE_URL"), os.Getenv("NAYRA_API_KEY")
if base == "" || key == "" {
log.Fatal("Set NAYRA_BASE_URL and NAYRA_API_KEY.")
}
client := openai.NewClient(option.WithBaseURL(base), option.WithAPIKey(key))
response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{
Model: "auto",
Input: responses.ResponseNewParamsInputUnion{
OfString: openai.String("Explain the difference between intelligence and knowledge."),
},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(response.OutputText())
}curl "${NAYRA_BASE_URL%/}/responses" \
-H "Authorization: Bearer $NAYRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"input": "Explain the difference between intelligence and knowledge."
}'Pricing & early access
One integration. Multiple providers. Endless possibilities. Get early access to Nayra and discover how we can optimize your AI infrastructure.