File size: 902 Bytes
83aefb7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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-..."
        }
      }
    ]
  });
}