AI
Enable AI features in your app for chat, text generation, and image creation using OpenRouter.
Tools
- OpenRouter – Access multiple AI models for chat, text, and images.
Setup
- Sign up at OpenRouter.
- Create an API Key in Account → API Keys.
- Add the environment variable:
OPENROUTER_API_KEY="your-openrouter-api-key" - Select your default model in the config:
shared/config.ts
ai: { model: 'openai/gpt-4o', // You can switch to any model from openrouter.ai/models },
Usage
ShipAhead includes ready-to-use AI pages so you don’t have to code:
- AI Chat –
/app/pages/ai/chat.vue
A ready made chat interface powered by your configured AI model. - AI Text Generator –
/app/pages/ai/text.vue
Enter text, generate output, and see results instantly. The API prompt and user input are combined in one request. - AI Image Generator –
/app/pages/ai/image.vue
Generate images from prompts using supported models.