What it is
sanity-plugin-asset-source-openai adds OpenAI image generation as a native asset source in Sanity Studio v3. When an editor opens the asset picker on any image field, they see an extra tab alongside the file upload and existing media options. They write a prompt, generate an image with DALL-E, and it lands straight in the asset library.
The distinction from sanity-plugin-image-gen is where the generation surface lives: this one slots into the asset picker itself rather than a dedicated field action. If your editorial flow already centres on the picker, this fits in without any extra steps.
What you get
- OpenAI image generation as a first-class asset source tab in the standard Sanity picker.
- Generated images saved directly to the project's asset library, available for reuse.
- Simple API key configuration with no extra infrastructure needed on the server side.
- Compatible with Sanity Studio v3 schemas and field types.
How to use it
Install it from the Sanity Exchange or from npm:
Then register it in your studio config with your OpenAI key:
Keep the key in an environment variable and read it in at config time; avoid committing it to source control.
How we use it
On projects where editors do most of their work through the asset picker, this fits the generation step into a workflow they already know. We open-sourced it so other teams building Sanity studios can add the same capability without writing the integration from scratch.