Skip to content

Frontend Cloud

Frontend Cloud is a hosted AI environment at cloud.frontend.co, designed to accelerate the development of conversational agents. It provides the essential infrastructure your agents need out of the box — chat history for persistent conversations, memory and context management, a document store for grounding agents in your own knowledge, and media storage for managing images, audio, video, and PDF files.

Instead of wiring together separate services for persistence, retrieval, and file management, Frontend Cloud gives you a unified backend that works seamlessly with your Next.js agent from day one.

  • Chat History - Persist and retrieve conversation threads so your agents maintain context across sessions
  • Knowledge - Upload documents to a knowledge store that your agents can query for grounded, accurate responses
  • Storage - Manage media assets including images, audio, video, and PDF files used by or generated by your agents
  • Contacts - Store and manage user profiles and contact information for personalized agent interactions

Frontend Cloud provides an OpenRouter-compatible LLM endpoint, giving your agents access to frontier AI models. OpenRouter is a leading platform for accessing a wide range of multi-modal LLM models from providers like Anthropic, OpenAI, Google, and others. Through Frontend Cloud, you get access to these models without needing a direct OpenRouter account — pricing is included in your Frontend subscription. You can use it with the Vercel AI SDK via the OpenRouter provider:

import { createOpenRouter } from '@openrouter/ai-sdk-provider';
const openrouter = createOpenRouter({
apiKey: process.env.OPENROUTER_API_KEY!,
baseURL: 'https://cloud.frontend.co/api/v1',
});

The endpoint is also directly compatible with any OpenAI-compatible client using the base URL:

https://cloud.frontend.co/api/v1

This means you can use any SDK or HTTP client that supports the OpenAI API format — simply point it at the Frontend Cloud endpoint and authenticate with your API key.

All Frontend Cloud data — chats, messages, contacts, documents, and storage — is hosted on a cloud Supabase account managed by Frontend. When you create a new project, you’ll receive credentials for your cloud Supabase instance (e.g., supabase.frontend.co or supabase2.frontend.co).

You can use the supabase-js client directly to query your cloud data. When initializing the client, you must pass your Frontend API key in the x-api-key header. You can generate an API key from Project > Settings > API Keys.

import { createClient } from '@supabase/supabase-js';
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
global: {
headers: {
'x-api-key': process.env.FRONTEND_API_KEY!,
},
},
}
);

Once initialized, you can query chats, messages, contacts, documents, and storage directly using the standard Supabase client methods.

The following environment variables are automatically available in your agent project:

  • NEXT_PUBLIC_SUPABASE_URL - Your cloud Supabase instance URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY - Your Supabase anonymous key
  • NEXT_PUBLIC_SUPABASE_FOLDER_ID - Your designated storage folder ID
  • FRONTEND_API_KEY - Your Frontend API key (created from Project > Settings > API Keys)

For file storage, your project has a designated bucket and folder on Supabase Storage. The bucket name is apps, and your folder is identified by the NEXT_PUBLIC_SUPABASE_FOLDER_ID environment variable. Use these when uploading or retrieving files:

const path = `${process.env.NEXT_PUBLIC_SUPABASE_FOLDER_ID}/my-file.png`;
const { data, error } = await supabase.storage
.from('apps')
.upload(path, file);