Image Generation API
The Image Generation API allows Oliver to create charts, diagrams, and other visual content to support financial analysis and presentations. This includes generating charts from data, creating infographics, and visualizing complex financial concepts.
Supported Image Types
📊 Financial Charts
Line charts, bar charts, pie charts for financial data visualization including portfolio performance, asset allocation, and market trends.
📈 Investment Graphs
Growth projections, risk-return matrices, efficient frontier charts, and performance comparisons.
🏢 Organizational Charts
Corporate structure diagrams, reporting hierarchies, and team organization charts.
📋 Compliance Diagrams
Process flows, regulatory timelines, and compliance workflow diagrams.
💼 Presentation Graphics
Professional infographics, summary dashboards, and client presentation materials.
🎯 Custom Visualizations
Specialized financial diagrams, concept illustrations, and branded visual content.
Generate Image
Generate a custom image based on a text prompt. Oliver can create various types of visual content including charts, diagrams, and illustrations.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
prompt | string | Yes | Description of the image to generate (max 1000 characters) |
style | string | No | Image style (options: "professional", "corporate", "modern", "classic", "minimal") |
size | string | No | Image dimensions (options: "1024x1024", "1792x1024", "1024x1792") |
quality | string | No | Image quality (options: "standard", "hd") |
chat_id | string | No | Associate generated image with a specific chat |
data | array | No | Data points for chart generation (required for chart types) |
chart_type | string | No | Specific chart type (options: "line", "bar", "pie", "scatter", "area") |
branding | object | No | Corporate branding options (colors, logo, fonts) |
Example Request - Financial Chart
{
"prompt": "Create a professional line chart showing portfolio performance over the last 12 months",
"style": "professional",
"size": "1792x1024",
"quality": "hd",
"chart_type": "line",
"data": [
{"month": "Jan 2024", "value": 100000},
{"month": "Feb 2024", "value": 102500},
{"month": "Mar 2024", "value": 98750},
{"month": "Apr 2024", "value": 105200},
{"month": "May 2024", "value": 108900},
{"month": "Jun 2024", "value": 106400},
{"month": "Jul 2024", "value": 111200},
{"month": "Aug 2024", "value": 109800},
{"month": "Sep 2024", "value": 113500},
{"month": "Oct 2024", "value": 116200},
{"month": "Nov 2024", "value": 118750},
{"month": "Dec 2024", "value": 121300}
],
"branding": {
"primary_color": "#1f2937",
"secondary_color": "#3b82f6",
"company_name": "Advisors Asset Management"
},
"chat_id": "chat_123456789"
}
Example Request - Concept Illustration
{
"prompt": "Create a professional diagram illustrating the concept of portfolio diversification with different asset classes including stocks, bonds, real estate, and commodities",
"style": "corporate",
"size": "1024x1024",
"quality": "hd",
"branding": {
"primary_color": "#1f2937",
"secondary_color": "#3b82f6"
}
}
Example Response
{
"success": true,
"data": {
"image": {
"id": "img_123456789",
"url": "https://oliverchat.com/storage/generated-images/img_123456789.png",
"thumbnail_url": "https://oliverchat.com/storage/generated-images/thumbnails/img_123456789_thumb.png",
"prompt": "Create a professional line chart showing portfolio performance over the last 12 months",
"style": "professional",
"size": "1792x1024",
"quality": "hd",
"file_size": 2048576,
"mime_type": "image/png",
"chat_id": "chat_123456789",
"metadata": {
"chart_type": "line",
"data_points": 12,
"generation_model": "dall-e-3",
"processing_time_ms": 8500
},
"created_at": "2025-03-11T11:15:00Z",
"expires_at": "2025-06-11T11:15:00Z"
}
},
"message": "Image generated successfully"
}
List Generated Images
Get a list of images generated by the authenticated user.
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
page | integer | No | Page number (default: 1) |
per_page | integer | No | Items per page (default: 20, max: 100) |
chat_id | string | No | Filter by chat ID |
style | string | No | Filter by image style |
created_after | string | No | Filter by creation date (ISO 8601 format) |
created_before | string | No | Filter by creation date (ISO 8601 format) |
Example Response
{
"success": true,
"data": {
"images": [
{
"id": "img_123456789",
"url": "https://oliverchat.com/storage/generated-images/img_123456789.png",
"thumbnail_url": "https://oliverchat.com/storage/generated-images/thumbnails/img_123456789_thumb.png",
"prompt": "Professional line chart showing portfolio performance",
"style": "professional",
"size": "1792x1024",
"file_size": 2048576,
"chat_id": "chat_123456789",
"created_at": "2025-03-11T11:15:00Z"
},
{
"id": "img_123456790",
"url": "https://oliverchat.com/storage/generated-images/img_123456790.png",
"thumbnail_url": "https://oliverchat.com/storage/generated-images/thumbnails/img_123456790_thumb.png",
"prompt": "Diversification concept diagram with asset classes",
"style": "corporate",
"size": "1024x1024",
"file_size": 1536256,
"chat_id": null,
"created_at": "2025-03-11T10:45:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total": 2,
"total_pages": 1
}
},
"message": "Images retrieved successfully"
}
Get Image Details
Get detailed information about a specific generated image.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
image_id | string | Yes | ID of the generated image |
Example Response
{
"success": true,
"data": {
"image": {
"id": "img_123456789",
"url": "https://oliverchat.com/storage/generated-images/img_123456789.png",
"thumbnail_url": "https://oliverchat.com/storage/generated-images/thumbnails/img_123456789_thumb.png",
"prompt": "Create a professional line chart showing portfolio performance over the last 12 months",
"style": "professional",
"size": "1792x1024",
"quality": "hd",
"file_size": 2048576,
"mime_type": "image/png",
"chat_id": "chat_123456789",
"user_id": "user_987654321",
"metadata": {
"chart_type": "line",
"data_points": 12,
"generation_model": "dall-e-3",
"processing_time_ms": 8500,
"original_request": {
"data": [
{"month": "Jan 2024", "value": 100000},
{"month": "Feb 2024", "value": 102500}
],
"branding": {
"primary_color": "#1f2937",
"secondary_color": "#3b82f6",
"company_name": "Advisors Asset Management"
}
}
},
"download_count": 5,
"last_accessed": "2025-03-11T14:22:00Z",
"created_at": "2025-03-11T11:15:00Z",
"expires_at": "2025-06-11T11:15:00Z"
}
},
"message": "Image details retrieved successfully"
}
Delete Image
Delete a generated image from your account.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
image_id | string | Yes | ID of the image to delete |
Example Response
{
"success": true,
"data": null,
"message": "Image deleted successfully"
}
Chart Generation
Specialized endpoints for generating financial charts with structured data.
Create Financial Chart
Generate a financial chart with specific data and formatting options.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
chart_type | string | Yes | Type of chart (line, bar, pie, scatter, area, candlestick) |
title | string | Yes | Chart title |
data | array | Yes | Chart data points |
x_axis_label | string | No | X-axis label |
y_axis_label | string | No | Y-axis label |
theme | string | No | Chart theme (corporate, modern, classic) |
size | string | No | Chart size (small, medium, large, custom) |
format | string | No | Output format (png, svg, pdf) |
Example Request - Portfolio Allocation Pie Chart
{
"chart_type": "pie",
"title": "Portfolio Asset Allocation",
"data": [
{"label": "Large Cap Stocks", "value": 35, "color": "#3b82f6"},
{"label": "Small Cap Stocks", "value": 15, "color": "#8b5cf6"},
{"label": "International Stocks", "value": 20, "color": "#10b981"},
{"label": "Bonds", "value": 25, "color": "#f59e0b"},
{"label": "Cash", "value": 5, "color": "#6b7280"}
],
"theme": "corporate",
"size": "large",
"format": "png"
}
Example Response
{
"success": true,
"data": {
"chart": {
"id": "chart_987654321",
"url": "https://oliverchat.com/storage/charts/chart_987654321.png",
"type": "pie",
"title": "Portfolio Asset Allocation",
"format": "png",
"size": "1024x768",
"file_size": 156789,
"metadata": {
"data_points": 5,
"theme": "corporate",
"generation_time_ms": 2500
},
"created_at": "2025-03-11T11:30:00Z"
}
},
"message": "Chart generated successfully"
}
Usage Guidelines
- Standard users: 50 images per day
- Premium users: 200 images per day
- Enterprise users: 1000 images per day
- Be specific in your prompts for better results
- Use professional styling for client-facing materials
- Include company branding for consistency
- Specify chart types when generating data visualizations
- Use appropriate image sizes for your intended use case
API Tester
Test the Image Generation API endpoints directly from this documentation.