MechaMental
Api reference

Provider Accounts

List Provider Accounts

GET
/v1/orgs/{org_id}/provider-accounts

Path Parameters

org_id*Org Id

Query Parameters

provider_type?|null
status?|null
enabled_only?Enabled Only
Defaultfalse
limit?Limit
Default50
Range1 <= value <= 100
cursor?string|null

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/provider-accounts"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "accounts": [
    {
      "provider_account_id": "string",
      "org_id": "string",
      "name": "string",
      "description": "string",
      "provider_type": "string",
      "region": "string",
      "data_residency": "string",
      "credentials_ref": "string",
      "quota_policy": {
        "max_tokens_per_month": 0,
        "max_requests_per_month": 0,
        "current_month_tokens": 0,
        "current_month_requests": 0,
        "usage_period": "string"
      },
      "rate_limit_policy": {
        "requests_per_second": 1,
        "requests_per_minute": 1,
        "input_tokens_per_minute": 1,
        "output_tokens_per_minute": 1,
        "max_concurrency": 10,
        "burst_size": 10,
        "queue_policy": "wait",
        "queue_timeout_seconds": 300
      },
      "status": "string",
      "status_reason": "string",
      "enabled": true,
      "routing_mode": "direct",
      "bridge_id": "string",
      "bridge_endpoint_name": "string",
      "last_health_check": "string",
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "created_by": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Provider Account

POST
/v1/orgs/{org_id}/provider-accounts

Path Parameters

org_id*Org Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/provider-accounts" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "provider_type": "azure_openai",    "credentials_ref": "string"  }'
{
  "provider_account_id": "string",
  "org_id": "string",
  "name": "string",
  "description": "string",
  "provider_type": "string",
  "region": "string",
  "data_residency": "string",
  "credentials_ref": "string",
  "quota_policy": {
    "max_tokens_per_month": 0,
    "max_requests_per_month": 0,
    "current_month_tokens": 0,
    "current_month_requests": 0,
    "usage_period": "string"
  },
  "rate_limit_policy": {
    "requests_per_second": 1,
    "requests_per_minute": 1,
    "input_tokens_per_minute": 1,
    "output_tokens_per_minute": 1,
    "max_concurrency": 10,
    "burst_size": 10,
    "queue_policy": "wait",
    "queue_timeout_seconds": 300
  },
  "status": "string",
  "status_reason": "string",
  "enabled": true,
  "routing_mode": "direct",
  "bridge_id": "string",
  "bridge_endpoint_name": "string",
  "last_health_check": "string",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Provider Account

GET
/v1/orgs/{org_id}/provider-accounts/{provider_account_id}

Path Parameters

org_id*Org Id
provider_account_id*Provider Account Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/provider-accounts/string"
{
  "provider_account_id": "string",
  "org_id": "string",
  "name": "string",
  "description": "string",
  "provider_type": "string",
  "region": "string",
  "data_residency": "string",
  "credentials_ref": "string",
  "quota_policy": {
    "max_tokens_per_month": 0,
    "max_requests_per_month": 0,
    "current_month_tokens": 0,
    "current_month_requests": 0,
    "usage_period": "string"
  },
  "rate_limit_policy": {
    "requests_per_second": 1,
    "requests_per_minute": 1,
    "input_tokens_per_minute": 1,
    "output_tokens_per_minute": 1,
    "max_concurrency": 10,
    "burst_size": 10,
    "queue_policy": "wait",
    "queue_timeout_seconds": 300
  },
  "status": "string",
  "status_reason": "string",
  "enabled": true,
  "routing_mode": "direct",
  "bridge_id": "string",
  "bridge_endpoint_name": "string",
  "last_health_check": "string",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Provider Account

PATCH
/v1/orgs/{org_id}/provider-accounts/{provider_account_id}

Path Parameters

org_id*Org Id
provider_account_id*Provider Account Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://loading/v1/orgs/string/provider-accounts/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "provider_account_id": "string",
  "org_id": "string",
  "name": "string",
  "description": "string",
  "provider_type": "string",
  "region": "string",
  "data_residency": "string",
  "credentials_ref": "string",
  "quota_policy": {
    "max_tokens_per_month": 0,
    "max_requests_per_month": 0,
    "current_month_tokens": 0,
    "current_month_requests": 0,
    "usage_period": "string"
  },
  "rate_limit_policy": {
    "requests_per_second": 1,
    "requests_per_minute": 1,
    "input_tokens_per_minute": 1,
    "output_tokens_per_minute": 1,
    "max_concurrency": 10,
    "burst_size": 10,
    "queue_policy": "wait",
    "queue_timeout_seconds": 300
  },
  "status": "string",
  "status_reason": "string",
  "enabled": true,
  "routing_mode": "direct",
  "bridge_id": "string",
  "bridge_endpoint_name": "string",
  "last_health_check": "string",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Delete Provider Account

DELETE
/v1/orgs/{org_id}/provider-accounts/{provider_account_id}

Path Parameters

org_id*Org Id
provider_account_id*Provider Account Id

Header Parameters

authorization?string|null

Response Body

application/json

curl -X DELETE "https://loading/v1/orgs/string/provider-accounts/string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}