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
Select an action to see its complete inputs, request, response, and status codes.
Retrieve one logical model
GET
/v1/models/{slug}Production base URL
https://api.mahvashai.irAuthenticationProject 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.
| Name | Location | Type | Required | Support | Details |
|---|---|---|---|---|---|
slug | Path | string | Required | Supported | Public logical model ID. |
X-Request-ID | Header | string | Optional | Mahvash extension | Client-supplied correlation ID. Echoed on every response; replaced when absent or malformed. |
X-Mahvash-Project | Header | string | Optional | Mahvash extension | Project 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
| HTTP | Details |
|---|---|
| 200 | Retrieve one logical model. |
| 401 | Authentication credentials are missing or invalid. |
| 403 | The principal is not allowed to perform this request. |
| 404 | No such resource is visible to this principal. |
| 429 | A quota or rate limit was exceeded. |
| 500 | An internal error occurred. |
List enabled logical AI models
GET
/v1/modelsProduction base URL
https://api.mahvashai.irAuthenticationProject 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.
| Name | Location | Type | Required | Support | Details |
|---|---|---|---|---|---|
X-Request-ID | Header | string | Optional | Mahvash extension | Client-supplied correlation ID. Echoed on every response; replaced when absent or malformed. |
X-Mahvash-Project | Header | string | Optional | Mahvash extension | Project 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
| HTTP | Details |
|---|---|
| 200 | List enabled logical AI models. |
| 401 | Authentication credentials are missing or invalid. |
| 403 | The principal is not allowed to perform this request. |
| 429 | A quota or rate limit was exceeded. |
| 500 | An internal error occurred. |