Optional
allowReconfigure?: booleanOptional
apiHost?: stringAPI host to use. Defaults to 'api.sanity.io'
Optional
apiVersion?: stringAPI version in YYYY-MM-DD format. Required to prevent breaking changes. Use current date to get latest features.
Optional
dataset?: stringDataset name to use
Optional
fetch?: Optional
ignoreBrowserTokenWarning?: booleanIgnore warning about tokens in browser environments
Optional
maxRetries?: numberNumber of times to retry failed requests
Optional
perspective?: ClientPerspectiveThe perspective to use when querying documents.
Optional
projectId?: stringProject ID to connect to
Optional
proxy?: stringHTTP/HTTPS proxy URL to use
Optional
requester?: RequesterOptional
requestTagPrefix?: stringOptional prefix added to all request tags. Used to filter and aggregate log data in request logs.
Optional
resultSourceMap?: boolean | "withKeyArraySelector"Whether to include Content Source Maps in API responses. Useful for visual editing and debugging.
Optional
retryDelay?: (attemptNumber: number) => numberFunction to calculate retry delay in milliseconds. Default is exponential backoff with random jitter: delay = 100 * 2^attemptNumber + random(0,100)
Optional
stega?: StegaConfig | booleanOptions for encoding Content Source Maps using steganography. Used for visual editing features.
Optional
timeout?: numberRequest timeout in milliseconds
Optional
token?: stringToken for authentication. Required for certain operations like mutations or accessing drafts
Optional
useCdn?: booleanWhether to use the Sanity CDN API.
Set to true
to use edge caching for better performance.
Set to false
to always use the live API for fresh data.
Optional
useProjectHostname?: booleanOptional
withCredentials?: booleanWhether to send credentials with requests
Whether the client can be reconfigured after initialization