Take your first steps with the Ryo API.
The Ryo API provides a simple interface to state-of-the-art models for text generation, natural language processing, computer vision, and more. Get started by creating an API Key and running your first API call. Discover how to generate text, analyze images, build agents, and more.
Before you begin, create an API key in the dashboard, which you'll use to securely access the API. Store the key in a safe location, like a .bashrc file or another text file on your computer. Once you've generated an API key, export it as an environment variable in your terminal.
export RYO_API_KEY="your_api_key_here"
setx RYO_API_KEY "your_api_key_here"
Ryo SDKs are configured to automatically read your API key from the system environment.
To use the Ryo API in server-side JavaScript environments like Node.js, Deno, or Bun, you can use the official Ryo SDK for TypeScript and JavaScript.
npm install ryo
import { Ryo } from "ryo";
const client = new Ryo();
const response = await client.responses.create({
model: "ryo-1.0",
input: "Write a one-sentence bedtime story about a space-traveling cat."
});
console.log(response.output_text);
Install the official Ryo Python library to access the API from your Python applications.
pip install ryo
from ryo import Ryo
client = Ryo()
response = client.responses.create(
model="ryo-1.0",
input="Write a one-sentence bedtime story about a space-traveling cat."
)
print(response.output_text)
Execute the code and you should see the output of your API request in a few moments.
Send image URLs, uploaded files, or PDF documents directly to the model to extract text, classify content, or detect visual elements.
import { Ryo } from "ryo";
const client = new Ryo();
const response = await client.responses.create({
model: "ryo-1.0",
input: [
{
role: "user",
content: [
{
type: "input_text",
text: "What is in this image?"
},
{
type: "input_image",
image_url: "https://ryo-docs.app/images/space-cat.png"
}
]
}
]
});
console.log(response.output_text);
Use the Ryo platform to build agents capable of taking action—like controlling computers—on behalf of your users. Use the Agents SDK for Python or TypeScript to create orchestration logic on the backend.
import { Agent, run } from "@ryo/agents";
const spanishAgent = new Agent({
name: "Spanish agent",
instructions: "You only speak Spanish.",
});
const englishAgent = new Agent({
name: "English agent",
instructions: "You only speak English.",
});
const triageAgent = new Agent({
name: "Triage agent",
instructions: "Handoff to the appropriate agent based on the language.",
handoffs: [spanishAgent, englishAgent],
});
const result = await run(triageAgent, "Hola, ¿cómo estás?");
console.log(result.finalOutput);