{
  "schemaVersion": 3,
  "ai4scholar": {
    "apiKey": "YOUR_AI4SCHOLAR_API_KEY",
    "timeoutMs": 30000,
    "crawlerTimeoutMs": 60000
  },
  "research": {
    "policy": { "allowPaidFallback": false, "allowExternalFulltextUpload": false },
    "providers": {
      "semantic-scholar": { "enabled": true, "apiKey": "YOUR_SEMANTIC_SCHOLAR_API_KEY" },
      "openalex": { "enabled": true, "apiKey": "YOUR_OPENALEX_API_KEY" },
      "pubmed": { "enabled": true, "apiKey": "YOUR_NCBI_API_KEY" },
      "arxiv": { "enabled": true },
      "crossref": { "enabled": true },
      "unpaywall": { "enabled": true, "contact": "researcher@example.org" },
      "easyscholar": { "enabled": true, "apiKey": "YOUR_EASYSCHOLAR_SECRET_KEY" }
    }
  },
  "data": {
    "providers": {
      "materials-project": { "enabled": true, "apiKey": "YOUR_MATERIALS_PROJECT_API_KEY", "maxRequests": 10, "maxResults": 100 },
      "cas-common-chemistry": { "enabled": true, "apiKey": "YOUR_CAS_COMMON_CHEMISTRY_API_KEY" }
    }
  },
  "sync": {
    "missingPolicy": "skip-and-report",
    "conflictPolicy": "preserve-local",
    "metadataPolicy": "three-way-merge",
    "reparsePolicy": "when-required-and-authorized",
    "backupRetentionDays": 30
  },
  "zotero": {
    "baseUrl": "http://127.0.0.1:23119/api",
    "timeoutMs": 15000,
    "maxItems": 5000
  },
  "output": {
    "directory": "./pi-scholar-output",
    "literaturesDirectory": "Literatures",
    "filenameSeparator": "-",
    "assetFilePrefix": "figure",
    "tagSpaceReplacement": "-"
  },
  "media": {
    "outputDir": "./pi-scholar-output/images",
    "maxArtifactBytes": 52428800,
    "artifactTimeoutMs": 120000,
    "providerOptions": {
      "gemini": { "apiKey": "YOUR_GEMINI_API_KEY", "baseUrl": "https://generativelanguage.googleapis.com/v1beta" },
      "vertex": { "credentialsFile": "./credentials/vertex-service-account.json", "location": "global" },
      "openai": { "apiKey": "YOUR_OPENAI_API_KEY", "baseUrl": "https://api.openai.com/v1" },
      "xai": { "apiKey": "YOUR_XAI_API_KEY", "baseUrl": "https://api.x.ai/v1" },
      "fal": { "apiKey": "YOUR_FAL_API_KEY" },
      "dashscope": { "apiKey": "YOUR_DASHSCOPE_API_KEY", "baseUrl": "https://dashscope.aliyuncs.com" },
      "qwencloud": { "apiKey": "YOUR_QWENCLOUD_API_KEY", "baseUrl": "https://dashscope-intl.aliyuncs.com" },
      "atlas": { "apiKey": "YOUR_ATLAS_API_KEY" }
    },
    "defaultModels": {
      "openai": { "image.text_to_image": "gpt-image-2", "image.edit": "gpt-image-2" },
      "custom-images": { "image.text_to_image": "your-image-model", "image.edit": "your-image-model" }
    },
    "customProviders": [{
      "id": "custom-images",
      "name": "Your OpenAI-compatible image service",
      "baseUrl": "https://images.example.com/v1",
      "apiKey": "YOUR_CUSTOM_IMAGE_API_KEY",
      "auth": "bearer",
      "models": [{
        "id": "your-image-model",
        "vendor": "custom",
        "capabilities": ["image.text_to_image", "image.edit"],
        "endpoints": {
          "image.text_to_image": "/images/generations",
          "image.edit": { "path": "/images/edits", "method": "POST", "format": "multipart" }
        }
      }]
    }]
  },
  "mineru": {
    "apiKey": "YOUR_MINERU_API_KEY",
    "timeoutMs": 600000,
    "pollInitialMs": 3000,
    "pollMaxMs": 15000,
    "maxAttempts": 120,
    "language": "en",
    "enableFormula": true,
    "enableTable": true,
    "isOcr": false,
    "modelVersion": "vlm"
  }
}
