AI Media Functions
Generate images, audio, and video with AIIMAGE, AISPEECH, AIVIDEO, and GPTV functions
Overview
SheetMagic provides powerful AI media generation functions for creating images, audio, and video content directly in Google Sheets. These functions support multiple AI providers and models.
AIIMAGE
Generate images with AI using text descriptions.
Syntax
=AIIMAGE(prompt, [context])Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Image description or creative prompt |
context | string | No | Cell reference or additional context |
Returns
A clickable URL link to the generated image.
Examples
Basic image generation:
=AIIMAGE("A professional photo of a modern coffee shop interior")Product image:
=AIIMAGE("Product photo of " & A1 & " on a white background, studio lighting")Marketing asset:
=AIIMAGE("Social media banner for " & A1 & ", modern minimalist design, " & B1 & " color scheme")Supported Models
| Provider | Models |
|---|---|
| OpenAI | DALL-E 3, DALL-E 2, GPT Image 1 |
| Google Gemini | Imagen 4 Ultra, Imagen 4, Imagen 4 Fast, Gemini 2.5 Flash Image |
| OpenRouter | Gemini 3 Pro Image, Gemini 2.5 Flash Image, GPT-5 Image |
| Straico | DALL-E 3, Flux 1.1, Ideogram V3, Recraft V3, and more |
Use Cases
- Product photography
- Marketing banners
- Social media graphics
- Blog post images
- Concept visualization
- Logo concepts
GPTV
Analyze any image using AI vision capabilities.
Syntax
=GPTV(imageUrl, [prompt])Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
imageUrl | string | Yes | URL of the image to analyze |
prompt | string | No | Question or instruction about what to analyze. Default: "Analyze this image" |
Returns
AI's analysis and description of the image.
Examples
Basic image analysis:
=GPTV("https://example.com/product.jpg")With specific question:
=GPTV(A1, "Describe this product image in detail")Extract text from image:
=GPTV(A1, "Extract all text visible in this image")Product cataloging:
=GPTV(A1, "List all products visible in this image with estimated prices")Quality assessment:
=GPTV(A1, "Rate the quality of this product photo and suggest improvements")Requirements
GPTV requires OpenAI provider with GPT-4o or GPT-4o-mini model. Vision capabilities are not available with other providers.
Use Cases
- Image cataloging
- Product analysis
- OCR (text extraction)
- Quality assessment
- Content moderation
- Visual search
AISPEECH
Generate speech audio from text using AI.
Syntax
=AISPEECH(text, [voice])Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to convert to speech |
voice | string | No | Voice selection (default: "alloy") |
Available Voices
| Voice | Description |
|---|---|
alloy | Neutral, balanced voice (default) |
ash | Warm, conversational |
ballad | Expressive, dramatic |
coral | Clear, professional |
echo | Soft, calm |
fable | Storytelling, animated |
onyx | Deep, authoritative |
nova | Friendly, upbeat |
sage | Wise, measured |
shimmer | Light, energetic |
verse | Poetic, rhythmic |
Returns
A URL link to the generated audio file.
Examples
Basic text-to-speech:
=AISPEECH("Welcome to our product demo")With voice selection:
=AISPEECH(A1, "nova")Professional narration:
=AISPEECH(A1, "onyx")Requirements
AISPEECH requires OpenAI provider only. Text-to-speech is not available with other providers.
Use Cases
- Product demo narration
- Audio content creation
- Podcast snippets
- Voice-over generation
- Accessibility content
AIVIDEO
Generate videos from text descriptions using AI.
Syntax
=AIVIDEO(prompt, [context])Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Video description or creative prompt |
context | string | No | Cell reference or additional context |
Returns
A URL link to the generated video file.
Examples
Basic video generation:
=AIVIDEO("A coffee cup on a table with steam rising, cinematic lighting")Product showcase:
=AIVIDEO("Product showcase of " & A1 & ", rotating 360 degrees on white background")Marketing video:
=AIVIDEO("Modern office environment, people collaborating, upbeat mood")Supported Models
| Provider | Models |
|---|---|
| OpenAI | Sora 2 Pro, Sora 2 |
| Google Gemini | Veo 3, Veo 3 Fast |
| Straico | Google Veo 2, Runway Gen 4 Turbo, Kling 2.1 |
Use Cases
- Product demos
- Marketing videos
- Social media content
- Concept visualization
- Animated graphics
Best Practices
Image Generation Tips
- Be descriptive: Include details about style, lighting, composition
- Specify format: Mention "photo", "illustration", "3D render", etc.
- Include context: Background, mood, color scheme
=AIIMAGE("Professional product photo of " & A1 & ", white background, soft studio lighting, high resolution, e-commerce style")Vision Analysis Tips
- Use specific questions: Ask exactly what you want to know
- Batch processing: Analyze multiple images by referencing a column
- Structured output: Request specific formats like lists or JSON
=GPTV(A1, "Return JSON with: product_name, color, estimated_price, condition")Audio Generation Tips
- Match voice to content: Professional content → onyx/coral, friendly → nova/alloy
- Keep text concise: Shorter clips have better quality
- Punctuation matters: Use periods and commas for natural pauses
Provider Comparison
| Feature | OpenAI | Gemini | OpenRouter | Straico |
|---|---|---|---|---|
| Image Generation | DALL-E 3, GPT Image | Imagen 4 | Multiple | Multiple |
| Vision Analysis | GPT-4o | - | - | - |
| Text-to-Speech | 11 voices | - | - | ElevenLabs |
| Video Generation | Sora 2 | Veo 3 | - | Multiple |
Error Handling
Common errors and solutions:
| Error | Cause | Solution |
|---|---|---|
#ERROR! | Invalid API key | Verify your API key in settings |
#UNSUPPORTED! | Feature not available | Switch to a provider that supports the feature |
#LIMIT! | Rate limit or quota | Wait and retry, or check API usage |
#INVALID_URL! | Image URL not accessible | Ensure image URL is publicly accessible |