{
  "name": "workers-ai-gateway",
  "status": "ok",
  "docs_hint": "استخدم المسارات التالية حسب التكامل المطلوب (Core/OpenAI/Ollama).",
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/tasks",
      "group": "core",
      "summary": "قائمة أنواع المهام",
      "body": "none"
    },
    {
      "method": "GET",
      "path": "/api/models",
      "group": "core",
      "summary": "قائمة النماذج (يدعم task/q/feature)",
      "body": "none"
    },
    {
      "method": "GET",
      "path": "/api/models/:name",
      "group": "core",
      "summary": "تفاصيل نموذج محدد",
      "body": "none"
    },
    {
      "method": "GET",
      "path": "/api/schema/:name",
      "group": "core",
      "summary": "Schema المدخلات/المخرجات للنموذج",
      "body": "none"
    },
    {
      "method": "POST",
      "path": "/api/run/:name",
      "group": "core",
      "summary": "تشغيل النموذج مباشرة",
      "body": "json"
    },
    {
      "method": "GET",
      "path": "/v1",
      "group": "openai",
      "summary": "OpenAI-compatible root",
      "body": "none"
    },
    {
      "method": "GET",
      "path": "/v1/models",
      "group": "openai",
      "summary": "OpenAI-compatible models list",
      "body": "none"
    },
    {
      "method": "POST",
      "path": "/v1/chat/completions",
      "group": "openai",
      "summary": "OpenAI-compatible chat completions",
      "body": "json"
    },
    {
      "method": "POST",
      "path": "/v1/embeddings",
      "group": "openai",
      "summary": "OpenAI-compatible embeddings",
      "body": "json"
    },
    {
      "method": "POST",
      "path": "/v1/responses",
      "group": "openai",
      "summary": "OpenAI-compatible responses create",
      "body": "json"
    },
    {
      "method": "GET",
      "path": "/v1/responses/:response_id",
      "group": "openai",
      "summary": "OpenAI-compatible responses retrieve",
      "body": "none"
    },
    {
      "method": "POST",
      "path": "/v1/responses/:response_id/cancel",
      "group": "openai",
      "summary": "OpenAI-compatible responses cancel",
      "body": "none"
    },
    {
      "method": "GET",
      "path": "/api/tags",
      "group": "ollama",
      "summary": "Ollama-compatible tags/models",
      "body": "none"
    },
    {
      "method": "POST",
      "path": "/api/chat",
      "group": "ollama",
      "summary": "Ollama-compatible chat",
      "body": "json"
    },
    {
      "method": "POST",
      "path": "/api/generate",
      "group": "ollama",
      "summary": "Ollama-compatible generate",
      "body": "json"
    },
    {
      "method": "POST",
      "path": "/api/embeddings",
      "group": "ollama",
      "summary": "Ollama-compatible embeddings",
      "body": "json"
    },
    {
      "method": "POST",
      "path": "/api/embed",
      "group": "ollama",
      "summary": "Ollama-compatible embeddings alias",
      "body": "json"
    },
    {
      "method": "GET",
      "path": "/api/internal/schemas/status",
      "group": "core",
      "summary": "حالة مصدر الـschemas وآخر مزامنة",
      "body": "none"
    },
    {
      "method": "POST",
      "path": "/api/internal/schemas/sync",
      "group": "core",
      "summary": "تشغيل مزامنة يدوية (يتطلب SCHEMAS_SYNC_KEY)",
      "body": "json"
    }
  ],
  "quick_examples": [
    {
      "name": "List models",
      "curl": "curl http://localhost:8787/v1/models"
    },
    {
      "name": "OpenAI chat",
      "curl": "curl -X POST http://localhost:8787/v1/chat/completions -H \"Content-Type: application/json\" -d \"{\"model\":\"@cf/meta/llama-3.2-3b-instruct\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}\""
    },
    {
      "name": "Core run",
      "curl": "curl -X POST http://localhost:8787/api/run/%40cf%2Fmeta%2Fllama-3.2-3b-instruct -H \"Content-Type: application/json\" -d \"{\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}\""
    }
  ]
}