AiFO AiFO مستندات AiFO
قیمت
Input: 10 USD · Output: 50 USD · per_1m_tokens
Context
نامشخص
Endpoint
POST /v1/chat/completions

نمونه درخواست (Chat Completions)

# Required: model, messages
curl https://api.aifoapp.ir/v1/chat/completions \
  -H "Authorization: Bearer aifo_sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-fable-5","messages":[{"role":"user","content":"لطفاً خلاصه‌ای از این سند PDF را برای من تهیه کنید. فایل به صورت AiFO file_id ارسال شده است."}],"temperature":1,"max_tokens":1024,"top_p":1,"frequency_penalty":0,"presence_penalty":0}'
import requests

url = "https://api.aifoapp.ir/v1/chat/completions"
headers = {
    "Authorization": "Bearer aifo_sk_live_YOUR_API_KEY",
    "Content-Type": "application/json",
}
# Required: model, messages
payload = {
  "model": "anthropic/claude-fable-5",
  "messages": [
    {
      "role": "user",
      "content": "لطفاً خلاصه‌ای از این سند PDF را برای من تهیه کنید. فایل به صورت AiFO file_id ارسال شده است."
    }
  ],
  "temperature": 1,
  "max_tokens": 1024,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
# Required: model, messages
const response = await fetch("https://api.aifoapp.ir/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer aifo_sk_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "model": "anthropic/claude-fable-5",
  "messages": [
    {
      "role": "user",
      "content": "لطفاً خلاصه‌ای از این سند PDF را برای من تهیه کنید. فایل به صورت AiFO file_id ارسال شده است."
    }
  ],
  "temperature": 1,
  "max_tokens": 1024,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0
}),
});

const data = await response.json();
console.log(data);
import axios from "axios";

# Required: model, messages
const { data } = await axios.post(
  "https://api.aifoapp.ir/v1/chat/completions",
  {
  "model": "anthropic/claude-fable-5",
  "messages": [
    {
      "role": "user",
      "content": "لطفاً خلاصه‌ای از این سند PDF را برای من تهیه کنید. فایل به صورت AiFO file_id ارسال شده است."
    }
  ],
  "temperature": 1,
  "max_tokens": 1024,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0
},
  {
    headers: {
      Authorization: "Bearer aifo_sk_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
  },
);
console.log(data);

پارامترها

Endpoint

POST /v1/chat/completions

Inputs

  • Text: via request body fields for this endpoint
  • Image: image input on this endpoint
  • File: file input / AiFO file_id where supported

Required body fields: model, messages

Parameters

Name Type Required/optional Default Notes
temperature number optional 1 —
max_tokens number optional 1024 —
top_p number optional 1 —
frequency_penalty number optional 0 —
presence_penalty number optional 0 —

FAQ

قیمت Anthropic: Claude Fable 5 در AiFO چقدر است؟

قیمت ورودی 10 USD و خروجی 50 USD (per_1m_tokens) است.

Anthropic: Claude Fable 5 برای چه کاربردی مناسب است؟

مدل Anthropic: Claude Fable 5 با قابلیت پردازش متن و تصویر، به کاربران امکان می‌دهد تا مکالمات پیچیده و چندرسانه‌ای را با استفاده از API AiFO مدیریت کنند. این مدل با پشتیبانی از ورودی‌های متنی، تصویری و فایل، به‌ویژه در کاربردهای چت و پاسخ‌گویی، عملکردی بهینه ارائه می‌دهد.

چطور این مدل را از API صدا بزنم؟

یک API Key از پنل AiFO بگیرید، model را در body درخواست قرار دهید و درخواست را به gateway ارسال کنید. نمونه cURL و JavaScript در همین صفحه آمده است.

مدل‌های مرتبط