Platform API

Platform API

The Mixlayer Platform API lets you automate organization administration outside the console.

The base URL is:

https://api.mixlayer.com/v1/

Authenticate with the same Bearer token format used by the model API:

Authorization: Bearer $MIXLAYER_API_KEY

Your API key must have the permissions required for the operation.

Capabilities

Platform API endpoints are grouped around these resources:

AreaPermissions
Organizations
List the key’s organization, get organization details, update organization settings, list resources, list members, manage invitations, and update or remove members.
api-read for reads, api-admin for updates
Models
List organization model access and request model access.
api-read for lists, api-write to request access
API Key Management
Create, list, update, rotate, and delete organization API keys.
api-read to list, api-admin for changes
Analytics
Read overview metrics and request sequences for an organization.
api-read
Audit Log
List audit log entries for an organization.
api-admin
Billing Accounts
Read billing account details, usage, spend controls, refills, and current usage invoices. Configure refills, auto-refill, and spend controls.
api-read for reads, api-admin for changes

Examples

List the organizations visible to the API key:

curl https://api.mixlayer.com/v1/organizations \
  -H "Authorization: Bearer $MIXLAYER_API_KEY"

List models available to the organization:

curl https://api.mixlayer.com/v1/organizations/$ORG_ID/models \
  -H "Authorization: Bearer $MIXLAYER_API_KEY"

Create a Platform API key:

curl https://api.mixlayer.com/v1/organizations/$ORG_ID/api_keys \
  -H "Authorization: Bearer $MIXLAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CI platform key",
    "permissions": ["api-read", "api-write"]
  }'

New key secrets are only returned once, when the key is created or rotated.