naftiko: 1.0.0-alpha2 info: label: Cloudflare Workers AI API — OpenAI Compatible description: 'Cloudflare Workers AI API — OpenAI Compatible. 4 operations. Lead operation: Cloudflare Create Chat Completion. Self-contained Naftiko capability covering one Cloudflare business surface.' tags: - Cloudflare - OpenAI Compatible created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: CLOUDFLARE_API_KEY: CLOUDFLARE_API_KEY capability: consumes: - type: http namespace: workers-ai-openai-compatible baseUri: https://api.cloudflare.com/client/v4 description: Cloudflare Workers AI API — OpenAI Compatible business capability. Self-contained, no shared references. resources: - name: accounts-account_id-ai-v1-chat-completions path: /accounts/{account_id}/ai/v1/chat/completions operations: - name: createchatcompletion method: POST description: Cloudflare Create Chat Completion outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: accounts-account_id-ai-v1-completions path: /accounts/{account_id}/ai/v1/completions operations: - name: createtextcompletion method: POST description: Cloudflare Create Text Completion outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: accounts-account_id-ai-v1-embeddings path: /accounts/{account_id}/ai/v1/embeddings operations: - name: createembeddings method: POST description: Cloudflare Create Embeddings outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: accounts-account_id-ai-v1-responses path: /accounts/{account_id}/ai/v1/responses operations: - name: createresponse method: POST description: Cloudflare Create Response outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.CLOUDFLARE_API_KEY}}' exposes: - type: rest namespace: workers-ai-openai-compatible-rest port: 8080 description: REST adapter for Cloudflare Workers AI API — OpenAI Compatible. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/accounts/{account-id}/ai/v1/chat/completions name: accounts-account-id-ai-v1-chat-completions description: REST surface for accounts-account_id-ai-v1-chat-completions. operations: - method: POST name: createchatcompletion description: Cloudflare Create Chat Completion call: workers-ai-openai-compatible.createchatcompletion with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/accounts/{account-id}/ai/v1/completions name: accounts-account-id-ai-v1-completions description: REST surface for accounts-account_id-ai-v1-completions. operations: - method: POST name: createtextcompletion description: Cloudflare Create Text Completion call: workers-ai-openai-compatible.createtextcompletion with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/accounts/{account-id}/ai/v1/embeddings name: accounts-account-id-ai-v1-embeddings description: REST surface for accounts-account_id-ai-v1-embeddings. operations: - method: POST name: createembeddings description: Cloudflare Create Embeddings call: workers-ai-openai-compatible.createembeddings with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/accounts/{account-id}/ai/v1/responses name: accounts-account-id-ai-v1-responses description: REST surface for accounts-account_id-ai-v1-responses. operations: - method: POST name: createresponse description: Cloudflare Create Response call: workers-ai-openai-compatible.createresponse with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: workers-ai-openai-compatible-mcp port: 9090 transport: http description: MCP adapter for Cloudflare Workers AI API — OpenAI Compatible. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: cloudflare-create-chat-completion description: Cloudflare Create Chat Completion hints: readOnly: false destructive: false idempotent: false call: workers-ai-openai-compatible.createchatcompletion with: body: tools.body outputParameters: - type: object mapping: $. - name: cloudflare-create-text-completion description: Cloudflare Create Text Completion hints: readOnly: false destructive: false idempotent: false call: workers-ai-openai-compatible.createtextcompletion with: body: tools.body outputParameters: - type: object mapping: $. - name: cloudflare-create-embeddings description: Cloudflare Create Embeddings hints: readOnly: false destructive: false idempotent: false call: workers-ai-openai-compatible.createembeddings with: body: tools.body outputParameters: - type: object mapping: $. - name: cloudflare-create-response description: Cloudflare Create Response hints: readOnly: false destructive: false idempotent: false call: workers-ai-openai-compatible.createresponse with: body: tools.body outputParameters: - type: object mapping: $.