Skip to Content

Public M2M API — ai

Review the operation, its input and access requirements. Parameter names and enum values are protocol identifiers and must retain the exact spelling shown. Optional/defaulted input is marked as such; required fields nested beneath an optional object apply when that object is supplied. Only statically recognized literal constraints are shown; additional validation, conditional requirements and provider rules may apply.

Authentication and permissions · Requests, results and recovery

/api/v1/ai

Exported methods: GET, POST

GET

  • Resource scopes: servers:read
  • Response keys observed across outcomes: anomaliesCount, data, recommendations

POST

  • Resource scopes: servers:write
  • Explicit response statuses: 201, 422
  • Explicit error codes: invalid_request
  • Response keys observed across outcomes: blueprint, data, items, script

These tables describe the validated form after the server normalizes the submitted input. Include the shown discriminator explicitly to select an alternative; the server may also accept omitted or aliased fields according to its route-specific normalization.

Provide one of these observed alternatives; additional validation may apply.

Payload alternative 1

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumNoNoask, chat, diagnose, generate_sql—
promptstringYesNo—min(1), max(8000)
resourceIdstringYesNo——
resourceKindstringYesNo——
contextResourceIdsarrayYesNo——

Payload alternative 2

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumNoNorightsize, optimize_costs—
resourceTypeenumYesNoSERVER, DATABASE, ALLdefault("ALL")

Payload alternative 3

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumNoNogenerate_blueprint, generate_cloud_init—
namestringYesNo—min(1), max(120), default("ai-generated-blueprint")
promptstringYesNo——
osFamilystringYesNo—default("ubuntu-24.04")
packagesarrayYesNo——
exposePortsarrayYesNo——
savebooleanYesNo—default(true)