Developer quickstart

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.

Create and export an API key

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 an environment variable on macOS or Linux systems
export RYO_API_KEY="your_api_key_here"
set an environment variable on Windows (Command Prompt)
setx RYO_API_KEY "your_api_key_here"

Ryo SDKs are configured to automatically read your API key from the system environment.

Install the Ryo SDK and Run an API Call

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.

install the Ryo SDK with npm
npm install ryo
Test a basic API request
javascript
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.

install the Ryo SDK with pip
pip install ryo
Test a basic API request
python
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)
.NET SDK documentation coming soon.
Java SDK documentation coming soon.
Go SDK documentation coming soon.

Execute the code and you should see the output of your API request in a few moments.

Learn more on GitHub
Discover more SDK capabilities and options on the library's GitHub README.
Responses starter app
Start building with the Responses API.
Text generation and prompting
Learn more about prompting, message roles, and building conversational apps.

Analyze images and files

Send image URLs, uploaded files, or PDF documents directly to the model to extract text, classify content, or detect visual elements.

Analyze the content of an image
javascript
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);

Build agents

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.

Build a language triage agent
javascript
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);