POST/v1/AI/generate-css

Create AI generate css

Not yet documented — no summary in the API source.

RequiresAuthorization: Bearer sk_...tenant_id

Request body application/json

typestringrequiredmin length 1pattern ^(css|javascript)$
promptstringrequiredmin length 0max length 20000
preferencePageIdstringrequiredmin length 1
existingCodestringnullablemin length 0max length 50000
existingCSSstringnullablemin length 0max length 50000
modestringrequiredmin length 1pattern ^(replace|append)$
tenantIdstringnullable

Responses

codestringnullable
explanationstringnullable
validationobjectValidationResult
isValidboolean
warningsarray of stringnullable
securityIssuesarray of stringnullable
successboolean
errorstringnullable
curl --request POST \
  --url 'https://api.4comply.io/v1/AI/generate-css' \
  --header 'Authorization: Bearer sk_...' \
  --header 'tenant_id: your-tenant-id' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "css",
  "prompt": "Example text",
  "preferencePageId": "00000000-0000-0000-0000-000000000000",
  "existingCode": "example-code",
  "existingCSS": "string",
  "mode": "replace",
  "tenantId": "your-tenant-id"
}'