OptionalapiAPI version to use for requests. Should be in format 'vYYYY-MM-DD' (e.g., 'v2026-01-01').
OptionalapplicationDefault application for all agent and prompt calls.
When set, this application is used unless overridden per-call via AgentSettings.application or GenerateSettings.application.
Typically set automatically by createStudioAgent.
OptionalbundleVersion?: stringOptionalintentBaseUrl?: stringFormat: uri
Optionalkey?: stringOptionalname?: stringOptionalresource?: { id?: string; type?: "dataset" }Optionalid?: stringOptionaltype?: "dataset"OptionalschemaDescriptorId?: stringOptionaltitle?: stringOptionalbaseURLBase URL for the Sanity API.
OptionalfetchCustom fetch implementation. Useful for testing or adding middleware.
Optionalinit: RequestInitOptionalinit: RequestInitOptionalheadersCustom headers to include in requests.
Your Sanity organization ID.
When using createStudioAgent, this is fetched automatically from the project metadata.
OptionaltokenAuthentication token for the Sanity API. If not provided, requests will be made without authentication (useful for browser contexts where auth may come from cookies).
Settings for creating a Content Agent provider instance via createContentAgent.
Example