50+ open-source generative AI apps you can clone, deploy, and monetize — image generators, video tools, virtual try-ons, AI SaaS templates, and platform integrations. One-click Vercel deploy on every template.
JavaScript ai-appsai-image-generatorai-saasai-toolsai-video-generatorawesomeawesome-listgenerative-aigenerative-ai-appsimage-generationnextjsnextjs-boilerplateopen-sourceopen-source-aisaas-boilerplatesaas-templateseedance2text-to-imagetext-to-videovideo-generation
export async function fetchAgentData(id, cookieHeader, byName = false) {
const endpoint = `http://127.0.0.1:8000/api/agents/by-slug/${id}`;
const res = await fetch(endpoint, {
cache: 'no-store',
headers: {
'Cookie': cookieHeader || '',
},
});
if (!res.ok) return null;
return await res.json();
}
export async function fetchHistoryData(agentSlug, conversationId, cookieHeader) {
const endpoint = `http://127.0.0.1:8000/api/agents/by-slug/${agentSlug}/${conversationId}`;
const res = await fetch(endpoint, {
cache: 'no-store',
headers: {
'Cookie': cookieHeader || '',
},
});
if (!res.ok) return null;
return await res.json();
}