Skip to content

API reference

Models

Choose a logical model from the live catalog. Available capabilities and routes can vary; do not hardcode a provider model ID.

How it fits together

  1. 01Retrieve one logical model
  2. 02List enabled logical AI models

Select an action to see its complete inputs, request, response, and status codes.

Retrieve one logical model

GET/v1/models/{slug}
Production base URLhttps://api.mahvashai.ir
AuthenticationProject API key or user JWT
ResponseDirect OpenAI-style response

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
slugPathstringRequiredSupportedPublic logical model ID.
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.

Request

curl -X GET 'https://api.mahvashai.ir/v1/models/<slug>' \
  -H "Authorization: Bearer $MAHVASH_API_KEY"

Response

{
  "id": "<id>",
  "object": "model",
  "created": 1750000000,
  "owned_by": "<value>",
  "name": "example",
  "display_order": 0,
  "model_category": {
    "id": 0,
    "name": "example",
    "logo": "<value>",
    "is_available": true,
    "created": 1750000000,
    "updated": 0
  },
  "slug": "<value>",
  "reasoning": false,
  "supported_reasoning_efforts": [],
  "default_reasoning_effort": "<value>",
  "supported_reasoning_summaries": [],
  "supported_reasoning_contexts": [],
  "supported_reasoning_modes": [],
  "context_window": 0,
  "max_output_tokens": 0,
  "is_available": true,
  "updated": 0,
  "supports_chat": false,
  "supports_chat_completions": false,
  "supports_responses": false,
  "supports_streaming": true,
  "supports_system_messages": true,
  "supports_json_mode": false
}

Illustrative response shape; actual fields depend on the operation and model.

Status codes

HTTPDetails
200Retrieve one logical model.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
404No such resource is visible to this principal.
429A quota or rate limit was exceeded.
500An internal error occurred.

List enabled logical AI models

GET/v1/models
Production base URLhttps://api.mahvashai.ir
AuthenticationProject API key or user JWT
ResponseDirect OpenAI-style response

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.

Request

curl -X GET 'https://api.mahvashai.ir/v1/models' \
  -H "Authorization: Bearer $MAHVASH_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "id": "<model-id>",
      "object": "model",
      "owned_by": "mahvash"
    }
  ]
}

Illustrative response shape; actual fields depend on the operation and model.

Status codes

HTTPDetails
200List enabled logical AI models.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
429A quota or rate limit was exceeded.
500An internal error occurred.