Skip to main content

ServerlessAI

Build, scale, and monetize AI app without backend.

How it works

ServerlessAI provides an OpenAI-compatible API safe for client-side use. Authenticate users via any OpenID Connect provider, like Google or Apple. Set the OpenAI SDK's base URL to ServerlessAI, and include your Project ID and the user's JWT token. Guest users and machine-to-machine scenarios are also supported.
Step 1. Install OpenAI NPM package.
npm install openai
Step 2. Create a client with the project ID and the user's JWT token from your authentication provider.
const client = new OpenAI({
baseURL: 'https://openai.api.serverlessai.dev/v1',
apiKey: `${PROJECT_ID}:${session.getUserJWT()}`,
dangerouslyAllowBrowser: true, // this is no longer dangerous :)
}
Want to see a complete example? Check out our 5 minute tutorial.

Focus on What Matters

Create AI enabled applications without worrying about infrastructure. Whether you have one customer or a million, we will scale with you.

You Are In Control

Never worry about surprise bill. ServerlessAI gives you full visibility into your costs, and you can set quota for each user to prevent abuse.

Latest and Greatest

Use the latest models from OpenAI, Anthropic, Mistral AI, and more. Switch between models without changing your code, and seamlessly fallback to another when one is not available.