{
  "opencollection": "1.0.0",
  "info": {
    "name": "Cloudflare Workers AI API",
    "version": "4.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "AI Inference",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Cloudflare Execute Ai Model",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/ai/run/:model",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Cloudflare account."
              },
              {
                "name": "model",
                "value": "example_value",
                "type": "path",
                "description": "The model identifier to execute, e.g. @cf/meta/llama-3.1-8b-instruct."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Run an AI model on Cloudflare's global network. The model parameter specifies which model to invoke from the Workers AI catalog. Supports text generation, text-to-image, image classification, speech-to-text, translation, summarization, and embedding models."
        }
      ]
    },
    {
      "info": {
        "name": "OpenAI Compatible",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Cloudflare Create Chat Completion",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/ai/v1/chat/completions",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Cloudflare account."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "OpenAI-compatible endpoint for chat completions. Accepts a messages array and returns a model-generated response. Supports streaming via server-sent events."
        },
        {
          "info": {
            "name": "Cloudflare Create Text Completion",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/ai/v1/completions",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Cloudflare account."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "OpenAI-compatible endpoint for text completions. Accepts a prompt string and returns a model-generated continuation."
        },
        {
          "info": {
            "name": "Cloudflare Create Embeddings",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/ai/v1/embeddings",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Cloudflare account."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "OpenAI-compatible endpoint for generating text embeddings. Converts text into numerical vector representations for semantic search, similarity analysis, and classification."
        },
        {
          "info": {
            "name": "Cloudflare Create Response",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.cloudflare.com/client/v4/accounts/:account_id/ai/v1/responses",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the Cloudflare account."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "OpenAI-compatible responses endpoint for generating model responses with additional tool use and structured output capabilities."
        }
      ]
    }
  ],
  "bundled": true
}