OptionalallowAPI host to use. Defaults to 'api.sanity.io'
API version in YYYY-MM-DD format. Required to prevent breaking changes. Use current date to get latest features.
OptionaldatasetDataset name to use
OptionalfetchOptionalignoreIgnore warning about tokens in browser environments
OptionalmaxNumber of times to retry failed requests
OptionalperspectiveThe perspective to use when querying documents.
OptionalprojectProject ID to connect to
OptionalproxyHTTP/HTTPS proxy URL to use
OptionalrequesterOptionalrequestOptional prefix added to all request tags. Used to filter and aggregate log data in request logs.
OptionalresultWhether to include Content Source Maps in API responses. Useful for visual editing and debugging.
OptionalretryFunction to calculate retry delay in milliseconds. Default is exponential backoff with random jitter: delay = 100 * 2^attemptNumber + random(0,100)
The fully initialized stega config, can be used to check if stega is enabled
OptionaltimeoutRequest timeout in milliseconds
OptionaltokenToken for authentication. Required for certain operations like mutations or accessing drafts
Whether 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.
OptionalwithWhether to send credentials with requests
Whether the client can be reconfigured after initialization