Proyecta AI Gateway
Add AI features to your published app — chatbots, content generation, summarization. OpenAI-compatible. No third-party API keys required.
The Proyecta AI Gateway lets the apps you build call frontier LLMs without you having to create accounts with each provider, manage their API keys, or front the cost. It’s OpenAI-compatible — point the OpenAI SDK at the gateway and you’re done.
What can I build with it?
Section titled “What can I build with it?”- Chatbots — customer support, AI coaching, FAQ bots
- Content generation — descriptions, emails, summaries, drafts
- Analysis — extract insights from text, categorize data, classify
- Summarization — condense documents, articles, transcripts
- Personalization — recommendations, adaptive UI
Quickstart
Section titled “Quickstart”The gateway speaks the OpenAI Chat Completions protocol. Use the official OpenAI SDK with two changes — baseURL and the env-var name for the key:
import OpenAI from 'openai';
const openai = new OpenAI({ baseURL: 'https://cloud.proyecta.dev/v1/ai', apiKey: process.env.PROYECTA_API_KEY,});
const response = await openai.chat.completions.create({ model: 'gpt-4.1-nano', messages: [{ role: 'user', content: 'Summarize this article in 3 bullet points: …' }],});Ask the AI builder to wire this up for you: "Add a chatbot to my app using the Proyecta AI Gateway. The user types a question and gets a streaming response."
Streaming
Section titled “Streaming”Streaming works like any OpenAI-compatible client:
const stream = await openai.chat.completions.create({ model: 'gpt-4.1-nano', messages: [{ role: 'user', content: prompt }], stream: true,});
for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content ?? '');}Models
Section titled “Models”Models from these providers are available via the gateway:
| Provider | Example models |
|---|---|
| Anthropic | claude-sonnet-4-6, claude-haiku-4-5-20251001, claude-opus-4-7 |
| OpenAI | gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o3, o4-mini |
gemini-2.5-pro, gemini-2.5-flash | |
| Groq | llama-3.3-70b-versatile, deepseek-r1-distill-qwen-32b |
Pass the model ID directly, e.g. gpt-4.1-nano, claude-sonnet-4-6, gemini-2.5-flash.
API keys, rate limits, and budgets
Section titled “API keys, rate limits, and budgets”Proyecta automatically provisions a PROYECTA_API_KEY for your runtime. You don’t need to create one manually for the common case.
For more advanced setups (multi-app orgs, model allowlists, per-key rate limits, expirations), API keys can be created and managed at the organization level. Each key can carry:
- A name (for tracking)
- An optional runtime scope (lock the key to one app)
- An allowed model list (e.g. only Claude models)
- A rate limit per minute
- An expiration
Organization owners can also see AI credits usage for the current period (current spend, budget cap, and overage markup) — this is what powers the credits indicator in the builder.
How is it billed?
Section titled “How is it billed?”AI Gateway usage is tracked separately from the credits the AI builder consumes when it edits your app. Per-request cost is the underlying provider’s rate, applied to your org’s AI credits balance.
What’s the difference between the AI Gateway and the AI builder?
The AI builder is the agent that writes code in the chat panel. The AI Gateway is what your published app calls when its users want an AI feature.
Can I bring my own provider keys?
You can — ask the AI to remove the gateway calls and configure a direct integration with your own key in Environment Variables. You’ll lose the unified billing and shared rate limit pool.
Can I use it for image or voice generation?
Not yet. Today the gateway is text-in / text-out. Image, voice, and video modalities are on the roadmap. For image generation, see Image Generation.
Where can I see usage and manage keys?
API key management and credits usage live at the organization level (in the Settings page). A dedicated AI Gateway panel inside the builder — with per-app keys and live usage charts — is on the roadmap.
Coming soon
Section titled “Coming soon”- Builder panel for AI Gateway — create per-app keys, set model allowlists, watch live spend, all without leaving the builder
- Image and voice modalities — text-to-image, text-to-speech, speech-to-text
- Per-runtime usage attribution — see which apps in your org are spending what