Skip to content

AI API Recognition

How it works

The AI Recognition feature analyses a sample of recorded request/response pairs and infers an OpenAPI 3.1 specification. It uses a language model running on Cloudflare Workers AI — entirely within your account’s data boundary.

Triggering recognition

Terminal window
# Trigger recognition on a product
curl -X POST $API_URL/v1/products/{productId}/recognize \
-H "Authorization: Bearer $API_KEY"

The response returns a jobId. Poll the job status:

Terminal window
curl $API_URL/v1/products/{productId}/recognize/{jobId} \
-H "Authorization: Bearer $API_KEY"

When status === "complete", the generated spec is attached to the product.

Improving accuracy

  • Enable traffic capture on at least one proxy route for 24 hours before triggering recognition.
  • Provide an API collection (Postman / Bruno) via the dashboard to seed the model.
  • Review and edit the generated spec in the dashboard before publishing.

Data privacy

Traffic samples are processed within Cloudflare’s infrastructure. No request bodies are sent to third-party LLM providers. Only structural patterns (paths, methods, response codes) are used for inference.