{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dc6e6823-be56-488d-bece-2f832ec4adcb",
    "slug": "text-embeddings-inference",
    "name": "Text Embeddings Inference",
    "description": "Self-hosted embeddings and reranking API, behind an API key",
    "url": "https://railway.com/deploy/text-embeddings-inference",
    "upstream": {
      "image": "ghcr.io/youssefsiam38/tei-railway:1.0.0"
    }
  },
  "services": [
    {
      "name": "tei",
      "source": {
        "image": "ghcr.io/youssefsiam38/tei-railway:1.0.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "tei",
      "description": "Port the API listens on. Railway probes its healthcheck here, so keep it equal to the domain's target port, and clear of the metrics listener on 9000.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_KEY",
      "service": "tei",
      "description": "Bearer token every working route requires. Without it the server answers every request, which is upstream's own default. At least 16 characters, no spaces.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MODEL_ID",
      "service": "tei",
      "description": "Model from the Hugging Face hub. The default is small, fast and English; a larger or multilingual one means a longer first start and more memory.",
      "secret": false,
      "strategy": "default",
      "default": "BAAI/bge-small-en-v1.5"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "tei",
      "description": "How long Railway waits for the health route to turn green. The first start downloads the model.",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "text-embeddings-inference"
      }
    },
    "cli": "railway deploy --template text-embeddings-inference",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dc6e6823-be56-488d-bece-2f832ec4adcb",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "423f2381-f7c5-4359-909f-27764866b5c7": {
                  "icon": null,
                  "name": "tei",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/youssefsiam38/tei-railway:1.0.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the API listens on. Railway probes its healthcheck here, so keep it equal to the domain's target port, and clear of the metrics listener on 9000.",
                      "defaultValue": "3000"
                    },
                    "API_KEY": {
                      "isOptional": false,
                      "description": "Bearer token every working route requires. Without it the server answers every request, which is upstream's own default. At least 16 characters, no spaces.",
                      "defaultValue": "{{API_KEY}}"
                    },
                    "MODEL_ID": {
                      "isOptional": false,
                      "description": "Model from the Hugging Face hub. The default is small, fast and English; a larger or multilingual one means a longer first start and more memory.",
                      "defaultValue": "BAAI/bge-small-en-v1.5"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "How long Railway waits for the health route to turn green. The first start downloads the model.",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "423f2381-f7c5-4359-909f-27764866b5c7": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "tei",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-12T16:14:42.609Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-12T15:42:32.464Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_cded4626a0564e0c9414",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 27,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "tei"
  }
}
