syaOS syaOS / Docs
GitHub Launch

API Reference

syaOS uses Vercel Serverless Functions with Edge runtime for all backend APIs.

API Request Flow

graph LR
    Client[Client App] --> Auth{Auth Check}
    Auth -->|Valid| Router[API Router]
    Auth -->|Invalid| Error[401 Error]
    Router --> Edge[Edge Runtime]
    Edge --> Services[External Services]
    Services --> AI[AI Providers]
    Services --> DB[(Redis/KV)]
    Services --> Media[Media APIs]
    Edge --> Response[JSON Response]
    Response --> Client

Endpoint Documentation

Endpoint GroupDescription
Chat APIMain AI chat with streaming and tool calling
Song APIMusic library CRUD, lyrics, furigana, translations
Media APIText-to-speech, transcription, YouTube search
Chat Rooms APIReal-time chat rooms with Pusher/Redis
AI Generation APIsApplet generation, IE time-travel, parse-title
Utility APIsLink preview, iframe check, share applet, admin

Quick Reference

AI Endpoints

EndpointPurpose
/api/chatMain AI chat with tool calling
/api/applet-aiApplet text + image generation
/api/ie-generateTime-travel page generation
/api/parse-titleMusic metadata extraction

Media Endpoints

EndpointPurpose
/api/song/Song library CRUD
/api/song/[id]Individual song operations
/api/speechText-to-speech
/api/audio-transcribeSpeech-to-text
/api/youtube-searchYouTube music search

Communication Endpoints

EndpointPurpose
/api/chat-roomsReal-time chat room management

Utility Endpoints

EndpointPurpose
/api/link-previewURL metadata extraction
/api/iframe-checkEmbeddability checking
/api/share-appletApplet sharing
/api/adminAdmin operations

Endpoint Categories Overview

graph TD
    API["/api/*"]
    API --> AI[AI Services]
    API --> Media[Media Services]
    API --> Comm[Communication]
    API --> Util[Utilities]
    
    AI --> chat["/chat"]
    AI --> applet["/applet-ai"]
    AI --> ie["/ie-generate"]
    AI --> parse["/parse-title"]
    
    Media --> song["/song/*"]
    Media --> speech["/speech"]
    Media --> transcribe["/audio-transcribe"]
    Media --> yt["/youtube-search"]
    
    Comm --> rooms["/chat-rooms"]
    
    Util --> preview["/link-preview"]
    Util --> iframe["/iframe-check"]
    Util --> share["/share-applet"]
    Util --> admin["/admin"]

Authentication

Authorization: Bearer {token}
X-Username: {username}

Token-based with 90-day expiration.

AI Providers

ProviderModels
OpenAIgpt-5, gpt-5.1, gpt-5-mini, gpt-4o, gpt-4.1, gpt-4.1-mini
Anthropicclaude-4.5, claude-4, claude-3.7, claude-3.5
Googlegemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview