API Reference

Parameters & Models

Full parameter reference and supported model families.

All documentation

Complete reference for request fields and model selection.

Common parameters

| Parameter | Required | Type | Default | Description | | — | — | — | — | | prompt | Yes | string | — | Generation prompt | | model | Yes | string | — | Model id or model name | | provider | No | string | deepseek | Provider identifier | | type | No | string | text | text or image |

The API resolves model by name first, then by id. Prefer the exact names returned by GET /api/external/ai.

Text parameters

| Parameter | Type | Default | Description | | — | — | — | | max_tokens | number | 2000 | Maximum tokens to generate | | temperature | number | 0.7 | Creativity / randomness (0.02.0) |

Image parameters

| Parameter | Type | Default | Description | | — | — | — | | size | string | 1024x1024 | 1024x1024, 1792x1024, 1024x1792 | | quality | string | standard | standard or hd | | style | string | — | vivid or natural when supported |

Supported model families

Available models depend on your plan, API key restrictions, and live provider configuration. Always discover the current list with:

curl -X GET "https://abzar-ai.com/api/external/ai" \
  -H "X-API-Key: $ABZAR_AI_API_KEY"

Typical families include:

Text / chat

ProviderExample modelsBest for
DeepSeekdeepseek-chat, deepseek-coderGeneral chat, coding
OpenAIgpt-4, gpt-4-turbo, gpt-3.5-turboComplex reasoning, versatile tasks
Other configured providersSee GET responseDepends on account setup

Image

ProviderExample modelsNotes
OpenAIdall-e-3, dall-e-2Size / quality / style options
Other image providersSee image_generation_providersCapability flags in GET response

Capability flags

Each model in the GET response includes:

{
  "id": "...",
  "name": "...",
  "capabilities": {
    "chat": true,
    "imageGeneration": false,
    "imageAnalysis": false,
    "streaming": true
  },
  "maxTokens": 8192
}

Use these flags to filter UI options instead of hard-coding model lists.

Token costs

Token deduction is calculated from the selected model and request type:

  • Text requests use input/output token pricing
  • Image requests use the model’s image cost configuration

If pricing configuration is unavailable, the API returns 503 rather than guessing a cost.

Choosing a model

  1. Call GET /api/external/ai
  2. Filter by capabilities.chat or capabilities.imageGeneration
  3. Respect api_key_info.allowed_providers and allowed_models
  4. Pass the chosen model (and provider) on POST