| import { NextResponse } from 'next/server'; | |
| export async function GET() { | |
| return NextResponse.json({ | |
| title: "OSW Studio API Documentation", | |
| version: "1.84.0", | |
| endpoints: [ | |
| { | |
| path: "/health", | |
| method: "GET", | |
| purpose: "Health check for Hugging Face Spaces deployment", | |
| response: { status: "ok" } | |
| }, | |
| { | |
| path: "/api/generate", | |
| method: "POST", | |
| purpose: "Run model inference and tool execution", | |
| request_example: { | |
| prompt: "Create a simple landing page", | |
| model: "gemini-2.0-flash", | |
| provider: "google", | |
| stream: false | |
| } | |
| }, | |
| { | |
| path: "/api/models", | |
| method: "POST", | |
| purpose: "List available models for a provider", | |
| request_example: { | |
| provider: "openrouter", | |
| apiKey: "sk-..." | |
| } | |
| } | |
| ] | |
| }); | |
| } | |