OptionalallowReconfigure?: booleanOptionalapiHost?: stringAPI host to use. Defaults to 'api.sanity.io'
OptionalapiVersion?: stringAPI version in YYYY-MM-DD format. Required to prevent breaking changes. Use current date to get latest features.
Optionaldataset?: stringDataset name to use
Optionalfetch?: OptionalignoreBrowserTokenWarning?: booleanIgnore warning about tokens in browser environments
OptionalmaxRetries?: numberNumber of times to retry failed requests
Optionalperspective?: ClientPerspectiveThe perspective to use when querying documents.
OptionalprojectId?: stringProject ID to connect to
Optionalproxy?: stringHTTP/HTTPS proxy URL to use
Optionalrequester?: RequesterOptionalrequestTagPrefix?: stringOptional prefix added to all request tags. Used to filter and aggregate log data in request logs.
OptionalresultSourceMap?: boolean | "withKeyArraySelector"Whether to include Content Source Maps in API responses. Useful for visual editing and debugging.
OptionalretryDelay?: (attemptNumber: number) => numberFunction to calculate retry delay in milliseconds. Default is exponential backoff with random jitter: delay = 100 * 2^attemptNumber + random(0,100)
Optionalstega?: StegaConfig | booleanOptions for encoding Content Source Maps using steganography. Used for visual editing features.
Optionaltimeout?: numberRequest timeout in milliseconds
Optionaltoken?: stringToken for authentication. Required for certain operations like mutations or accessing drafts
OptionaluseCdn?: 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.
OptionaluseProjectHostname?: booleanOptionalwithCredentials?: booleanWhether to send credentials with requests
Whether the client can be reconfigured after initialization