WorkerWorkers AI

Execute AI model

POST
This endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases.

Path parameters

account_identifierstringRequired
model_namestringRequired

Response

This endpoint returns an object
errors
list of objects
messages
list of strings
result
map from strings to any
success
boolean
POST
1curl -X POST https://api.cloudflare.com/client/v4/accounts/:account_identifier/ai/run/:model_name \
2 -H "X-Auth-Key: string" \
3 -H "X-Auth-User-Service-Key: string" \
4 -H "Authorization: Bearer <token>"
200Successful
1{
2 "errors": [
3 {
4 "message": "string"
5 }
6 ],
7 "messages": [
8 "string"
9 ],
10 "result": {
11 "string": {}
12 },
13 "success": true
14}