> ## Documentation Index
> Fetch the complete documentation index at: https://veniceai-mintlify-d2fddb8a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Venice API

> وثائق Venice API — وصول خاص وغير مُقيَّد إلى نماذج الدردشة والصور والصوت والفيديو المتوافقة مع OpenAI خلف مفتاح API واحد.

<div className="venice-hero-copy">
  <p className="venice-hero-tagline">واجهة برمجة التطبيقات للوصول الخاص وغير المُقيَّد إلى الذكاء.</p>
  <p className="venice-hero-subtitle">محادثة وصورة وصوت وفيديو متوافقة مع OpenAI خلف مفتاح API واحد.</p>

  <div className="venice-hero-ctas">
    <a className="venice-hero-cta venice-hero-cta-primary" href="https://venice.ai/settings/api">احصل على مفتاح API ←</a>
    <a className="venice-hero-cta" href="/overview/getting-started">ابدأ الآن</a>
  </div>
</div>

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "zai-org-glm-5-1",
      "messages": [{"role": "user", "content": "Build without permission."}]
    }'
  ```

  ```ts TypeScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: process.env.VENICE_API_KEY,
    baseURL: "https://api.venice.ai/api/v1",
  });

  const res = await client.chat.completions.create({
    model: "zai-org-glm-5-1",
    messages: [{ role: "user", content: "Build without permission." }],
  });
  ```

  ```python Python theme={null}
  import os
  from openai import OpenAI

  client = OpenAI(
      api_key=os.environ["VENICE_API_KEY"],
      base_url="https://api.venice.ai/api/v1",
  )

  res = client.chat.completions.create(
      model="zai-org-glm-5-1",
      messages=[{"role": "user", "content": "Build without permission."}],
  )
  ```
</CodeGroup>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">نقاط النهاية</p>
  <h2 className="venice-section-title">واجهة واحدة لكل وسيلة</h2>
  <p className="venice-section-subtitle">محادثة وصورة وصوت وفيديو وتضمينات خلف مفتاح API واحد.</p>
</div>

<div className="venice-apis-grid">
  <a className="venice-api-card" href="/api-reference/endpoint/chat/completions">
    <span className="venice-api-card-name">Chat Completions</span>
    <p className="venice-api-card-desc">محادثة متوافقة مع OpenAI مع تفكير واستخدام أدوات وتدفق عبر أكثر من 100 نموذج نصي.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">تدفق</span>
      <span className="venice-api-card-chip">أدوات</span>
      <span className="venice-api-card-chip">رؤية</span>
    </div>

    <span className="venice-api-card-action">انظر المرجع ←</span>
  </a>

  <a className="venice-api-card" href="/api-reference/endpoint/image/generations">
    <span className="venice-api-card-name">توليد الصور</span>
    <p className="venice-api-card-desc">من نص إلى صورة، ومن صورة إلى صورة، وترقية دقّة، وإزالة خلفية عبر نماذج واقعية وأسلوبية وغير مُقيَّدة.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">من نص إلى صورة</span>
      <span className="venice-api-card-chip">من صورة إلى صورة</span>
      <span className="venice-api-card-chip">ترقية دقّة</span>
    </div>

    <span className="venice-api-card-action">انظر المرجع ←</span>
  </a>

  <a className="venice-api-card" href="/api-reference/endpoint/audio/speech">
    <span className="venice-api-card-name">الصوت</span>
    <p className="venice-api-card-desc">من نص إلى كلام مع أكثر من 50 صوتًا متعدد اللغات، بالإضافة إلى تفريغ الكلام لأي ملف صوتي.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">TTS</span>
      <span className="venice-api-card-chip">تفريغ</span>
      <span className="venice-api-card-chip">+50 صوتًا</span>
    </div>

    <span className="venice-api-card-action">انظر المرجع ←</span>
  </a>

  <a className="venice-api-card" href="/api-reference/endpoint/video/queue">
    <span className="venice-api-card-name">الفيديو</span>
    <p className="venice-api-card-desc">من نص إلى فيديو، ومن صورة إلى فيديو، ومن مرجع إلى فيديو عبر طابور مهام متزامن أو غير متزامن.</p>

    <div className="venice-api-card-chips">
      <span className="venice-api-card-chip">من نص إلى فيديو</span>
      <span className="venice-api-card-chip">من صورة إلى فيديو</span>
      <span className="venice-api-card-chip">من مرجع إلى فيديو</span>
    </div>

    <span className="venice-api-card-action">انظر المرجع ←</span>
  </a>
</div>

<p className="venice-apis-extras">
  بالإضافة إلى <a href="/api-reference/endpoint/embeddings/generate">التضمينات</a>، و<a href="/guides/features/file-inputs">إدخالات الملفات</a>، و<a href="/guides/integrations/venice-mcp">أدوات MCP</a>، و<a href="/guides/integrations/x402-venice-api">المدفوعات عبر المحفظة</a>. <a className="venice-apis-extras-cta" href="/api-reference">عرض كل نقاط النهاية ←</a>
</p>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">الوكلاء</p>
  <h2 className="venice-section-title">مبنية لوكلاء الذكاء الاصطناعي</h2>
  <p className="venice-section-subtitle">استدلال خاص، وأدوات MCP، وتدفقات عمل مموّلة من المحفظة للمراسلة والبرمجة والوكلاء داخل السلسلة.</p>
</div>

<div className="venice-agents-cards">
  <a className="venice-api-card" href="/guides/integrations/ai-agents#agent-apps">
    <span className="venice-api-card-name">تطبيقات الوكلاء</span>
    <p className="venice-api-card-desc">اربط Venice بـ WhatsApp و Telegram و Discord والمزيد عبر OpenClaw و Hermes و NanoClaw.</p>
    <span className="venice-api-card-action">انظر التكاملات ←</span>
  </a>

  <a className="venice-api-card" href="/guides/integrations/ai-agents#coding-agents">
    <span className="venice-api-card-name">وكلاء البرمجة</span>
    <p className="venice-api-card-desc">استخدم Claude Code و Cursor و Codex CLI مع نماذج Venice لتدفقات برمجة خاصة.</p>
    <span className="venice-api-card-action">انظر التكاملات ←</span>
  </a>

  <a className="venice-api-card" href="/guides/integrations/ai-agents#tools-and-skills">
    <span className="venice-api-card-name">MCP + المهارات</span>
    <p className="venice-api-card-desc">اكشف المحادثة والصورة والفيديو والصوت والتضمينات كأدوات MCP أو مهارات وقت تشغيل.</p>
    <span className="venice-api-card-action">انظر التكاملات ←</span>
  </a>
</div>

<p className="venice-apis-extras">
  <a className="venice-apis-extras-cta" href="/guides/integrations/ai-agents">استكشف مركز وكلاء الذكاء الاصطناعي ←</a>
</p>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">النماذج</p>
  <h2 className="venice-section-title">نماذج شائعة</h2>
  <p className="venice-section-subtitle">بعض أكثر النماذج استخدامًا على Venice. استخدم المعرّف كقيمة لمعامل `model`.</p>
</div>

<div className="venice-models-grid">
  <a className="venice-model-card" href="/overview/models">
    <div className="venice-model-card-head">
      <span className="venice-model-card-name">Kimi K2.6</span>
      <span className="venice-model-card-maker">Moonshot AI</span>
    </div>

    <p className="venice-model-card-desc">تفكير حدودي بأوزان مفتوحة. سياق طويل قوي واستخدام أدوات بكسر من أسعار الحدود.</p>

    <div className="venice-model-card-stats">
      <span>سياق 256 ألفًا</span>
      <span>\$0.85 / \$4.66 لكل مليون</span>
      <span className="venice-model-card-privacy">خاص</span>
    </div>

    <code className="venice-model-card-id">kimi-k2-6</code>
  </a>

  <a className="venice-model-card" href="/overview/models">
    <div className="venice-model-card-head">
      <span className="venice-model-card-name">Claude Opus 4.7</span>
      <span className="venice-model-card-maker">Anthropic</span>
    </div>

    <p className="venice-model-card-desc">الأفضل في فئته للبرمجة والتخطيط والوكلاء طويلي الأمد الذين يحتاجون البقاء متماسكين.</p>

    <div className="venice-model-card-stats">
      <span>سياق 1 مليون</span>
      <span>\$6.00 / \$30.00 لكل مليون</span>
      <span className="venice-model-card-privacy">مجهَّل الهوية</span>
    </div>

    <code className="venice-model-card-id">claude-opus-4-7</code>
  </a>

  <a className="venice-model-card" href="/overview/models">
    <div className="venice-model-card-head">
      <span className="venice-model-card-name">GPT-5.5</span>
      <span className="venice-model-card-maker">OpenAI</span>
    </div>

    <p className="venice-model-card-desc">ذكاء عام حدودي بسياق 1 مليون. افتراضي قوي للمحادثة و RAG والتفكير متعدد الخطوات.</p>

    <div className="venice-model-card-stats">
      <span>سياق 1 مليون</span>
      <span>\$6.25 / \$37.50 لكل مليون</span>
      <span className="venice-model-card-privacy">مجهَّل الهوية</span>
    </div>

    <code className="venice-model-card-id">openai-gpt-55</code>
  </a>
</div>

<a className="venice-models-cta" href="/overview/models">
  <span className="venice-models-cta-left">
    <span className="venice-models-cta-count">أكثر من 250 نموذجًا</span>
    <span className="venice-models-cta-sub">نص وصورة وصوت وفيديو</span>
  </span>

  <span className="venice-models-cta-action">تصفّح الكتالوج ←</span>
</a>

<div className="venice-section-header">
  <p className="venice-section-eyebrow">الأدوات</p>
  <h2 className="venice-section-title">أدوات مدمجة لنماذج المحادثة</h2>
  <p className="venice-section-subtitle">شغّل البحث في الويب، أرفق ملفات، أو استعلم سلسلة بلوكتشين عبر `venice_parameters` أو نقطة نهاية أصلية في Venice.</p>
</div>

<CardGroup cols={4}>
  <Card title="بحث الويب" icon="globe" />

  <Card title="استخلاص الويب" icon="browser" />

  <Card title="إدخالات الملفات" icon="file" />

  <Card title="Crypto RPC" icon="link" />
</CardGroup>

<Accordion title="عينات شيفرة بحث الويب">
  أضف بحثًا في الويب في الوقت الفعلي مع استشهادات لأي نموذج نصي عبر `enable_web_search`.

  <CodeGroup>
    ```bash Curl theme={null}
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "zai-org-glm-5-1",
        "messages": [{"role": "user", "content": "What are the latest developments in AI?"}],
        "venice_parameters": {
          "enable_web_search": "auto"
        }
      }'
    ```

    ```ts TypeScript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY!,
      baseURL: "https://api.venice.ai/api/v1",
    });

    const completion = await client.chat.completions.create({
      model: "zai-org-glm-5-1",
      messages: [{ role: "user", content: "What are the latest developments in AI?" }],
      // @ts-expect-error - Venice-specific parameter
      venice_parameters: {
        enable_web_search: "auto",
      },
    });

    console.log(completion.choices[0].message.content);
    ```

    ```python Python theme={null}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["VENICE_API_KEY"],
        base_url="https://api.venice.ai/api/v1",
    )

    response = client.chat.completions.create(
        model="zai-org-glm-5-1",
        messages=[{"role": "user", "content": "What are the latest developments in AI?"}],
        extra_body={
            "venice_parameters": {
                "enable_web_search": "auto",
            }
        },
    )

    print(response.choices[0].message.content)
    ```

    ```bash Model Suffix theme={null}
    # بديل: ألحق المعاملات مباشرة بمعرّف النموذج
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "zai-org-glm-5-1:enable_web_search=on&enable_web_citations=true",
        "messages": [{"role": "user", "content": "What are the latest developments in AI?"}]
      }'
    ```
  </CodeGroup>
</Accordion>

<Accordion title="عينات شيفرة استخلاص الويب">
  عيّن `enable_web_scraping: true` وسيقوم النموذج بجلب وقراءة أي روابط في رسالة المستخدم قبل الإجابة.

  <CodeGroup>
    ```bash Curl theme={null}
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openai-gpt-55",
        "messages": [
          {"role": "user", "content": "Summarize this post in five bullets: https://venice.ai/blog/how-to-use-venice-api"}
        ],
        "venice_parameters": {
          "enable_web_scraping": true
        }
      }'
    ```

    ```ts TypeScript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY!,
      baseURL: "https://api.venice.ai/api/v1",
    });

    const response = await client.chat.completions.create({
      model: "openai-gpt-55",
      messages: [
        {
          role: "user",
          content:
            "Summarize this post in five bullets: https://venice.ai/blog/how-to-use-venice-api",
        },
      ],
      // @ts-expect-error - Venice-specific parameter
      venice_parameters: {
        enable_web_scraping: true,
      },
    });

    console.log(response.choices[0].message.content);
    ```

    ```python Python theme={null}
    import os
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["VENICE_API_KEY"],
        base_url="https://api.venice.ai/api/v1",
    )

    response = client.chat.completions.create(
        model="openai-gpt-55",
        messages=[
            {
                "role": "user",
                "content": "Summarize this post in five bullets: https://venice.ai/blog/how-to-use-venice-api",
            }
        ],
        extra_body={
            "venice_parameters": {
                "enable_web_scraping": True,
            }
        },
    )

    print(response.choices[0].message.content)
    ```
  </CodeGroup>
</Accordion>

<Accordion title="عينات شيفرة إدخالات الملفات">
  أرفق ملفات PDF ومستندات Office وشيفرات وملفات نصية (حتى 25 ميغابايت) مباشرة في طلب محادثة. راجع [دليل إدخالات الملفات](/guides/features/file-inputs) للحصول على القائمة الكاملة للصيغ.

  <CodeGroup>
    ```bash Curl theme={null}
    # رمّز ملفًا محليًا كرابط بيانات base64، ثم أرسله مضمَّنًا
    FILE_B64=$(base64 q3-report.pdf | tr -d '\n')

    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d "{
        \"model\": \"openai-gpt-55\",
        \"messages\": [
          {
            \"role\": \"user\",
            \"content\": [
              {\"type\": \"text\", \"text\": \"Summarize this report in five bullets and list the main risks.\"},
              {\"type\": \"file\", \"file\": {\"filename\": \"q3-report.pdf\", \"file_data\": \"data:application/pdf;base64,${FILE_B64}\"}}
            ]
          }
        ]
      }"
    ```

    ```ts TypeScript theme={null}
    import OpenAI from "openai";
    import { readFile } from "node:fs/promises";

    const client = new OpenAI({
      apiKey: process.env.VENICE_API_KEY!,
      baseURL: "https://api.venice.ai/api/v1",
    });

    const pdf = await readFile("q3-report.pdf");
    const fileData = `data:application/pdf;base64,${pdf.toString("base64")}`;

    const response = await client.chat.completions.create({
      model: "openai-gpt-55",
      messages: [
        {
          role: "user",
          content: [
            { type: "text", text: "Summarize this report in five bullets and list the main risks." },
            // @ts-expect-error - Venice file input block
            { type: "file", file: { filename: "q3-report.pdf", file_data: fileData } },
          ],
        },
      ],
    });

    console.log(response.choices[0].message.content);
    ```

    ```python Python theme={null}
    import base64
    import os
    from pathlib import Path
    from openai import OpenAI

    client = OpenAI(
        api_key=os.environ["VENICE_API_KEY"],
        base_url="https://api.venice.ai/api/v1",
    )

    path = Path("q3-report.pdf")
    file_data = "data:application/pdf;base64," + base64.b64encode(path.read_bytes()).decode("utf-8")

    response = client.chat.completions.create(
        model="openai-gpt-55",
        messages=[
            {
                "role": "user",
                "content": [
                    {"type": "text", "text": "Summarize this report in five bullets and list the main risks."},
                    {"type": "file", "file": {"filename": "q3-report.pdf", "file_data": file_data}},
                ],
            }
        ],
    )

    print(response.choices[0].message.content)
    ```
  </CodeGroup>
</Accordion>

<Accordion title="عينات شيفرة Crypto RPC">
  وكّل استدعاءات JSON-RPC 2.0 عبر 11 سلسلة مدعومة بمفتاح Venice الخاص بك أو محفظة x402. راجع [مرجع Crypto RPC](/api-reference/endpoint/crypto/rpc) للسلاسل والطرق وفئات الأرصدة.

  <CodeGroup>
    ```bash Curl theme={null}
    curl https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "jsonrpc": "2.0",
        "method": "eth_blockNumber",
        "params": [],
        "id": 1
      }'
    ```

    ```ts TypeScript theme={null}
    const response = await fetch(
      "https://api.venice.ai/api/v1/crypto/rpc/base-mainnet",
      {
        method: "POST",
        headers: {
          Authorization: `Bearer ${process.env.VENICE_API_KEY}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify([
          { jsonrpc: "2.0", method: "eth_chainId", params: [], id: 1 },
          { jsonrpc: "2.0", method: "eth_blockNumber", params: [], id: 2 },
        ]),
      }
    );

    const results = await response.json();
    console.log(results);
    ```

    ```python Python theme={null}
    import os
    import requests

    response = requests.post(
        "https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet",
        headers={
            "Authorization": f"Bearer {os.environ['VENICE_API_KEY']}",
            "Content-Type": "application/json",
        },
        json={
            "jsonrpc": "2.0",
            "method": "eth_getBalance",
            "params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "latest"],
            "id": 1,
        },
    )

    print(response.json())
    ```
  </CodeGroup>
</Accordion>

<div className="venice-pricing">
  <div className="venice-section-header">
    <p className="venice-section-eyebrow">التسعير</p>
    <h2 className="venice-section-title">اشحن الرصيد، أو راهن، أو ادفع لكل طلب</h2>
    <p className="venice-section-subtitle">موّل حسابًا بأرصدة، أو راهن DIEM لمخصصات يومية، أو تخطّ الحساب بالكامل بـ USDC على Base.</p>
  </div>

  <div className="venice-pricing-grid">
    <div className="venice-pricing-card">
      <div className="venice-pricing-card-head">
        <span className="venice-pricing-card-name">الأرصدة (Credits)</span>
        <span className="venice-pricing-card-badge">USD أو عملة مشفّرة</span>
      </div>

      <p className="venice-pricing-card-desc">ادفع حسب الاستخدام بالدولار أو بالعملة المشفّرة. الأرصدة لا تنتهي صلاحيتها وتعمل عبر كل نقاط النهاية.</p>
      <a className="venice-pricing-card-cta" href="https://venice.ai/settings/billing">اشتر أرصدة</a>
    </div>

    <div className="venice-pricing-card">
      <div className="venice-pricing-card-head">
        <span className="venice-pricing-card-name">DIEM</span>
        <span className="venice-pricing-card-badge">مخصصات يومية</span>
      </div>

      <p className="venice-pricing-card-desc">راهن DIEM أو VVV مرة واحدة واكتسب مخصصات استدلال ثابتة يوميًا، بلا رسوم لكل استدعاء.</p>
      <a className="venice-pricing-card-cta" href="https://venice.ai/token">تعرّف على DIEM</a>
    </div>

    <div className="venice-pricing-card">
      <div className="venice-pricing-card-head">
        <span className="venice-pricing-card-name">x402</span>
        <span className="venice-pricing-card-badge">USDC على Base</span>
      </div>

      <p className="venice-pricing-card-desc">ادفع لكل طلب من أي محفظة Base بـ USDC. بلا حساب أو مفتاح API، مبني للوكلاء.</p>
      <a className="venice-pricing-card-cta" href="/guides/integrations/x402-venice-api">اقرأ دليل x402</a>
    </div>
  </div>
</div>

أسئلة أو ملاحظات؟ انضم إلينا على [Discord](https://discord.gg/askvenice).
