Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 20050length <= 2048Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/ai/rule_drafts"{ "data": [ { "id": "string", "status": "succeeded", "request": "string", "rules": [ { "name": "string", "definition": null, "explanation": "string", "warnings": [ { "code": "string", "path": "string", "message": "string" } ] } ], "assumptions": [ "string" ], "questions": [ "string" ], "errors": [ { "rule": 0, "code": "string", "path": "string", "message": "string" } ], "model": "string", "prompt_hash": "string", "usage": { "input_tokens": 0, "output_tokens": 0 }, "context": { "chars": 0, "truncated": [ "string" ] }, "rule_id": "string", "rule_version_id": "string", "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Draft rules from a plain-English request: validated against the environment, stored, never published
Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/ai/rule_drafts" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "request": "Award points for completing a lesson", "max_rules": 5 }'{ "id": "string", "status": "succeeded", "request": "string", "rules": [ { "name": "string", "definition": null, "explanation": "string", "warnings": [ { "code": "string", "path": "string", "message": "string" } ] } ], "assumptions": [ "string" ], "questions": [ "string" ], "errors": [ { "rule": 0, "code": "string", "path": "string", "message": "string" } ], "model": "string", "prompt_hash": "string", "usage": { "input_tokens": 0, "output_tokens": 0 }, "context": { "chars": 0, "truncated": [ "string" ] }, "rule_id": "string", "rule_version_id": "string", "created_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/ai/rule_drafts/string"{ "id": "string", "status": "succeeded", "request": "string", "rules": [ { "name": "string", "definition": null, "explanation": "string", "warnings": [ { "code": "string", "path": "string", "message": "string" } ] } ], "assumptions": [ "string" ], "questions": [ "string" ], "errors": [ { "rule": 0, "code": "string", "path": "string", "message": "string" } ], "model": "string", "prompt_hash": "string", "usage": { "input_tokens": 0, "output_tokens": 0 }, "context": { "chars": 0, "truncated": [ "string" ] }, "rule_id": "string", "rule_version_id": "string", "created_at": "2019-08-24T14:15:22Z"}