aiml docs
ReferenceAPI reference

Account

orgs, projects, members, console sessions

GET/v1/limits/requests
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/limits/requests"
{  "object": "list",  "data": [    {      "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1",      "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "kind": "limit_increase",      "status": "open",      "subject": "limit increase beyond plan for production",      "body": {        "key_id": "key_01J9ZK2K4Q7Q3M3QX1V0F1KEY1",        "rpm": 100000,        "reason": "launch"      },      "created_by": "alice@acme.example",      "created_at": "2026-09-08T10:00:00Z"    }  ]}
POST/v1/limits/requests
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/limits/requests" \  -H "Content-Type: application/json" \  -d '{    "key_id": "key_01J9ZK2K4Q7Q3M3QX1V0F1KEY1",    "rpm": 300,    "reason": "launch"  }'
{  "status": "approved",  "applied": {    "rpm": 300,    "tpm": 2000000,    "concurrency": 32  },  "ticket": {    "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1",    "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",    "kind": "limit_increase",    "status": "approved",    "subject": "limit increase for production",    "body": {      "key_id": "key_01J9ZK2K4Q7Q3M3QX1V0F1KEY1",      "rpm": 300,      "reason": "launch"    },    "created_by": "alice@acme.example",    "created_at": "2026-09-08T10:00:00Z"  }}
GET/v1/tickets
AuthorizationBearer <token>

In: header

Query Parameters

kind?unknown

Value in

  • "limit_increase"
  • "invoice_correction"
  • "refund"
  • "close_org"
  • "other"

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/tickets"
{  "object": "list",  "data": [    {      "id": "tkt_01J9ZK2K4Q7Q3M3QX1V0F1TKT1",      "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "kind": "limit_increase",      "status": "open",      "subject": "limit increase beyond plan for production",      "body": {        "key_id": "key_01J9ZK2K4Q7Q3M3QX1V0F1KEY1",        "rpm": 100000,        "reason": "launch"      },      "created_by": "alice@acme.example",      "created_at": "2026-09-08T10:00:00Z"    }  ]}
POST/v1/policy/redact/preview
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/policy/redact/preview" \  -H "Content-Type: application/json" \  -d '{    "presets": [      "email",      "pan"    ],    "sample": "mail priya@example.com PAN ABCDE1234F"  }'
{  "input": "mail priya@example.com PAN ABCDE1234F",  "output": "mail [REDACTED:email] PAN [REDACTED:pan]",  "redactions": 2,  "presets": [    "api_key",    "card",    "aadhaar",    "pan",    "email",    "phone"  ]}
GET/v1/documents/dpa
AuthorizationBearer <token>

In: header

Response Body

text/html

application/json

curl -X GET "https://example.com/v1/documents/dpa"
"string"
POST/v1/orgs/{org}/close
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/close" \  -H "Content-Type: application/json" \  -d '{    "confirm": "acme",    "refund_requested": true  }'
{  "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "acme",  "name": "Acme",  "kind": "team",  "billing_country": "IN",  "billing_currency": "INR",  "legal_name": "Acme Pvt Ltd",  "gstin": "23AAAAA0000A1ZA",  "tax_status": "gst_registered",  "plan_id": "payg",  "status": "closed",  "role": "owner",  "billing_email": "finance@acme.example",  "billing_address": {    "line1": "1 MG Road",    "city": "Indore",    "state_code": "23",    "postal_code": "452001",    "country": "IN"  },  "settings": {    "security": {      "require_2fa": false,      "session_hours": 12,      "console_ip_allow": [],      "key_default_expiry_days": 0    }  },  "data_policy": {    "logging": "on",    "retention_days": 30,    "zdr": false,    "no_train": false,    "regions": [],    "redact": {      "presets": [        "api_key",        "card"      ],      "patterns": []    }  },  "created_at": "2026-09-01T10:00:00Z",  "closed_at": "2026-09-11T09:00:00Z"}
POST/v1/orgs/{org}/erasure
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/erasure"
{  "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "acme",  "name": "Acme",  "kind": "team",  "billing_country": "IN",  "billing_currency": "INR",  "legal_name": "Acme Pvt Ltd",  "gstin": "23AAAAA0000A1ZA",  "tax_status": "gst_registered",  "plan_id": "payg",  "status": "active",  "role": "owner",  "billing_email": "finance@acme.example",  "billing_address": {    "line1": "1 MG Road",    "city": "Indore",    "state_code": "23",    "postal_code": "452001",    "country": "IN"  },  "settings": {    "security": {      "require_2fa": false,      "session_hours": 12,      "console_ip_allow": [],      "key_default_expiry_days": 0    }  },  "data_policy": {    "logging": "on",    "retention_days": 30,    "zdr": false,    "no_train": false,    "regions": [],    "redact": {      "presets": [        "api_key",        "card"      ],      "patterns": []    }  },  "created_at": "2026-09-01T10:00:00Z",  "erasure_requested_at": "2026-09-11T09:00:00Z",  "erasure_due_at": "2026-10-11T09:00:00Z"}
DELETE/v1/orgs/{org}/erasure
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/v1/orgs/string/erasure"
{  "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "acme",  "name": "Acme",  "kind": "team",  "billing_country": "IN",  "billing_currency": "INR",  "legal_name": "Acme Pvt Ltd",  "gstin": "23AAAAA0000A1ZA",  "tax_status": "gst_registered",  "plan_id": "payg",  "status": "active",  "role": "owner",  "billing_email": "finance@acme.example",  "billing_address": {    "line1": "1 MG Road",    "city": "Indore",    "state_code": "23",    "postal_code": "452001",    "country": "IN"  },  "settings": {    "security": {      "require_2fa": false,      "session_hours": 12,      "console_ip_allow": [],      "key_default_expiry_days": 0    }  },  "data_policy": {    "logging": "on",    "retention_days": 30,    "zdr": false,    "no_train": false,    "regions": [],    "redact": {      "presets": [        "api_key",        "card"      ],      "patterns": []    }  },  "created_at": "2026-09-01T10:00:00Z"}
POST/v1/orgs/{org}/transfer
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/transfer" \  -H "Content-Type: application/json" \  -d '{    "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR2"  }'
{  "owner": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR2",  "previous_owner_role": "admin"}
GET/v1/projects
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/projects"
{  "object": "list",  "data": [    {      "id": "prj_01J9ZK2K4Q7Q3M3QX1V0F1PRJ1",      "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "slug": "default",      "name": "Default",      "environment": "live",      "status": "active",      "budget": {        "monthly_micro": 500000000,        "hard": false      },      "spend_today_micro": 12500000,      "spend_month_micro": 61000000,      "created_at": "2026-09-01T10:00:00Z"    }  ]}
POST/v1/projects
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/projects" \  -H "Content-Type: application/json" \  -d '{    "slug": "mobile",    "name": "Mobile",    "environment": "live"  }'
{  "id": "prj_01J9ZK2K4Q7Q3M3QX1V0F1PRJ2",  "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "mobile",  "name": "Mobile",  "environment": "live",  "status": "active",  "budget": {    "monthly_micro": 500000000,    "hard": false  },  "spend_today_micro": 12500000,  "spend_month_micro": 61000000,  "created_at": "2026-09-01T10:00:00Z"}
GET/v1/projects/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/projects/string"
{  "id": "prj_01J9ZK2K4Q7Q3M3QX1V0F1PRJ1",  "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "default",  "name": "Default",  "environment": "live",  "status": "active",  "budget": {    "monthly_micro": 500000000,    "hard": false  },  "spend_today_micro": 12500000,  "spend_month_micro": 61000000,  "created_at": "2026-09-01T10:00:00Z"}
PATCH/v1/projects/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/projects/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Default (renamed)",    "budget": {      "monthly_micro": 500000000    }  }'
{  "id": "prj_01J9ZK2K4Q7Q3M3QX1V0F1PRJ1",  "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "default",  "name": "Default (renamed)",  "environment": "live",  "status": "active",  "budget": {    "monthly_micro": 500000000,    "hard": false  },  "spend_today_micro": 12500000,  "spend_month_micro": 61000000,  "created_at": "2026-09-01T10:00:00Z"}
DELETE/v1/projects/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/projects/string"
Empty
GET/v1/orgs
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/orgs"
{  "object": "list",  "data": [    {      "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "slug": "acme",      "name": "Acme",      "kind": "team",      "billing_country": "IN",      "billing_currency": "INR",      "legal_name": "Acme Pvt Ltd",      "gstin": "23AAAAA0000A1ZA",      "tax_status": "gst_registered",      "plan_id": "payg",      "status": "active",      "role": "owner",      "billing_email": "finance@acme.example",      "billing_address": {        "line1": "1 MG Road",        "city": "Indore",        "state_code": "23",        "postal_code": "452001",        "country": "IN"      },      "settings": {        "security": {          "require_2fa": false,          "session_hours": 12,          "console_ip_allow": [],          "key_default_expiry_days": 0        }      },      "data_policy": {        "logging": "on",        "retention_days": 30,        "zdr": false,        "no_train": false,        "regions": [],        "redact": {          "presets": [            "api_key",            "card"          ],          "patterns": []        }      },      "created_at": "2026-09-01T10:00:00Z"    }  ]}
POST/v1/orgs
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/orgs" \  -H "Content-Type: application/json" \  -d '{    "slug": "acme",    "name": "Acme",    "billing_country": "IN"  }'
{  "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "acme",  "name": "Acme",  "kind": "team",  "billing_country": "IN",  "billing_currency": "INR",  "legal_name": "Acme Pvt Ltd",  "gstin": "23AAAAA0000A1ZA",  "tax_status": "gst_registered",  "plan_id": "payg",  "status": "active",  "role": "owner",  "billing_email": "finance@acme.example",  "billing_address": {    "line1": "1 MG Road",    "city": "Indore",    "state_code": "23",    "postal_code": "452001",    "country": "IN"  },  "settings": {    "security": {      "require_2fa": false,      "session_hours": 12,      "console_ip_allow": [],      "key_default_expiry_days": 0    }  },  "data_policy": {    "logging": "on",    "retention_days": 30,    "zdr": false,    "no_train": false,    "regions": [],    "redact": {      "presets": [        "api_key",        "card"      ],      "patterns": []    }  },  "created_at": "2026-09-01T10:00:00Z"}
GET/v1/orgs/{org}
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/orgs/string"
{  "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "acme",  "name": "Acme",  "kind": "team",  "billing_country": "IN",  "billing_currency": "INR",  "legal_name": "Acme Pvt Ltd",  "gstin": "23AAAAA0000A1ZA",  "tax_status": "gst_registered",  "plan_id": "payg",  "status": "active",  "role": "owner",  "billing_email": "finance@acme.example",  "billing_address": {    "line1": "1 MG Road",    "city": "Indore",    "state_code": "23",    "postal_code": "452001",    "country": "IN"  },  "settings": {    "security": {      "require_2fa": false,      "session_hours": 12,      "console_ip_allow": [],      "key_default_expiry_days": 0    }  },  "data_policy": {    "logging": "on",    "retention_days": 30,    "zdr": false,    "no_train": false,    "regions": [],    "redact": {      "presets": [        "api_key",        "card"      ],      "patterns": []    }  },  "created_at": "2026-09-01T10:00:00Z"}
PATCH/v1/orgs/{org}
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/orgs/string" \  -H "Content-Type: application/json" \  -d '{    "legal_name": "Acme Pvt Ltd",    "gstin": "23AAAAA0000A1ZA",    "tax_status": "gst_registered",    "billing_email": "finance@acme.example"  }'
{  "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "slug": "acme",  "name": "Acme",  "kind": "team",  "billing_country": "IN",  "billing_currency": "INR",  "legal_name": "Acme Pvt Ltd",  "gstin": "23AAAAA0000A1ZA",  "tax_status": "gst_registered",  "plan_id": "payg",  "status": "active",  "role": "owner",  "billing_email": "finance@acme.example",  "billing_address": {    "line1": "1 MG Road",    "city": "Indore",    "state_code": "23",    "postal_code": "452001",    "country": "IN"  },  "settings": {    "security": {      "require_2fa": false,      "session_hours": 12,      "console_ip_allow": [],      "key_default_expiry_days": 0    }  },  "data_policy": {    "logging": "on",    "retention_days": 30,    "zdr": false,    "no_train": false,    "regions": [],    "redact": {      "presets": [        "api_key",        "card"      ],      "patterns": []    }  },  "created_at": "2026-09-01T10:00:00Z"}
GET/v1/orgs/{org}/members
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/orgs/string/members"
{  "object": "list",  "data": [    {      "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR1",      "role": "owner",      "email": "alice@acme.example",      "name": "Alice"    },    {      "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR2",      "role": "viewer",      "email": "bob@acme.example",      "name": "Bob"    }  ]}
POST/v1/orgs/{org}/members
AuthorizationBearer <token>

In: header

Path Parameters

org*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/members" \  -H "Content-Type: application/json" \  -d '{    "email": "carol@acme.example",    "role": "member"  }'
{  "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR3",  "role": "member",  "email": "carol@acme.example"}
PATCH/v1/orgs/{org}/members/{user}
AuthorizationBearer <token>

In: header

Path Parameters

org*string
user*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/orgs/string/members/string" \  -H "Content-Type: application/json" \  -d '{    "role": "admin"  }'
{  "org_id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "user_id": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR2",  "role": "admin"}
DELETE/v1/orgs/{org}/members/{user}
AuthorizationBearer <token>

In: header

Path Parameters

org*string
user*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/orgs/string/members/string"
Empty
GET/auth/login

Response Body

application/json

curl -X GET "https://example.com/auth/login"
Empty
GET/auth/callback

Response Body

application/json

curl -X GET "https://example.com/auth/callback"
Empty
POST/auth/logout

Response Body

application/json

application/json

curl -X POST "https://example.com/auth/logout"
{  "logout_url": "https://auth.ai.ml/realms/aiml/protocol/openid-connect/logout?post_logout_redirect_uri=https%3A%2F%2Fconsole.ai.ml%2Flogin"}
GET/auth/me
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/auth/me"
{  "user": {    "id": "usr_01J9ZK2K4Q7Q3M3QX1V0F1USR1",    "email": "alice@acme.example",    "name": "Alice",    "status": "active"  },  "orgs": [    {      "id": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",      "slug": "acme",      "name": "Acme",      "kind": "team",      "billing_country": "IN",      "billing_currency": "INR",      "legal_name": "Acme Pvt Ltd",      "gstin": "23AAAAA0000A1ZA",      "tax_status": "gst_registered",      "plan_id": "payg",      "status": "active",      "role": "owner",      "billing_email": "finance@acme.example",      "billing_address": {        "line1": "1 MG Road",        "city": "Indore",        "state_code": "23",        "postal_code": "452001",        "country": "IN"      },      "settings": {        "security": {          "require_2fa": false,          "session_hours": 12,          "console_ip_allow": [],          "key_default_expiry_days": 0        }      },      "data_policy": {        "logging": "on",        "retention_days": 30,        "zdr": false,        "no_train": false,        "regions": [],        "redact": {          "presets": [            "api_key",            "card"          ],          "patterns": []        }      },      "created_at": "2026-09-01T10:00:00Z"    }  ],  "active_org": "org_01J9ZK2K4Q7Q3M3QX1V0F1ORG1",  "role": "owner"}