---
title: "OpenAI GPT-4o: Complete Multimodal AI Integration with Vision, Audio, and Embeddings in Pixeltable"
date: "2025-03-15"
author: "Pixeltable Team"
tags:
  - OpenAI
  - GPT-4o
  - Multimodal AI
  - Vision AI
  - DALL-E
  - Whisper
  - Embeddings
  - AI Integration
  - Pixeltable
description: "Build powerful AI applications using OpenAI's full suite of capabilities. Learn how to use GPT-4o for chat, vision, and audio, plus DALL-E for images and embeddings for search, all orchestrated by Pixeltable."
url: "https://pixeltable.com/blog/openai-gpt4-multimodal-integration-pixeltable"
---

# OpenAI GPT-4o: Complete Multimodal AI Integration with Vision, Audio, and Embeddings in Pixeltable

OpenAI's GPT-4o is the most widely adopted multimodal AI model. This guide shows you how to integrate OpenAI's full suite of APIs with Pixeltable for production-ready AI applications.

 
## OpenAI: The Foundation of Modern AI Applications

 
**OpenAI** provides the most comprehensive AI platform with capabilities spanning text, vision, audio, images, and embeddings.

 
 
When combined with Pixeltable's [declarative infrastructure](/blog/unified-multimodal-ai-infrastructure-pixeltable), you get seamless access to OpenAI with automatic orchestration.

 
## Available Models

 

 - **GPT-4o:** Flagship multimodal model

 - **GPT-4o-mini:** Cost-effective for high volume

 - **text-embedding-3:** State-of-the-art embeddings

 - **DALL-E 3:** Premium image generation

 - **Whisper:** Speech-to-text transcription

 

 
## Getting Started

 
```bash
# Install required packages
pip install pixeltable openai

# Set your OpenAI API key
export OPENAI_API_KEY="your-api-key-here"
```

 
## Chat Completions

 
```python
import pixeltable as pxt
from pixeltable.functions import openai

pxt.drop_dir('openai_demo', force=True)
pxt.create_dir('openai_demo')

t = pxt.create_table('openai_demo.chat', {'input': pxt.String})

messages = [{'role': 'user', 'content': t.input}]
t.add_computed_column(output=openai.chat_completions(
 messages=messages,
 model='gpt-4o',
 model_kwargs={'max_tokens': 300}
))

t.add_computed_column(response=t.output.choices[0].message.content)

t.insert([{'input': 'What is the capital of France?'}])
t.select(t.input, t.response).show()
```

 
## Vision Analysis

 
```python
import pixeltable as pxt
from pixeltable.functions import openai

images = pxt.create_table('openai_demo.images', {
 'image': pxt.Image,
 'question': pxt.String
})

images.add_computed_column(
 analysis=openai.chat_completions(
 messages=[{
 'role': 'user',
 'content': [{
 'type': 'image_url',
 'image_url': {'url': images.image}
 }, {
 'type': 'text',
 'text': images.question
 }]
 }],
 model='gpt-4o',
 model_kwargs={'max_tokens': 300}
 ).choices[0].message.content
)

images.insert([{
 'image': 'https://example.com/chart.png',
 'question': 'What does this chart show?'
}])

images.show()
```

 
## Text Embeddings

 
```python
import pixeltable as pxt
from pixeltable.functions import openai

docs = pxt.create_table('openai_demo.docs', {'text': pxt.String})

docs.add_computed_column(
 embedding=openai.embeddings(
 input=docs.text,
 model='text-embedding-3-small'
 )
)

docs.insert([
 {'text': 'Machine learning transforms industries'},
 {'text': 'Deep learning is a subset of ML'}
])

docs.show()
```

 
## Image Generation with DALL-E

 
```python
import pixeltable as pxt
from pixeltable.functions import openai

art = pxt.create_table('openai_demo.art', {'prompt': pxt.String})

art.add_computed_column(
 generated=openai.image_generation(
 prompt=art.prompt,
 model='dall-e-3',
 size='1024x1024'
 )
)

art.insert([{'prompt': 'A serene mountain landscape at sunset'}])
art.show()
```

 
## Pricing Overview

 
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
| --- | --- | --- |
| GPT-4o | $2.50 | $10.00 |
| GPT-4o-mini | $0.15 | $0.60 |
| text-embedding-3-small | $0.02 | - |

 
## Next Steps

 

 - [Try Anthropic Claude](/blog/claude-anthropic-multimodal-integration-pixeltable)

 - [Production RAG Guide](/blog/production-rag-data-centric)

 - [All Integrations](https://docs.pixeltable.com/integrations/frameworks)

 

 
## Resources

 

 - [Pixeltable OpenAI Documentation](https://docs.pixeltable.com/howto/providers/working-with-openai)

 - [OpenAI Documentation](https://platform.openai.com/docs)

 - [Join our Discord Community](https://discord.com/invite/QPyqFYx2UN)