Skip to main content

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.

Pay-As-You-Go

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

MethodEndpointDescription
POST/chat/completionsGenerate a chat completion

Image Generation

Base path: https://app.neuroflash.com/api/ds-prototypes/image_generation

MethodEndpointDescription
POST/Generate image from text prompt
POST/editGenerate image from existing image
GET/modelsList available image models
GET/historyGet 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

MethodEndpointDescription
GET/modelsList available AI models