This is a Sanity Studio v3 plugin.
npm install sanity-plugin-asset-source-openai
Add it as a plugin in sanity.config.ts
(or .js):
import {defineConfig} from 'sanity'
import {openaiImageAsset} from 'sanity-plugin-asset-source-openai'
export default defineConfig({
// ...
plugins: [openaiImageAsset({
API_KEY:"your_api_key_from_openai"
})],
})
https://www.loom.com/share/267fed477cf4458394eb2c2e4c964efc
MIT © Hrithik Prasad
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.