Sanity Library Reference Docs
    Preparing search index...

    Interface SanityConfig

    Represents the complete configuration for a Sanity SDK instance

    interface SanityConfig {
        auth?: AuthConfig;
        dataset?: string;
        perspective?: ReleasePerspective | ClientPerspective$1;
        projectId?: string;
        resource?: DocumentResource;
        studio?: StudioConfig;
    }

    Hierarchy (View Summary)

    Index

    Properties

    auth?: AuthConfig

    Authentication configuration for the instance

    dataset?: string
    perspective?: ReleasePerspective | ClientPerspective$1
    projectId?: string
    resource?: DocumentResource

    Explicit resource to use. On an individual operation this overrides any default; on a SanityConfig it becomes the instance's default resource. Unlike projectId/dataset, this can also be a media library or canvas resource.

    studio?: StudioConfig

    Studio configuration provided by a Sanity Studio workspace. When present, the SDK operates in studio mode and derives auth from the workspace's reactive token source — no manual configuration needed.

    Typically set automatically by SanityApp when it detects an SDKStudioContext provider. Can also be set explicitly for programmatic use.