{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/latitude-so/json-schema/latitude-so-retry-import-body-schema.json",
  "title": "RetryImportBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-imports-api-openapi.yml#/components/schemas/RetryImportBody",
  "type": "object",
  "properties": {
    "credentials": {
      "allOf": [
        {
          "$ref": "#/$defs/ImportCredentials"
        },
        {
          "description": "Platform credentials, required again because they are not stored after an import ends. Must use the same region as the original import."
        }
      ]
    }
  },
  "required": [
    "credentials"
  ],
  "$defs": {
    "BraintrustImportCredentials": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "braintrust"
          ],
          "description": "Marks these as Braintrust credentials."
        },
        "region": {
          "type": "string",
          "enum": [
            "eu",
            "us"
          ],
          "description": "Braintrust data plane the organization lives on."
        },
        "apiKey": {
          "type": "string",
          "minLength": 1,
          "description": "Braintrust API key with read access to the project."
        }
      },
      "required": [
        "kind",
        "region",
        "apiKey"
      ]
    },
    "ImportCredentials": {
      "oneOf": [
        {
          "$ref": "#/$defs/LangfuseImportCredentials"
        },
        {
          "$ref": "#/$defs/LangsmithImportCredentials"
        },
        {
          "$ref": "#/$defs/BraintrustImportCredentials"
        }
      ],
      "description": "Credentials for the platform to import from; `kind` names the platform. Not stored after the import ends."
    },
    "LangfuseImportCredentials": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "langfuse"
          ],
          "description": "Marks these as Langfuse credentials."
        },
        "region": {
          "type": "string",
          "enum": [
            "eu",
            "us",
            "jp",
            "hipaa-us"
          ],
          "description": "Langfuse Cloud region the account lives in."
        },
        "publicKey": {
          "type": "string",
          "minLength": 1,
          "description": "Langfuse project public key (`pk-lf-…`)."
        },
        "secretKey": {
          "type": "string",
          "minLength": 1,
          "description": "Langfuse project secret key (`sk-lf-…`)."
        }
      },
      "required": [
        "kind",
        "region",
        "publicKey",
        "secretKey"
      ]
    },
    "LangsmithImportCredentials": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "langsmith"
          ],
          "description": "Marks these as LangSmith credentials."
        },
        "region": {
          "type": "string",
          "enum": [
            "gcp-eu",
            "gcp-us",
            "gcp-apac",
            "aws-us"
          ],
          "description": "LangSmith region the account lives in."
        },
        "apiKey": {
          "type": "string",
          "minLength": 1,
          "description": "LangSmith API key (`lsv2_pt_…`)."
        },
        "workspaceId": {
          "type": "string",
          "description": "Workspace to import from, for accounts with more than one. Omit to use the key's default workspace."
        }
      },
      "required": [
        "kind",
        "region",
        "apiKey"
      ]
    }
  }
}