Content Generation
The Content Generation service provides chat completions and image generation using a variety of AI models, with usage tracking and streaming support.
Concepts
Models
neuroflash provides access to models from OpenAI, Anthropic, Google, and Mistral. Model availability depends on your pricing plan (Free, Pro, or Business).
Word Usage
Each completion tracks word usage. Input words are counted, and output words are estimated from token counts. Usage is tracked per workspace.
Streaming
Chat completions support Server-Sent Events (SSE) streaming for real-time response delivery.
Multi-turn Messages
For multi-turn conversations, pass the full message history in each request. The API is stateless — it does not persist conversation state on the server.
Image Generation
Generate images from text prompts (text-to-image) or edit existing images (image-to-image). Multiple models are available with configurable aspect ratios and output formats.
Image generation is not yet available in the Pay-As-You-Go plan. It is currently only accessible through subscription plans that include image generation credits.
Endpoints
Content Generation
Base path: https://app.neuroflash.com/api/ds-prototypes/content_generation
| Method | Endpoint | Description |
|---|---|---|
POST | /chat/completions | Generate a chat completion |
Image Generation
Base path: https://app.neuroflash.com/api/ds-prototypes/image_generation
| Method | Endpoint | Description |
|---|---|---|
POST | / | Generate image from text prompt |
POST | /edit | Generate image from existing image |
GET | /models | List available image models |
GET | /history | Get generation history |
GET | /history/{image_id} | Get a specific generation |
DELETE | /history/{image_id} | Delete a generation |
Model Selection
Base path: https://app.neuroflash.com/api/ds-prototypes/model_selection
| Method | Endpoint | Description |
|---|---|---|
GET | /models | List available AI models |