ToolsIntegrations
openaiImages
OpenAI Images API (DALL-E / gpt-image) — generate images from prompts.
import { openaiImages } from '@agentskit/tools'
const runtime = createRuntime({
adapter,
tools: [...openaiImages({ apiKey: process.env.OPENAI_API_KEY! })],
})#Sub-tools
| Name | Purpose |
|---|---|
openaiImagesGenerate | Create images from a text prompt |
Bundled: openaiImages(config).
#Config
type OpenAIImagesConfig = {
apiKey: string
model?: 'gpt-image-1' | 'dall-e-3' | 'dall-e-2'
defaultSize?: '1024x1024' | '1792x1024' | '1024x1792'
fetch?: typeof fetch
}#Example — marketing visual assistant
const runtime = createRuntime({
adapter,
tools: [
...openaiImages({ apiKey, model: 'gpt-image-1' }),
...s3({ client, bucket: 'creatives' }),
],
})
await runtime.run('Generate 3 hero images for an "AI for JavaScript" launch post, upload to S3.')#Cost
Image generation is orders of magnitude more expensive than text — wrap via costGuard or require HITL.
#Related
Explore nearby
- PeerIntegrations
20+ ready-made connectors for the services agents actually need. Each follows the same contract — install, config, execute — and ships granular sub-tools alongside a bundled set.
- Peergithub
GitHub REST v3 — search issues, create issues, comment. Pairs with HITL for ship-gating bots.
- PeergithubActions
GitHub Actions — list runs and trigger workflow_dispatch events.