Api.Airforce
API REFERENCE

मॉडल

अपनी एपीआई कुंजी पर उपलब्ध प्रत्येक मॉडल को क्षमता झंडे, संदर्भ सीमा और प्रति-टोकन मूल्य निर्धारण के साथ सूचीबद्ध करें।

बाकी पूरा API जिस पर निर्भर है, वह सब एक ही call से पता चल जाता है: कौन-से मॉडल images, tools, reasoning या caching स्वीकार करते हैं, उनका context window, और उनका per-token दाम। models endpoint को query करें और नीचे दिए capability flags पर filter करें, बजाय अपने app में मॉडल सूचियाँ hard-code करने के।

ध्यान दें कि created field listing के समय का मौजूदा server time है, न कि प्रति-मॉडल release date, और status field live health दर्शाता है — इसे लंबे समय तक cache करने के बजाय फिर से fetch करें।

GET /v1/models

उन मॉडलों की सूची लौटाता है जिनका आप अभी उपयोग कर सकते हैं। प्रमाणित अनुरोधों में आपके द्वारा डैशबोर्ड में सक्षम किया गया कोई भी प्रति-उपयोगकर्ता मॉडल शामिल है। आकृति OpenAI को प्रतिबिंबित करती है GET /v1/models अतिरिक्त Airforce क्षमता क्षेत्रों के साथ।

GEThttps://api.airforce/v1/models

उदाहरण

curl https://api.airforce/v1/models \
  -H "Authorization: Bearer sk-air-YOUR_API_KEY"

प्रतिक्रिया स्वरूप

शीर्ष स्तर का लिफाफा है { object: "list", data: Model[] }. प्रत्येक Model नीचे फ़ील्ड हैं - अज्ञात होने पर वैकल्पिक रूप से चिह्नित फ़ील्ड को छोड़ा जा सकता है।

ParameterTypeRequiredDescription
idstringOptionalPublic model identifier you pass as the "model" field on every other endpoint, e.g. "claude-sonnet-4.6" or "gpt-5.1-chat".
objectstringOptionalAlways "model".
createdintegerOptionalUnix timestamp at which this listing was generated (current server time) — not a stable per-model creation date.
owned_bystringOptionalVendor name: "openai", "anthropic", "google", "deepseek", …
catalog_idstringOptionalCanonical vendor identifier for the underlying model family (e.g. "anthropic/claude-sonnet-4-6"). Stable across Airforce ID changes.
context_lengthintegerOptionalTotal context window in tokens (input + output).
max_output_tokensintegerOptionalHard cap on a single response. Use this as the upper bound when picking max_tokens.
input_modalitiesarrayOptionalSubset of ["text", "image", "audio", "document", "video"] the model accepts as input.
output_modalitiesarrayOptionalSubset of ["text", "image", "audio", "video"] the model can produce.
supports_chatbooleanOptionalAvailable on /v1/chat/completions and /v1/messages.
supports_streamingbooleanOptionalHonors stream: true.
supports_visionbooleanOptionalAccepts image_url content blocks.
supports_toolsbooleanOptionalAccepts the tools / tool_choice parameters.
supports_reasoningbooleanOptionalHonors reasoning_effort / thinking / thinking_budget.
supports_documentsbooleanOptionalAccepts document content blocks (PDF, etc.).
supports_cachingbooleanOptionalHonors cache_control on Anthropic-style system prompts.
supports_audio_inputbooleanOptionalAccepts audio content blocks (multimodal STT-in-chat).
supports_video_inputbooleanOptionalAccepts video content blocks.
knowledge_cutoffstringOptionalVendor-published knowledge cutoff month, e.g. "2025-09".
statusstringOptionalLive health: "operational" | "degraded" | "partial_outage" | "major_outage" (legacy "stable" / "down" / "offline" may also appear).
pricepermilliontokensintegerOptionalInput cost in cents per 1M tokens. Output side has output_pricepermilliontokens.
cache_read_pricepermilliontokensintegerOptionalDiscounted rate for cache-hit input tokens (Anthropic-style caching).

उदाहरण प्रतिक्रिया

{
  "object": "list",
  "data": [
    {
      "id": "claude-sonnet-4.6",
      "object": "model",
      "created": 1740000000,
      "owned_by": "anthropic",
      "catalog_id": "anthropic/claude-sonnet-4-6",
      "context_length": 200000,
      "max_output_tokens": 64000,
      "input_modalities": ["text", "image", "document"],
      "output_modalities": ["text"],
      "supports_chat": true,
      "supports_streaming": true,
      "supports_vision": true,
      "supports_tools": true,
      "supports_reasoning": true,
      "supports_documents": true,
      "supports_caching": true,
      "knowledge_cutoff": "2025-08",
      "status": "operational",
      "pricepermilliontokens": 300,
      "output_pricepermilliontokens": 1500,
      "cache_read_pricepermilliontokens": 30
    }
    // … more models
  ]
}

क्षमता के अनुसार फ़िल्टर करना

क्षमता फ़िल्टरिंग नीचे दिए गए फ़्लैग का उपयोग करके क्लाइंट-साइड पर की जाती है। सबसे आम फ़िल्टर:

const res = await fetch('https://api.airforce/v1/models', {
  headers: { Authorization: `Bearer ${API_KEY}` },
});
const { data } = await res.json();

// Vision-capable chat models
const visionModels = data.filter(m => m.supports_chat && m.supports_vision);

// Cheapest reasoning model with at least 100k context
const reasoning = data
  .filter(m => m.supports_reasoning && (m.context_length ?? 0) >= 100_000)
  .sort((a, b) => (a.pricepermilliontokens ?? 0) - (b.pricepermilliontokens ?? 0))[0];

// All models from one vendor, by canonical catalog family
const allClaude = data.filter(m => m.catalog_id?.startsWith('anthropic/'));

एक वैकल्पिक सर्वर-साइड क्वेरी पैरामीटर मौजूद है: GET /v1/models?channels=1 अतिरिक्त रूप से प्रति-channel alias entries लौटाता है (routing-aware क्लाइंट्स के लिए); इसके बिना वे aliases छोड़ दिए जाते हैं।


मूल्य निर्धारण क्षेत्र

सभी *pricepermilliontokens फ़ील्ड प्रति 1000000 टोकन पूर्णांक सेंट हैं। प्रति मिलियन अमरीकी डालर के लिए 100 से विभाजित करें।

ParameterTypeRequiredDescription
pricepermilliontokensintegerOptionalInput tokens, cents per 1M.
output_pricepermilliontokensintegerOptionalOutput tokens, cents per 1M.
cache_write_5m_pricepermilliontokensintegerOptionalCache-write rate for 5-minute TTL caches (Anthropic).
cache_write_1h_pricepermilliontokensintegerOptionalCache-write rate for 1-hour TTL caches (Anthropic).
cache_read_pricepermilliontokensintegerOptionalCache-read rate (typically 10× cheaper than uncached input).

मॉडल स्थिति और पदावनति

ParameterTypeRequiredDescription
operationalstatusOptionalHealthy — recent calls are succeeding. The usual value for an available model.
degradedstatusOptionalCallable, but with elevated errors or latency.
partial_outagestatusOptionalA subset of upstream channels is failing.
major_outagestatusOptionalMost or all calls are currently failing.
stable / down / offlinestatusOptionalLegacy or admin-set values that may also appear.

हार्ड-डिसेबल्ड मॉडल्स कोई स्टेटस मान नहीं हैं — उन्हें /v1/models से पूरी तरह बाहर रखा जाता है (हर कॉलर के लिए, एडमिन्स सहित) और उन्हें केवल एडमिन टूलिंग के ज़रिए सटीक नाम से इनवोक किया जाता है।

ब्राउज़ करने योग्य दृश्य चाहते हैं?

The /मॉडल पेज समूहीकरण, खोज और मूल्य निर्धारण तुलनाओं के साथ इसी डेटा को प्रस्तुत करता है।