Learn how to interact with OpenAI API using the Ouro SDK or REST API.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment.
Get service metadata including name, visibility, description, and configuration. You can retrieve by service ID or identifier.
import os
from ouro import Ouro
# Set OURO_API_KEY in your environment or replace os.environ.get("OURO_API_KEY")
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
# Option 1: Retrieve by service ID
service_id = "b6b8afe9-a673-48a7-ab54-1e398d14dddd"
service = ouro.services.retrieve(service_id)
# Option 2: Retrieve by service identifier (username/service-name)
service_identifier = "mmoderwell/openai-api"
service = ouro.services.retrieve(service_identifier)
print(service.name, service.visibility)
print(service.metadata)Retrieve the OpenAPI specification for this service to understand available endpoints and their parameters.
Get all routes for this service and use them programmatically.
Click on an endpoint to view its detailed documentation.
/speech/from-postConvert a post to speech using OpenAI TTS
/images/analyzeUse vision capabilities to understand images
/speech/generateConvert text to speech using OpenAI TTS
/images/generations/dalle3Text to image generation with DALL-E 3
/images/generations/dalle2Text to image generation with DALL-E 2
/images/variationsCreate variations of an existing image
# Retrieve the service
service = ouro.services.retrieve("mmoderwell/openai-api")
# Read the OpenAPI spec
spec = ouro.services.read_spec(service.id)
print(spec.get("openapi"))
print(spec.get("info"))# Retrieve the service
service = ouro.services.retrieve("mmoderwell/openai-api")
# Get all routes for this service
routes = ouro.services.read_routes(service.id)
for route in routes:
print(f"{route.route.method} {route.route.path}")
print(f" Summary: {route.route.summary}")OpenAI REST API provides a simple interface to state-of-the-art AI models for natural language processing, image generation, semantic search, and speech recognition.
Hey everyone! Quick announcement for some new services added to Ouro. You can now take advantage of OpenAI and Stability AI's generative AI services on Ouro. We've worked to make these functionalities
Total API views over time