{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fe947c8c-4f75-493c-8462-0bd3800680fe",
    "slug": "dify2openai",
    "name": "Dify2Openai",
    "description": "Convert Dify API into an OpenAI API,streaming,blocking,chat,agent & more",
    "url": "https://railway.com/deploy/dify2openai",
    "upstream": {
      "image": "fatwang2/dify2openai:latest"
    }
  },
  "services": [
    {
      "name": "Dify2Openai",
      "source": {
        "image": "fatwang2/dify2openai:latest"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Dify2Openai",
      "description": "Optional. HTTP port the application listens on. Railway sets this automatically.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "BOT_TYPE",
      "service": "Dify2Openai",
      "description": "Required. Type of Dify application. Supported: Chat, Completion, Agent, Workflow",
      "secret": false,
      "strategy": "default",
      "default": "Chat"
    },
    {
      "key": "MODELS_NAME",
      "service": "Dify2Openai",
      "description": "Optional. Model name returned by GET /v1/models. Default: dify",
      "secret": false,
      "strategy": "default",
      "default": "dify"
    },
    {
      "key": "DIFY_API_URL",
      "service": "Dify2Openai",
      "description": "Required. Your Dify API endpoint. For self-hosted Dify use https://your-domain/v1",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "INPUT_VARIABLE",
      "service": "Dify2Openai",
      "description": "Optional. Only for Workflow bots. Name of the workflow input variable (e.g. query, text)",
      "secret": false,
      "strategy": "default",
      "default": "query"
    },
    {
      "key": "OUTPUT_VARIABLE",
      "service": "Dify2Openai",
      "description": "Optional. Only for Workflow bots. Name of the workflow output variable returned to the client (e.g. text)",
      "secret": false,
      "strategy": "default",
      "default": "text"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "dify2openai"
      }
    },
    "cli": "railway deploy --template dify2openai",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fe947c8c-4f75-493c-8462-0bd3800680fe",
            "serializedConfig": {
              "services": {
                "a4c00be5-aec7-4b49-bdd1-4e168b4a9696": {
                  "name": "Dify2Openai",
                  "source": {
                    "image": "fatwang2/dify2openai:latest"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Optional. HTTP port the application listens on. Railway sets this automatically.",
                      "defaultValue": "3000"
                    },
                    "BOT_TYPE": {
                      "description": "Required. Type of Dify application. Supported: Chat, Completion, Agent, Workflow",
                      "defaultValue": "Chat"
                    },
                    "MODELS_NAME": {
                      "description": "Optional. Model name returned by GET /v1/models. Default: dify",
                      "defaultValue": "dify"
                    },
                    "DIFY_API_URL": {
                      "description": "Required. Your Dify API endpoint. For self-hosted Dify use https://your-domain/v1",
                      "defaultValue": "https:${{RAILWAY_PUBLIC_DOMAIN}}/v1"
                    },
                    "INPUT_VARIABLE": {
                      "description": "Optional. Only for Workflow bots. Name of the workflow input variable (e.g. query, text)",
                      "defaultValue": "query"
                    },
                    "OUTPUT_VARIABLE": {
                      "description": "Optional. Only for Workflow bots. Name of the workflow output variable returned to the client (e.g. text)",
                      "defaultValue": "text"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T19:03:16.692Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fa5dcfa2a18c4ef0b209",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 17,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "Dify2Openai"
  }
}
