Spaces:
Running
Running
File size: 2,692 Bytes
a72140d | 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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | import { NextResponse } from 'next/server';
export async function GET() {
const docs = {
endpoints: [
{
path: "/api/health",
method: "GET",
purpose: "Health check endpoint",
response: { status: "ok" }
},
{
path: "/api/api-docs",
method: "GET",
purpose: "API Documentation",
response: { endpoints: "[]" }
},
{
path: "/api/submit-job",
method: "POST",
purpose: "Transform a research paper into code and push to GitHub",
request: {
arxivUrl: "string (optional)",
paperContent: "string (optional)",
repo: "string (required, e.g., 'owner/repo')",
paperName: "string (optional)",
model: "string (optional)"
},
response: {
success: true,
githubUrl: "string",
branch: "string",
filesCount: "number"
}
},
{
path: "/api/scrape-website",
method: "POST",
purpose: "Scrape a website and return its content in markdown/HTML",
request: {
url: "string (required)",
formats: "string[] (optional, default: ['markdown', 'html'])"
},
response: {
success: true,
data: {
title: "string",
content: "string",
markdown: "string",
html: "string"
}
}
},
{
path: "/api/search",
method: "POST",
purpose: "Perform a web search using Firecrawl",
request: {
query: "string (required)"
},
response: {
results: [
{
url: "string",
title: "string",
description: "string",
screenshot: "string | null",
markdown: "string"
}
]
}
},
{
path: "/api/analyze-edit-intent",
method: "POST",
purpose: "Analyze intent for editing code",
request: {
prompt: "string",
files: "any[]"
},
response: {
intent: "string"
}
},
{
path: "/api/apply-ai-code",
method: "POST",
purpose: "Apply AI generated code changes",
request: {
code: "string",
sandboxId: "string"
},
response: {
success: "boolean"
}
},
{
path: "/api/conversation-state",
method: "GET/POST/DELETE",
purpose: "Manage conversation state",
request: "Varies",
response: "Varies"
}
]
};
return NextResponse.json(docs);
}
|