--- url: 'https://docs.qevron.ai/en/ai.md' description: >- A single entry point to teach an AI agent the Qevron API — base URL, authentication, live discovery endpoints, and machine-readable resources. --- # AI Agents — Start Here This page is designed so an **AI agent** can understand and use Qevron from a single link. Qevron exposes both our self-hosted local models and external provider models through one OpenAI / Anthropic / Gemini-compatible API. ## Essentials * **Base URL:** `https://app.qevron.ai/v1` * **Auth:** send `Authorization: Bearer ` on every request (alternatives: `X-Api-Key`, or `X-Goog-Api-Key` for Gemini). * **Compatibility:** use the OpenAI SDK and just swap `base_url` to the above. ## Live discovery (source of truth) Learn the models and their capabilities **at runtime** from these two endpoints: ```bash # Every model you can reach + each one's type (type/modality) curl https://app.qevron.ai/v1/models -H "Authorization: Bearer $QEVRON_KEY" # Per-capability recommended model + endpoint template + example request curl https://app.qevron.ai/v1/capabilities -H "Authorization: Bearer $QEVRON_KEY" ``` `/v1/models` returns each model's `type` (1=LLM, 3=embedding, 5=image, 6=image\_edit, 7=tts, 8=stt, 10=rerank) and `modality` — so an agent can see at a glance what each model does. ## Calling any model (recipe) 1. Pick an `id` and `modality` from `/v1/models`. 2. Choose the endpoint by `modality` (or use the `endpoint_template` from `/v1/capabilities`): llm → `/v1/chat/completions`, embedding → `/v1/embeddings`, rerank → `/v1/rerank`, tts → `/v1/audio/speech`, stt → `/v1/audio/transcriptions`, image → `/v1/images/generations`. 3. Send the request with the OpenAI schema; put your chosen `id` in `model`. ## Full reference * **[Models (matrix)](/en/models/)** — an A-Z page per local model. * **[External providers](/en/models/external-providers)** — gpt-4o / claude / gemini passthrough. * **[Capabilities](/en/capabilities/)** and **[API Reference](/en/api/overview)**. ## Machine-readable resources * **llms.txt:** (table of contents + this page) * **llms-full.txt:** (full text of all docs) * **OpenAPI:** · **Swagger UI:** ::: tip Every doc page has a raw Markdown twin at a `.md` URL (e.g. `/en/models/verinova-stable.md`) — clean, unformatted text for agents. ::: --- --- url: 'https://docs.qevron.ai/ai.md' description: >- Qevron API'sini bir yapay zekâ ajanına tanıtmak için tek giriş noktası — base URL, kimlik doğrulama, canlı keşif uçları ve makine-okunur kaynaklar. --- # AI Ajanları — Buradan Başlayın Bu sayfa, bir **yapay zekâ ajanının** Qevron'u tek bağlantıyla anlayıp kullanabilmesi için tasarlanmıştır. Qevron, OpenAI / Anthropic / Gemini uyumlu tek bir API üzerinden hem kendi barındırdığımız yerel modelleri hem de harici sağlayıcı modellerini sunar. ## Temel bilgiler * **Base URL:** `https://app.qevron.ai/v1` * **Kimlik doğrulama:** her istekte `Authorization: Bearer ` başlığı (alternatif: `X-Api-Key`, Gemini için `X-Goog-Api-Key`). * **Uyumluluk:** OpenAI SDK'sını kullanın, yalnızca `base_url`'i yukarıdakiyle değiştirin. ## Canlı keşif (source of truth) Modelleri ve yeteneklerini **çalışma anında** bu iki uçtan öğrenin: ```bash # Erişebileceğiniz tüm modeller + her birinin türü (type/modality) curl https://app.qevron.ai/v1/models -H "Authorization: Bearer $QEVRON_KEY" # Yetenek başına önerilen model + uç nokta şablonu + örnek istek curl https://app.qevron.ai/v1/capabilities -H "Authorization: Bearer $QEVRON_KEY" ``` `/v1/models` her model için `type` (1=LLM, 3=embedding, 5=image, 6=image\_edit, 7=tts, 8=stt, 10=rerank) ve `modality` alanlarını döndürür — böylece bir ajan hangi modelin ne işe yaradığını doğrudan görür. ## Herhangi bir modeli çağırma (tarif) 1. `/v1/models`'ten bir `id` ve `modality` seçin. 2. `modality`'ye göre uç noktayı belirleyin (veya `/v1/capabilities`'teki `endpoint_template`'i kullanın): llm → `/v1/chat/completions`, embedding → `/v1/embeddings`, rerank → `/v1/rerank`, tts → `/v1/audio/speech`, stt → `/v1/audio/transcriptions`, image → `/v1/images/generations`. 3. İsteği OpenAI şemasıyla gönderin; `model` alanına seçtiğiniz `id`'yi yazın. ## Tam referans * **[Modeller (matris)](/models/)** — her yerel model için A'dan Z'ye sayfa. * **[Harici sağlayıcılar](/models/external-providers)** — gpt-4o / claude / gemini passthrough. * **[Yetenekler](/capabilities/)** ve **[API Referansı](/api/overview)**. ## Makine-okunur kaynaklar * **llms.txt:** (içindekiler + bu sayfa) * **llms-full.txt:** (tüm dokümantasyonun tam metni) * **OpenAPI:** · **Swagger UI:** ::: tip Her doküman sayfasının ham Markdown ikizi `.md` uzantısıyla erişilebilir (örn. `/models/verinova-stable.md`) — ajanlar için temiz, biçimsiz metin. ::: --- --- url: 'https://docs.qevron.ai/concepts/streaming.md' --- # Akış (Streaming) Uzun yanıtları kullanıcı beklerken tek seferde almak yerine, **parça parça** (kelime kelime) alabilirsiniz. Bu, sohbet arayüzlerinde "yazıyor" etkisini verir ve algılanan hızı artırır. ## Nasıl etkinleştirilir? İstek gövdesine `"stream": true` ekleyin: ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "stream": true, "messages": [{ "role": "user", "content": "Üç maddede RAG anlat." }] }' ``` ```python [Python] stream = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Üç maddede RAG anlat."}], stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content or "" print(delta, end="", flush=True) ``` ```javascript [JavaScript] const stream = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Üç maddede RAG anlat." }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0].delta.content ?? ""); } ``` ::: ## Yanıt biçimi (SSE) Akış, **Server-Sent Events** (SSE) olarak döner. `Content-Type: text/event-stream` başlığıyla, her parça `data:` satırı olarak gelir: ``` data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant"}}]} data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"RAG"}}]} data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":", "}}]} data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]} data: [DONE] ``` * Her parçada metin `choices[0].delta.content` içindedir. * Son parçada `finish_reason` dolu gelir. * Akış `data: [DONE]` ile biter. ## Token kullanımını akışta almak Varsayılan olarak akış sonunda `usage` gelmez. İstiyorsanız ekleyin: ```json { "model": "verinova", "stream": true, "stream_options": { "include_usage": true }, "messages": [ ... ] } ``` Bu durumda son parçadan hemen önce yalnızca `usage` içeren bir parça gönderilir. ## Hangi uç noktalar akış destekler? * [Chat completions](/api/chat) — `stream: true` * [Ses: TTS](/api/audio) — `stream_format` ile ses parçaları SSE olarak * [Ses: STT](/api/audio) — transkripsiyon parça parça * [Responses API](/api/responses) ::: warning SDK kullanın SSE'yi elle ayrıştırmak yerine resmi `openai` SDK'sını kullanmanız önerilir; parçaları sizin için çözümler. ::: --- --- url: 'https://docs.qevron.ai/en/api/anthropic.md' --- # Anthropic Compatible (Messages) Qevron also speaks Anthropic's **Messages API** format. So you can use the `anthropic` SDK or your existing Anthropic-format code by just changing the address. ## Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Model name | | `messages` | array | ✓ | `{ role, content }` messages | | `max_tokens` | integer | ✓ | Max tokens to generate | | `system` | string | | System instruction | | `temperature` | number | | Creativity | | `stream` | boolean | | SSE stream | ## Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/messages \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "max_tokens": 256, "system": "You are a helpful assistant.", "messages": [ { "role": "user", "content": "Hello!" } ] }' ``` ```python [Python (anthropic SDK)] import anthropic client = anthropic.Anthropic( api_key="QEVRON_API_KEY", base_url="https://app.qevron.ai", # /v1/messages is appended automatically ) msg = client.messages.create( model="verinova", max_tokens=256, system="You are a helpful assistant.", messages=[{"role": "user", "content": "Hello!"}], ) print(msg.content) ``` ::: ## Authentication The Anthropic SDK uses the `x-api-key` header; Qevron accepts it (see [Authentication](/en/getting-started/authentication)). `Authorization: Bearer` also works. ## Response A response in Anthropic Messages format is returned; the generated text is in `content` blocks: ```json { "id": "msg_...", "type": "message", "role": "assistant", "model": "verinova", "content": [ { "type": "text", "text": "Hello! How can I help you?" } ], "stop_reason": "end_turn", "usage": { "input_tokens": 14, "output_tokens": 11 } } ``` ::: tip If you prefer the OpenAI format, you can also reach the same model via [`/v1/chat/completions`](/en/api/chat). ::: --- --- url: 'https://docs.qevron.ai/api/anthropic.md' --- # Anthropic Uyumlu (Messages) Qevron, Anthropic'in **Messages API** biçimini de konuşur. Böylece `anthropic` SDK'sını veya Anthropic formatındaki mevcut kodunuzu yalnızca adresi değiştirerek kullanabilirsiniz. ## İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Model adı | | `messages` | dizi | ✓ | `{ role, content }` mesajları | | `max_tokens` | integer | ✓ | Üretilecek azami token | | `system` | string | | Sistem yönergesi | | `temperature` | number | | Yaratıcılık | | `stream` | boolean | | SSE akışı | ## Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/messages \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "max_tokens": 256, "system": "Sen yardımcı bir asistansın.", "messages": [ { "role": "user", "content": "Merhaba!" } ] }' ``` ```python [Python (anthropic SDK)] import anthropic client = anthropic.Anthropic( api_key="QEVRON_API_KEY", base_url="https://app.qevron.ai", # /v1/messages otomatik eklenir ) msg = client.messages.create( model="verinova", max_tokens=256, system="Sen yardımcı bir asistansın.", messages=[{"role": "user", "content": "Merhaba!"}], ) print(msg.content) ``` ::: ## Kimlik doğrulama Anthropic SDK `x-api-key` başlığını kullanır; Qevron bunu kabul eder (bkz. [Kimlik Doğrulama](/getting-started/authentication)). `Authorization: Bearer` de çalışır. ## Yanıt Anthropic Messages biçiminde bir yanıt döner; üretilen metin `content` bloklarında bulunur: ```json { "id": "msg_...", "type": "message", "role": "assistant", "model": "verinova", "content": [ { "type": "text", "text": "Merhaba! Size nasıl yardımcı olabilirim?" } ], "stop_reason": "end_turn", "usage": { "input_tokens": 14, "output_tokens": 11 } } ``` ::: tip OpenAI biçimini tercih ederseniz aynı modele [`/v1/chat/completions`](/api/chat) üzerinden de erişebilirsiniz. ::: --- --- url: 'https://docs.qevron.ai/concepts/api-keys-and-quota.md' --- # API Anahtarları ve Kota Bu sayfa anahtarların nasıl organize edildiğini, kotaların ve hız limitlerinin nasıl çalıştığını açıklar. ## Anahtarlar ve gruplar Her API anahtarı bir **gruba** bağlıdır. Grup, anahtarın yetkilerini belirler: * **Erişebileceği modeller** — Grup yalnızca belirli model kümelerine erişebilir. * **Kota** — Toplam harcanabilir bakiye/kullanım. * **Hız limitleri** — Dakikada istek (RPM) ve token (TPM) sınırları. * **IP kısıtlamaları (opsiyonel)** — Anahtar yalnızca belirli IP aralıklarından kullanılabilir. Bu yapı sayesinde bir ekipte farklı kullanıcı/uygulamalara, farklı kotalı ayrı anahtarlar verebilirsiniz. ## Hız limitleri Her yanıtta hız limiti durumunuzu gösteren başlıklar döner: ``` X-RateLimit-Limit-Requests: 1000 X-RateLimit-Remaining-Requests: 987 X-RateLimit-Reset-Requests: 1716200600 X-RateLimit-Limit-Tokens: 200000 X-RateLimit-Remaining-Tokens: 194300 X-RateLimit-Reset-Tokens: 1716200600 ``` | Başlık | Anlamı | |---|---| | `*-Limit-Requests` | Periyot başına izin verilen istek sayısı | | `*-Remaining-Requests` | Kalan istek hakkı | | `*-Reset-Requests` | Sayaçların sıfırlanacağı zaman (Unix saniye) | | `*-Limit-Tokens` / `*-Remaining-Tokens` / `*-Reset-Tokens` | Aynısının token bazlı karşılığı | Limiti aşarsanız `429 Too Many Requests` alırsınız. Bu durumda kısa bir süre bekleyip yeniden deneyin (örnek olarak `Reset` zamanına kadar). ## Kullanımı sorgulama Mevcut kotanızı ve harcamanızı programatik olarak görebilirsiniz: ```bash # Kalan kota / abonelik curl https://app.qevron.ai/v1/dashboard/billing/subscription \ -H "Authorization: Bearer $QEVRON_API_KEY" # Toplam kullanım curl https://app.qevron.ai/v1/dashboard/billing/usage \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Ayrıntı: [Faturalama / Kullanım API](/api/billing). ## Kullanım nasıl ölçülür? Kullanım **token** bazlıdır. Her yanıttaki `usage` alanı harcamanızı gösterir: ```json "usage": { "prompt_tokens": 18, "completion_tokens": 16, "total_tokens": 34 } ``` * `prompt_tokens` — Gönderdiğiniz girdinin token sayısı. * `completion_tokens` — Modelin ürettiği yanıtın token sayısı. * `total_tokens` — Toplam. Akış (streaming) kullanırken token bilgisini almak için isteğe `stream_options: { "include_usage": true }` ekleyin (bkz. [Akış](/concepts/streaming)). --- --- url: 'https://docs.qevron.ai/en/concepts/api-keys-and-quota.md' --- # API Keys & Quota This page explains how keys are organized and how quotas and rate limits work. ## Keys and groups Every API key belongs to a **group**. The group defines the key's permissions: * **Accessible models** — The group can only access certain model sets. * **Quota** — Total spendable balance/usage. * **Rate limits** — Requests per minute (RPM) and tokens per minute (TPM). * **IP restrictions (optional)** — The key can only be used from certain IP ranges. This structure lets a team hand out separate, quota-limited keys to different users/apps. ## Rate limits Every response returns headers showing your rate-limit status: ``` X-RateLimit-Limit-Requests: 1000 X-RateLimit-Remaining-Requests: 987 X-RateLimit-Reset-Requests: 1716200600 X-RateLimit-Limit-Tokens: 200000 X-RateLimit-Remaining-Tokens: 194300 X-RateLimit-Reset-Tokens: 1716200600 ``` | Header | Meaning | |---|---| | `*-Limit-Requests` | Allowed requests per period | | `*-Remaining-Requests` | Remaining requests | | `*-Reset-Requests` | When counters reset (Unix seconds) | | `*-Limit-Tokens` / `*-Remaining-Tokens` / `*-Reset-Tokens` | Token-based equivalents | If you exceed a limit you get `429 Too Many Requests`. Wait a short while and retry (e.g. until the `Reset` time). ## Querying usage You can view your current quota and spend programmatically: ```bash # Remaining quota / subscription curl https://app.qevron.ai/v1/dashboard/billing/subscription \ -H "Authorization: Bearer $QEVRON_API_KEY" # Total usage curl https://app.qevron.ai/v1/dashboard/billing/usage \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Details: [Billing / Usage API](/en/api/billing). ## How is usage measured? Usage is **token-based**. The `usage` field in every response shows your spend: ```json "usage": { "prompt_tokens": 18, "completion_tokens": 16, "total_tokens": 34 } ``` * `prompt_tokens` — Token count of the input you sent. * `completion_tokens` — Token count of the response the model produced. * `total_tokens` — The sum. When streaming, add `stream_options: { "include_usage": true }` to get usage info (see [Streaming](/en/concepts/streaming)). --- --- url: 'https://docs.qevron.ai/api/overview.md' --- # API Referansı — Genel Bakış Qevron API'si OpenAI biçimini temel alır. Tüm uç noktalar `https://app.qevron.ai` altındadır ve API anahtarı ile doğrulanır. ## Temel bilgiler | Konu | Değer | |---|---| | **Base URL** | `https://app.qevron.ai/v1` | | **Kimlik doğrulama** | `Authorization: Bearer sk-...` ([ayrıntı](/getting-started/authentication)) | | **İçerik tipi** | `application/json` (dosya yüklemeleri hariç → `multipart/form-data`) | | **Akış** | `"stream": true` → `text/event-stream` (SSE) | ## Ortak başlıklar ``` Authorization: Bearer sk-... # zorunlu Content-Type: application/json # JSON gövdeli isteklerde Qevron-Channel: # opsiyonel: belirli kanalı seç ``` ## Tüm uç noktalar | Uç nokta | Method | Açıklama | |---|---|---| | [`/v1/chat/completions`](/api/chat) | POST | Sohbet / metin üretimi (akış, araçlar, görsel) | | [`/v1/completions`](/api/completions) | POST | Klasik metin tamamlama | | [`/v1/embeddings`](/api/embeddings) | POST | Metin → vektör embedding | | [`/v1/engines/{model}/embeddings`](/api/embeddings) | POST | Embedding (eski biçim) | | [`/v1/images/generations`](/api/images) | POST | Metinden görsel üretimi | | [`/v1/images/edits`](/api/images) | POST | Görsel düzenleme (multipart) | | [`/v1/audio/speech`](/api/audio) | POST | Metinden sese (TTS) | | [`/v1/audio/transcriptions`](/api/audio) | POST | Sesten metne (multipart) | | [`/v1/audio/translations`](/api/audio) | POST | Sesten İngilizceye çeviri (multipart) | | [`/v1/rerank`](/api/rerank) | POST | Doküman yeniden sıralama | | [`/v1/moderations`](/api/moderations) | POST | İçerik moderasyonu | | [`/v1/parse/pdf`](/api/parse-pdf) | POST | PDF → metin (multipart) | | [`/v1/video/generations/jobs`](/api/video) | POST | Video üretim işi başlat | | [`/v1/video/generations/jobs/{id}`](/api/video) | GET | Video iş durumu | | [`/v1/video/generations/{id}/content/video`](/api/video) | GET | Üretilen videoyu indir | | [`/v1/responses`](/api/responses) | POST | Responses API (oluştur) | | [`/v1/responses/{id}`](/api/responses) | GET / DELETE | Response getir / sil | | [`/v1/responses/{id}/cancel`](/api/responses) | POST | Response iptal et | | [`/v1/responses/{id}/input_items`](/api/responses) | GET | Response girdi öğeleri | | [`/v1/messages`](/api/anthropic) | POST | Anthropic uyumlu Messages | | [`/v1/models/{model}:generateContent`](/api/gemini) | POST | Gemini uyumlu (native) | | [`/v1beta/models/{model}:generateContent`](/api/gemini) | POST | Gemini uyumlu (beta) | | [`/v1/models`](/api/models) | GET | Model listesi | | [`/v1/models/{model}`](/api/models) | GET | Tek model bilgisi | | [`/v1/dashboard/billing/subscription`](/api/billing) | GET | Kota / abonelik | | [`/v1/dashboard/billing/usage`](/api/billing) | GET | Toplam kullanım | | [`/v1/dashboard/billing/quota`](/api/billing) | GET | Kota | ## Yanıt biçimi Başarılı yanıtlar OpenAI biçimindedir. Hatalar tutarlı bir JSON yapısında döner: ```json { "error": { "message": "Hata açıklaması", "type": "hata_kategorisi", "code": "hata_kodu" } } ``` Tüm hata kodları ve HTTP durumları için [Hatalar](/api/errors) sayfasına bakın. ## Ham markdown erişimi (render'sız) Bu dokümantasyonun her sayfasına, tarayıcıda render etmeden, **ham markdown** olarak ulaşabilirsiniz. Bu, içeriği bir AI ajanına, IDE'ye veya betiğe beslemek için idealdir. * **Tek sayfa**: herhangi bir sayfa URL'sinin sonuna `.md` ekleyin. ```bash curl https://docs.qevron.ai/api/chat.md curl https://docs.qevron.ai/en/api/chat.md # İngilizce ``` * **Tüm dok tek dosyada** (`llms-full.txt`) — büyük bir bağlama tek seferde yapıştırmak için: ```bash curl https://docs.qevron.ai/llms-full.txt ``` * **İndeks** (`llms.txt`) — tüm sayfaların başlıklı, bağlantılı listesi ([llmstxt.org](https://llmstxt.org) standardı): ```bash curl https://docs.qevron.ai/llms.txt ``` ## OpenAPI / Swagger Makine tarafından okunabilir tam spesifikasyon: `https://app.qevron.ai/swagger/` (UI) ve `https://app.qevron.ai/doc.json` (ham OpenAPI). Bkz. [OpenAPI / Swagger](/resources/openapi). --- --- url: 'https://docs.qevron.ai/en/api/overview.md' --- # API Reference — Overview The Qevron API is based on the OpenAI format. All endpoints live under `https://app.qevron.ai` and are authenticated with an API key. ## Basics | Topic | Value | |---|---| | **Base URL** | `https://app.qevron.ai/v1` | | **Authentication** | `Authorization: Bearer sk-...` ([details](/en/getting-started/authentication)) | | **Content type** | `application/json` (except file uploads → `multipart/form-data`) | | **Streaming** | `"stream": true` → `text/event-stream` (SSE) | ## Common headers ``` Authorization: Bearer sk-... # required Content-Type: application/json # for JSON-body requests Qevron-Channel: # optional: pick a specific channel ``` ## All endpoints | Endpoint | Method | Description | |---|---|---| | [`/v1/chat/completions`](/en/api/chat) | POST | Chat / text generation (streaming, tools, vision) | | [`/v1/completions`](/en/api/completions) | POST | Classic text completion | | [`/v1/embeddings`](/en/api/embeddings) | POST | Text → vector embedding | | [`/v1/engines/{model}/embeddings`](/en/api/embeddings) | POST | Embedding (legacy form) | | [`/v1/images/generations`](/en/api/images) | POST | Text-to-image generation | | [`/v1/images/edits`](/en/api/images) | POST | Image editing (multipart) | | [`/v1/audio/speech`](/en/api/audio) | POST | Text-to-speech (TTS) | | [`/v1/audio/transcriptions`](/en/api/audio) | POST | Speech-to-text (multipart) | | [`/v1/audio/translations`](/en/api/audio) | POST | Speech-to-English translation (multipart) | | [`/v1/rerank`](/en/api/rerank) | POST | Document reranking | | [`/v1/moderations`](/en/api/moderations) | POST | Content moderation | | [`/v1/parse/pdf`](/en/api/parse-pdf) | POST | PDF → text (multipart) | | [`/v1/video/generations/jobs`](/en/api/video) | POST | Start a video generation job | | [`/v1/video/generations/jobs/{id}`](/en/api/video) | GET | Video job status | | [`/v1/video/generations/{id}/content/video`](/en/api/video) | GET | Download generated video | | [`/v1/responses`](/en/api/responses) | POST | Responses API (create) | | [`/v1/responses/{id}`](/en/api/responses) | GET / DELETE | Get / delete a response | | [`/v1/responses/{id}/cancel`](/en/api/responses) | POST | Cancel a response | | [`/v1/responses/{id}/input_items`](/en/api/responses) | GET | Response input items | | [`/v1/messages`](/en/api/anthropic) | POST | Anthropic-compatible Messages | | [`/v1/models/{model}:generateContent`](/en/api/gemini) | POST | Gemini-compatible (native) | | [`/v1beta/models/{model}:generateContent`](/en/api/gemini) | POST | Gemini-compatible (beta) | | [`/v1/models`](/en/api/models) | GET | List models | | [`/v1/models/{model}`](/en/api/models) | GET | Single model info | | [`/v1/dashboard/billing/subscription`](/en/api/billing) | GET | Quota / subscription | | [`/v1/dashboard/billing/usage`](/en/api/billing) | GET | Total usage | | [`/v1/dashboard/billing/quota`](/en/api/billing) | GET | Quota | ## Response format Successful responses are in OpenAI format. Errors return a consistent JSON shape: ```json { "error": { "message": "Error description", "type": "error_category", "code": "error_code" } } ``` See [Errors](/en/api/errors) for all error codes and HTTP statuses. ## Raw markdown access (no rendering) You can reach every page of these docs as **raw markdown**, without rendering it in a browser. This is ideal for feeding content to an AI agent, an IDE or a script. * **A single page**: append `.md` to any page URL. ```bash curl https://docs.qevron.ai/en/api/chat.md curl https://docs.qevron.ai/api/chat.md # Turkish ``` * **All docs in one file** (`llms-full.txt`) — to paste a whole context at once: ```bash curl https://docs.qevron.ai/llms-full.txt ``` * **Index** (`llms.txt`) — a titled, linked list of all pages ([llmstxt.org](https://llmstxt.org) standard): ```bash curl https://docs.qevron.ai/llms.txt ``` ## OpenAPI / Swagger Full machine-readable spec: `https://app.qevron.ai/swagger/` (UI) and `https://app.qevron.ai/doc.json` (raw OpenAPI). See [OpenAPI / Swagger](/en/resources/openapi). --- --- url: 'https://docs.qevron.ai/capabilities/background-removal.md' --- # Arka Plan Kaldırma / Değiştirme Bir görselden arka planı çıkarır (alpha kanalı eklenmiş PNG) veya yenisiyle değiştirir. ## Mevcut modeller | Model | Özellik | |---|---| | **`spook-background`** *(önerilen)* | rembg / U-2-Net türevi, GPU | ## İki yol var ### Yeni alias yolu (v2.0.0+, önerilen) ```bash curl https://app.qevron.ai/v1/vision/background \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-background", "image": "data:image/jpeg;base64,...", "mode": "remove" }' ``` ### Eski yol (`custom_test`) ```bash curl https://app.qevron.ai/api/channel/86/custom_test \ -H "Authorization: Bearer sk-..." \ -d '{"model": "spook-background", "image": "data:image/jpeg;base64,..."}' ``` ## Python ```python import base64, requests with open("urun.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://app.qevron.ai/v1/vision/background", headers={"Authorization": "Bearer sk-..."}, json={ "model": "spook-background", "image": f"data:image/jpeg;base64,{b64}", "mode": "remove", }, ) out_b64 = resp.json()["image"] # data:image/png;base64,... # data URL'den base64'ü çıkart payload = out_b64.split(",", 1)[1] with open("urun-tr.png", "wb") as f: f.write(base64.b64decode(payload)) ``` ## mode parametresi | Değer | Davranış | |---|---| | `remove` *(varsayılan)* | Arka planı şeffaf yapar (PNG + alpha) | | `replace` | `background_image` ile değiştirir — ek parametre `background_image` (base64) gerekir | ## Kullanım örnekleri * **E-ticaret ürün fotoğrafı** → ürün+beyaz arka plan oluşturmak için * **Profil fotoğrafı kompozit** → kişi alıp farklı sahnelere yerleştirmek * **Belge çıkarımı** → fatura+masa fotoğrafından sadece faturayı izole etmek ## Kalite ipuçları * **Net konu/arka plan kontrastı**: en iyi sonuç konu kenarları belirginken çıkar. Renk benzerse model zorlanır. * **Çözünürlük**: 1024 px ideal. Çok büyük (4K) görsel yavaşlatır, çok küçük (256 px) detayı kaybeder. * **Saç ve şeffaf nesneler**: cam, su, ince saç gibi yarı-şeffaf bölgeler en zor kısım — sonucu manuel rötuş gerekebilir. ## Sorun çözme * **Konunun bir kısmı silindi** → kontrast düşük. Daha keskin bir görselle dene veya `mode=remove` yerine daha yumuşak bir alpha eşiği bekleyen `mode=soft` kullan (varsa). * **Çok yavaş** → ilk istekte GPU warmup vardır (~2–3 sn). Sonraki istekler hızlı. Devam: [Görsel üretimi](/capabilities/image-gen) · [OCR](/capabilities/vision-ocr) --- --- url: 'https://docs.qevron.ai/api/audio.md' --- # Audio Ses uç noktaları üç işlem sunar: metinden sese (TTS), sesten metne (STT) ve sesten İngilizceye çeviri. ## Metinden sese (TTS) Metni seslendirilmiş bir ses dosyasına çevirir. ### İstek parametreleri (JSON) | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | TTS modeli (örn. `blab-tts`) | | `input` | string | ✓ | Seslendirilecek metin | | `voice` | string | ✓ | Ses adı | | `response_format` | string | | `mp3` (varsayılan), `opus`, `aac`, `flac` | | `speed` | number | | 0.25–4.0 arası hız | | `stream_format` | string | | Akışlı çıktı için | ### Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "blab-tts", "input": "Merhaba, bu Qevron ile üretilmiş bir sestir.", "voice": "naz" }' --output cikti.mp3 ``` ```python [Python] resp = client.audio.speech.create( model="blab-tts", input="Merhaba, bu Qevron ile üretilmiş bir sestir.", voice="naz", ) resp.stream_to_file("cikti.mp3") ``` ::: Yanıt, ikili (binary) ses verisidir (örn. `Content-Type: audio/mpeg`). Akış kullanırsanız ses parçaları SSE olarak `speech.audio.delta` olayları hâlinde gelir. ## Sesten metne (STT) Bir ses dosyasını metne döker. `multipart/form-data` kullanır. ### Form alanları | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | STT modeli (örn. `solab-stt`) | | `file` | dosya | ✓ | Ses dosyası (wav, mp3, m4a, ...) | | `language` | string | | Dil kodu (örn. `tr`, `en`) | | `response_format` | string | | `json` (varsayılan), `verbose_json`, `text` | ### Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=solab-stt" \ -F "file=@kayit.wav" \ -F "language=tr" ``` ```python [Python] with open("kayit.wav", "rb") as f: resp = client.audio.transcriptions.create( model="solab-stt", file=f, language="tr", ) print(resp.text) ``` ::: ### Yanıt ```json { "text": "Merhaba, bu bir test kaydıdır." } ``` `verbose_json` kullanırsanız ek olarak `language`, `duration` ve `segments` döner. ## Sesten İngilizceye çeviri Transcriptions ile aynı form alanlarını kullanır, ancak çıktı metni İngilizceye çevrilir. `language` alanı gerekmez. --- --- url: 'https://docs.qevron.ai/en/api/audio.md' --- # Audio The audio endpoints offer three operations: text-to-speech (TTS), speech-to-text (STT) and speech-to-English translation. ## Text-to-speech (TTS) Converts text into a spoken audio file. ### Request parameters (JSON) | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | TTS model (e.g. `blab-tts`) | | `input` | string | ✓ | Text to speak | | `voice` | string | ✓ | Voice name | | `response_format` | string | | `mp3` (default), `opus`, `aac`, `flac` | | `speed` | number | | Speed between 0.25–4.0 | | `stream_format` | string | | For streamed output | ### Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "blab-tts", "input": "Hello, this audio was generated with Qevron.", "voice": "naz" }' --output output.mp3 ``` ```python [Python] resp = client.audio.speech.create( model="blab-tts", input="Hello, this audio was generated with Qevron.", voice="naz", ) resp.stream_to_file("output.mp3") ``` ::: The response is binary audio data (e.g. `Content-Type: audio/mpeg`). When streaming, audio chunks arrive as SSE `speech.audio.delta` events. ## Speech-to-text (STT) Transcribes an audio file into text. Uses `multipart/form-data`. ### Form fields | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | STT model (e.g. `solab-stt`) | | `file` | file | ✓ | Audio file (wav, mp3, m4a, ...) | | `language` | string | | Language code (e.g. `tr`, `en`) | | `response_format` | string | | `json` (default), `verbose_json`, `text` | ### Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=solab-stt" \ -F "file=@recording.wav" \ -F "language=en" ``` ```python [Python] with open("recording.wav", "rb") as f: resp = client.audio.transcriptions.create( model="solab-stt", file=f, language="en", ) print(resp.text) ``` ::: ### Response ```json { "text": "Hello, this is a test recording." } ``` With `verbose_json` you additionally get `language`, `duration` and `segments`. ## Speech-to-English translation Uses the same form fields as transcriptions, but the output text is translated into English. The `language` field is not needed. --- --- url: 'https://docs.qevron.ai/en/getting-started/authentication.md' --- # Authentication Every request to Qevron is authenticated with an **API key**. This page explains how to obtain and send one. ## What is an API key? An API key is a secret string that proves a request is made on your behalf, starting with `sk-`. Each key belongs to a **group**; the group determines which models the key can access and its quota (see [API Keys & Quota](/en/concepts/api-keys-and-quota)). ## Creating a key 1. Sign in to the Qevron **admin dashboard**. 2. Go to the **Keys / Tokens** section. 3. Click **Create new key**; give it a name and (if applicable) select the model set / group it can access. 4. **Copy the generated `sk-...` value immediately** — the key is shown in full only once. 5. Store the key in an environment variable (see below). ::: tip Create separate keys for different apps/environments (development, production). That way revoking one doesn't affect the others. ::: ## Storing the key in an environment variable ::: code-group ```bash [macOS / Linux] export QEVRON_API_KEY="sk-..." # add it to ~/.bashrc or ~/.zshrc to make it persistent ``` ```powershell [Windows (PowerShell)] $Env:QEVRON_API_KEY = "sk-..." # persistent: [Environment]::SetEnvironmentVariable("QEVRON_API_KEY","sk-...","User") ``` ```bash [.env file] # .env — ADD this file to .gitignore QEVRON_API_KEY=sk-... ``` ::: Reading it in code: Python `os.environ["QEVRON_API_KEY"]`, Node.js `process.env.QEVRON_API_KEY`. ## Sending the key The standard way is the `Authorization` header with the `Bearer` prefix: ```bash Authorization: Bearer sk-aBcD1234... ``` For compatibility, Qevron also accepts a few alternative headers: | Header | Format | Use | |---|---|---| | `Authorization` | `Bearer sk-...` | **Recommended.** OpenAI/Anthropic standard. | | `Authorization` | `sk-...` | Works without the `Bearer` prefix too. | | `x-api-key` | `sk-...` | Anthropic SDK compatibility. | | `x-goog-api-key` | `sk-...` | Google Gemini SDK compatibility. | ::: tip Most SDKs (Python/JS `openai`, `anthropic`) send the right header automatically; you only set the key and `base_url`. ::: ## Forcing a specific provider (optional) By default Qevron picks the best channel for your model. To force a specific channel, add the `Qevron-Channel` header: ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Qevron-Channel: openai" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [{"role":"user","content":"hi"}] }' ``` The value can be the channel name or its numeric ID. ## Response headers On successful requests Qevron returns informative headers: | Header | Meaning | |---|---| | `Group` | ID of the group that processed the request. | | `X-RateLimit-Limit-Requests` | Allowed requests per period. | | `X-RateLimit-Remaining-Requests` | Remaining requests. | | `X-RateLimit-Reset-Requests` | When the limit resets (Unix). | | `X-RateLimit-Limit-Tokens` / `-Remaining-Tokens` / `-Reset-Tokens` | Token-based limits. | ## Security ::: warning * Don't embed the key in **client-side** code (browser, mobile app) — anyone can read it. Proxy requests through your own server. * Store the key in an environment variable; never commit it. * If you suspect a leak, revoke the key in the dashboard and create a new one. ::: A missing or invalid key returns `401 Unauthorized`. See [Errors](/en/api/errors) for details. --- --- url: 'https://docs.qevron.ai/en/capabilities/background-removal.md' --- # Background Removal / Replacement Strips the background from an image (PNG with alpha channel) or replaces it with another image. ## Available models | Model | Note | |---|---| | **`spook-background`** *(recommended)* | rembg / U-2-Net derivative, GPU | ## Two paths ### New alias path (v2.0.0+, preferred) ```bash curl https://app.qevron.ai/v1/vision/background \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-background", "image": "data:image/jpeg;base64,...", "mode": "remove" }' ``` ### Legacy (`custom_test`) ```bash curl https://app.qevron.ai/api/channel/86/custom_test \ -H "Authorization: Bearer sk-..." \ -d '{"model": "spook-background", "image": "data:image/jpeg;base64,..."}' ``` ## Python ```python import base64, requests with open("product.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://app.qevron.ai/v1/vision/background", headers={"Authorization": "Bearer sk-..."}, json={ "model": "spook-background", "image": f"data:image/jpeg;base64,{b64}", "mode": "remove", }, ) out_b64 = resp.json()["image"] # data:image/png;base64,... payload = out_b64.split(",", 1)[1] with open("product-transparent.png", "wb") as f: f.write(base64.b64decode(payload)) ``` ## mode parameter | Value | Behavior | |---|---| | `remove` *(default)* | Background becomes transparent (PNG + alpha) | | `replace` | Replaces background — requires `background_image` (base64) | ## Use cases * **E-commerce product photos** → product on a clean white background * **Profile photo composites** → cut out a person, drop them into a new scene * **Document isolation** → take "invoice on a desk" and keep only the invoice ## Quality tips * **Sharp subject/background contrast**: best results when subject edges are clear. Similar colors confuse the model. * **Resolution**: 1024 px is ideal. 4K is slow; 256 px loses detail. * **Hair and translucent objects**: glass, water, fine hair — the hardest cases; manual touch-up may be needed. ## Troubleshooting * **Part of subject got removed** → contrast too low. Try a sharper source image, or `mode=soft` if available. * **Slow** → first request triggers GPU warmup (~2–3 s). Subsequent requests are fast. Next: [Image generation](/en/capabilities/image-gen) · [OCR](/en/capabilities/vision-ocr) --- --- url: 'https://docs.qevron.ai/en/api/billing.md' --- # Billing / Usage You can query your key's quota and usage programmatically. All endpoints are `GET` and authenticated with an API key. ## Subscription / quota ```bash curl https://app.qevron.ai/v1/dashboard/billing/subscription \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Returns your group's total and remaining quota. ## Total usage ```bash curl https://app.qevron.ai/v1/dashboard/billing/usage \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ### Response ```json { "total_usage": 1234.56 } ``` `total_usage` represents your total spend. ## Quota ```bash curl https://app.qevron.ai/v1/dashboard/billing/quota \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Returns the group's quota structure. ::: tip For instant usage, also look at the `usage` field in each response and the rate-limit headers (see [API Keys & Quota](/en/concepts/api-keys-and-quota)). ::: --- --- url: 'https://docs.qevron.ai/models/blab-fast-en-emma.md' description: Blab Fast (EN · Emma) — Metinden Sese (TTS). --- # blab-fast-en-emma ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Metinden Sese (TTS) | | **Model türü** | Metinden sese (TTS) (type=7) | | **Temel model** | Piper | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `blab-fast-en-emma` | | `input` | string | ✓ | Seslendirilecek metin | | `voice` | string | — | Ses kimliği | | `response_format` | string | — | wav | mp3 | ## Yanıt şeması `audio/wav` (binary) — the response body is the audio stream. ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-fast-en-emma", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-fast-en-emma", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.001 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/blab-fast-en-emma.md' description: Blab Fast (EN · Emma) — Text to Speech (TTS). --- # blab-fast-en-emma ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Text to Speech (TTS) | | **Model type** | Text-to-speech (TTS) (type=7) | | **Base model** | Piper | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `blab-fast-en-emma` | | `input` | string | ✓ | Text to synthesize | | `voice` | string | — | Voice id | | `response_format` | string | — | wav | mp3 | ## Response schema `audio/wav` (binary) — the response body is the audio stream. ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-fast-en-emma", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-fast-en-emma", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.001 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/blab-fast-tr-naz.md' description: Blab Fast (TR · Naz) — Metinden Sese (TTS). --- # blab-fast-tr-naz ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Metinden Sese (TTS) | | **Model türü** | Metinden sese (TTS) (type=7) | | **Temel model** | Piper | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `blab-fast-tr-naz` | | `input` | string | ✓ | Seslendirilecek metin | | `voice` | string | — | Ses kimliği | | `response_format` | string | — | wav | mp3 | ## Yanıt şeması `audio/wav` (binary) — the response body is the audio stream. ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-fast-tr-naz", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-fast-tr-naz", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.001 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/blab-fast-tr-naz.md' description: Blab Fast (TR · Naz) — Text to Speech (TTS). --- # blab-fast-tr-naz ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Text to Speech (TTS) | | **Model type** | Text-to-speech (TTS) (type=7) | | **Base model** | Piper | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `blab-fast-tr-naz` | | `input` | string | ✓ | Text to synthesize | | `voice` | string | — | Voice id | | `response_format` | string | — | wav | mp3 | ## Response schema `audio/wav` (binary) — the response body is the audio stream. ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-fast-tr-naz", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-fast-tr-naz", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.001 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/blab-stable.md' description: Blab Stable — Metinden Sese (TTS). --- # blab-stable ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Metinden Sese (TTS) | | **Model türü** | Metinden sese (TTS) (type=7) | | **Temel model** | Supertonic v3 | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `blab-stable` | | `input` | string | ✓ | Seslendirilecek metin | | `voice` | string | — | Ses kimliği | | `response_format` | string | — | wav | mp3 | ## Yanıt şeması `audio/wav` (binary) — the response body is the audio stream. ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-stable", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-stable", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.001 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/blab-stable.md' description: Blab Stable — Text to Speech (TTS). --- # blab-stable ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Text to Speech (TTS) | | **Model type** | Text-to-speech (TTS) (type=7) | | **Base model** | Supertonic v3 | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `blab-stable` | | `input` | string | ✓ | Text to synthesize | | `voice` | string | — | Voice id | | `response_format` | string | — | wav | mp3 | ## Response schema `audio/wav` (binary) — the response body is the audio stream. ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-stable", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-stable", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.001 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/blab-tts.md' description: Blab TTS — Metinden Sese (TTS). --- # blab-tts ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Metinden Sese (TTS) | | **Model türü** | Metinden sese (TTS) (type=7) | | **Temel model** | XTTS-v2 | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `blab-tts` | | `input` | string | ✓ | Seslendirilecek metin | | `voice` | string | — | Ses kimliği | | `response_format` | string | — | wav | mp3 | ## Yanıt şeması `audio/wav` (binary) — the response body is the audio stream. ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-tts", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-tts", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.005 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/blab-tts.md' description: Blab TTS — Text to Speech (TTS). --- # blab-tts ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Text to Speech (TTS) | | **Model type** | Text-to-speech (TTS) (type=7) | | **Base model** | XTTS-v2 | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/audio/speech ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `blab-tts` | | `input` | string | ✓ | Text to synthesize | | `voice` | string | — | Voice id | | `response_format` | string | — | wav | mp3 | ## Response schema `audio/wav` (binary) — the response body is the audio stream. ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "blab-tts", "input": "Merhaba dünya", "voice": "default", "response_format": "wav"}' \ --output speech.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.audio.speech.create(model="blab-tts", input="Merhaba dünya", voice="default") r.stream_to_file("speech.wav") ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.005 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/en/capabilities.md' --- # Capabilities Qevron exposes every core "verb" of modern AI through one API. For each capability you'll find what it does, which models are available, how to call it, and when to pick which model. ## Categories ### Chat * [Chat (LLM)](/en/capabilities/chat) — verinova / verinova-large / OpenAI / Anthropic * [Streaming chat](/en/capabilities/chat#stream) — token-by-token responses ### Voice * [Speech-to-text (STT)](/en/capabilities/stt) — solab-stt / whisper * [Text-to-speech (TTS)](/en/capabilities/tts) — blab-stable / blab-fast / blab-tts ### Vision * [Visual Q\&A (VQA)](/en/capabilities/vision-vqa) — spook-vision * [OCR — text from image](/en/capabilities/vision-ocr) — spook-ocr * [Object detection](/en/capabilities/vision-detect) — spook-detect ### Image * [Image generation](/en/capabilities/image-gen) — spook-generate * [Background removal](/en/capabilities/background-removal) — spook-background ### Embedding & Search * [Embedding (vectors)](/en/capabilities/embedding) — veriEmbedding * [Rerank](/en/capabilities/rerank) — verirerag ## Quick reference | Capability | Endpoint | Recommended model | Streaming | |---|---|---|---| | Chat | `POST /v1/chat/completions` | `verinova` | ✓ | | Detailed chat (Qwen3 30B) | `POST /v1/chat/completions` | `verinova-large` | ✓ | | STT | `POST /v1/audio/transcriptions` | `solab-stt` | ✓ | | TTS | `POST /v1/audio/speech` | `blab-stable` | ✓ | | Embedding | `POST /v1/embeddings` | `veriEmbedding` | — | | Rerank | `POST /v1/rerank` | `verirerag` | — | | VQA | `POST /v1/chat/completions` (image input) | `spook-vision` | ✓ | | OCR | `POST /v1/vision/ocr` *(new)* | `spook-ocr` | — | | Object detection | `POST /v1/vision/detect` *(new)* | `spook-detect` | — | | Image generation | `POST /v1/images/generations` | `spook-generate` | — | | Background removal | `POST /v1/vision/background` *(new)* | `spook-background` | — | ::: tip Live status in the admin UI To see which capability is currently active and which model is recommended, open **app.qevron.ai → Capabilities** (`/capabilities`). The "Copy" button on each card puts the recommended model name on your clipboard — paste straight into code. ::: ## Connection basics Two environments, two base URLs: | From where? | Base URL | API key | |---|---|---| | Same host (calleague-platform, callekit-agents) | `http://localhost:3001` | `QEVRON_API_KEY` | | External / SaaS / browser SDK | `https://app.qevron.ai` | `sk-...` (your user key) | Auth header is the same in both: ``` Authorization: Bearer ``` ## Next * [First chatbot](/en/guides/first-chatbot) — end-to-end Python walkthrough * [RAG: embedding + rerank](/en/guides/rag-embeddings) — `veriEmbedding` + `verirerag` together * [Local models catalogue (operator reference)](/en/guides/local-models) — model → channel → port map; which server runs what --- --- url: 'https://docs.qevron.ai/en/capabilities/chat.md' --- # Chat (LLM) Text-based conversation. Speaks the OpenAI `chat/completions` format directly — send a `messages` list, get a role-tagged response. ## Available models | Model | Use for | Note | |---|---|---| | **`verinova`** *(recommended, fast)* | Telephony, IVR, short chat | gpt-oss-20b Q8, **reasoning off** — replies snap back instantly | | **`verinova-large`** | Reports, analysis, docs | Qwen3-30B-A3B-Instruct Q8, **reasoning on** — step-by-step, richer answers | | `gpt-4o` | Via OpenAI | If an OpenAI-keyed channel exists | | `claude-3-5-sonnet` | Via Anthropic | If an Anthropic-keyed channel exists | ::: tip Which one? * **Latency-critical** (telephony, real-time chat): `verinova` * **Quality-critical** (reports, PRDs, multi-step reasoning): `verinova-large` ::: ## curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ {"role": "system", "content": "Be concise."}, {"role": "user", "content": "What is 1 + 1?"} ] }' ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI( api_key="sk-...", base_url="https://app.qevron.ai/v1", ) resp = client.chat.completions.create( model="verinova", messages=[ {"role": "system", "content": "Be concise."}, {"role": "user", "content": "Write me a limerick"}, ], ) print(resp.choices[0].message.content) ``` ## Streaming {#stream} Add `"stream": true` — the server sends Server-Sent Events with partial chunks: ```python for chunk in client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "..."}], stream=True, ): print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ## reasoning\_effort (verinova-large) Qwen3 30B by default emits `...` blocks with its internal reasoning. To suppress them and keep only the final answer: ```json { "model": "verinova-large", "messages": [...], "chat_template_kwargs": {"reasoning_effort": "none"} } ``` ::: warning Telephony? Don't use `verinova-large` in CalleKit — response latency balloons. CalleKit hits `verinova` and reasoning is already off at the channel level. ::: ## Troubleshooting * **"model not found"** → match the table spelling exactly. Case-sensitive. * **"connection refused"** → the underlying channel may be down. Check the **/capabilities** page in the admin UI. * **Response too slow** → `verinova-large` is naturally ~3–5× slower than `verinova`. First try streaming (`stream:true`), then cap `max_tokens: 256–512`. Next: [RAG: embedding + rerank](/en/guides/rag-embeddings) · [First chatbot](/en/guides/first-chatbot) --- --- url: 'https://docs.qevron.ai/api/chat.md' --- # Chat Completions Metin üretmenin ana yoludur: sohbet, soru-cevap, özetleme, araç çağırma ve görsel anlama hep bu uç noktadan geçer. ## İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Model adı (örn. `verinova`) | | `messages` | dizi | ✓ | Sohbet mesajları (aşağıya bakın) | | `stream` | boolean | | `true` ise SSE akışı döner | | `stream_options` | obje | | `{ "include_usage": true }` ile akışta token bilgisi | | `max_tokens` | integer | | Üretilecek azami token | | `max_completion_tokens` | integer | | `max_tokens`'ın yeni adı | | `temperature` | number | | Yaratıcılık (0–2). Düşük = tutarlı | | `top_p` | number | | Çekirdek örnekleme | | `tools` | dizi | | Modelin çağırabileceği fonksiyonlar | | `tool_choice` | string/obje | | Araç seçim davranışı | | `response_format` | obje | | `{ "type": "json_object" }` veya `json_schema` | | `stop` | string/dizi | | Durdurma dizileri | | `frequency_penalty` / `presence_penalty` | number | | Tekrar cezaları | | `seed` | number | | Tekrarlanabilirlik için | | `user` | string | | Son kullanıcı tanımlayıcısı | ### `messages` öğesi | Alan | Tip | Açıklama | |---|---|---| | `role` | string | `system`, `user` veya `assistant` | | `content` | string | dizi | Düz metin veya çok parçalı içerik (metin + görsel) | | `tool_calls` | dizi | (assistant) Model tarafından istenen araç çağrıları | | `tool_call_id` | string | (tool) Hangi araç çağrısına yanıt | ## Temel örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ { "role": "system", "content": "Sen yardımcı bir asistansın." }, { "role": "user", "content": "Python'\''da bir listeyi nasıl ters çeviririm?" } ] }' ``` ```python [Python] resp = client.chat.completions.create( model="verinova", messages=[ {"role": "system", "content": "Sen yardımcı bir asistansın."}, {"role": "user", "content": "Python'da bir listeyi nasıl ters çeviririm?"}, ], ) print(resp.choices[0].message.content) ``` ```javascript [JavaScript] const resp = await client.chat.completions.create({ model: "verinova", messages: [ { role: "system", content: "Sen yardımcı bir asistansın." }, { role: "user", content: "Python'da bir listeyi nasıl ters çeviririm?" }, ], }); console.log(resp.choices[0].message.content); ``` ::: ## Yanıt ```json { "id": "chatcmpl-...", "object": "chat.completion", "created": 1716200000, "model": "verinova", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "list.reverse() ile yerinde, veya list[::-1] ile yeni liste olarak..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 31, "completion_tokens": 42, "total_tokens": 73 } } ``` | Alan | Açıklama | |---|---| | `choices[].message.content` | Üretilen yanıt metni | | `choices[].finish_reason` | `stop`, `length`, `tool_calls`, `content_filter` | | `usage` | Token kullanımı | ## Akış (Streaming) `"stream": true` ekleyin; yanıt SSE parçaları olarak gelir. Ayrıntı: [Akış](/concepts/streaming). ## Görsel anlama (Vision) Görsel destekleyen modellerde (örn. `spook-vision`) `content`'i çok parçalı gönderin: ```json { "model": "spook-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Bu görselde ne var?" }, { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,..." } } ] } ] } ``` `image_url.url` bir genel URL veya `data:` base64 olabilir. Tam rehber: [Görsel Anlama](/guides/vision). ## Araç çağırma (Tools) ```json { "model": "verinova", "messages": [{ "role": "user", "content": "İstanbul'da hava nasıl?" }], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Bir şehrin hava durumunu getirir", "parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] } } } ] } ``` Model bir aracı çağırmak isterse yanıtın `choices[0].message.tool_calls` alanı dolar; siz fonksiyonu çalıştırıp sonucu `role: "tool"` mesajı olarak geri gönderirsiniz. ## JSON çıktı ```json "response_format": { "type": "json_object" } ``` veya şema zorunlu kılmak için: ```json "response_format": { "type": "json_schema", "json_schema": { "name": "kisi", "schema": { "type": "object", "properties": { "ad": {"type":"string"} } } } } ``` --- --- url: 'https://docs.qevron.ai/en/api/chat.md' --- # Chat Completions The main way to generate text: chat, Q\&A, summarization, tool calling and vision all go through this endpoint. ## Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Model name (e.g. `verinova`) | | `messages` | array | ✓ | Chat messages (see below) | | `stream` | boolean | | If `true`, returns an SSE stream | | `stream_options` | object | | `{ "include_usage": true }` for token info in a stream | | `max_tokens` | integer | | Max tokens to generate | | `max_completion_tokens` | integer | | New name for `max_tokens` | | `temperature` | number | | Creativity (0–2). Lower = more consistent | | `top_p` | number | | Nucleus sampling | | `tools` | array | | Functions the model may call | | `tool_choice` | string/object | | Tool selection behavior | | `response_format` | object | | `{ "type": "json_object" }` or `json_schema` | | `stop` | string/array | | Stop sequences | | `frequency_penalty` / `presence_penalty` | number | | Repetition penalties | | `seed` | number | | For reproducibility | | `user` | string | | End-user identifier | ### `messages` item | Field | Type | Description | |---|---|---| | `role` | string | `system`, `user` or `assistant` | | `content` | string | array | Plain text or multi-part content (text + image) | | `tool_calls` | array | (assistant) Tool calls requested by the model | | `tool_call_id` | string | (tool) Which tool call this responds to | ## Basic example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "How do I reverse a list in Python?" } ] }' ``` ```python [Python] resp = client.chat.completions.create( model="verinova", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How do I reverse a list in Python?"}, ], ) print(resp.choices[0].message.content) ``` ```javascript [JavaScript] const resp = await client.chat.completions.create({ model: "verinova", messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "How do I reverse a list in Python?" }, ], }); console.log(resp.choices[0].message.content); ``` ::: ## Response ```json { "id": "chatcmpl-...", "object": "chat.completion", "created": 1716200000, "model": "verinova", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Use list.reverse() in place, or list[::-1] for a new list..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 31, "completion_tokens": 42, "total_tokens": 73 } } ``` | Field | Description | |---|---| | `choices[].message.content` | Generated reply text | | `choices[].finish_reason` | `stop`, `length`, `tool_calls`, `content_filter` | | `usage` | Token usage | ## Streaming Add `"stream": true`; the response arrives as SSE chunks. Details: [Streaming](/en/concepts/streaming). ## Vision On vision-capable models (e.g. `spook-vision`) send `content` as multi-part: ```json { "model": "spook-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "What's in this image?" }, { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,..." } } ] } ] } ``` `image_url.url` can be a public URL or a `data:` base64. Full guide: [Vision](/en/guides/vision). ## Tool calling ```json { "model": "verinova", "messages": [{ "role": "user", "content": "What's the weather in Istanbul?" }], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Get the weather for a city", "parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] } } } ] } ``` If the model wants to call a tool, the response's `choices[0].message.tool_calls` is populated; you run the function and send the result back as a `role: "tool"` message. ## JSON output ```json "response_format": { "type": "json_object" } ``` or to enforce a schema: ```json "response_format": { "type": "json_schema", "json_schema": { "name": "person", "schema": { "type": "object", "properties": { "name": {"type":"string"} } } } } ``` --- --- url: 'https://docs.qevron.ai/api/completions.md' --- # Completions Klasik (sohbet öncesi) metin tamamlama uç noktası. Tek bir `prompt` alır ve devamını üretir. Yeni uygulamalarda genellikle [Chat Completions](/api/chat) tercih edilir. ## İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Model adı | | `prompt` | string | dizi | ✓ | Tamamlanacak metin | | `max_tokens` | integer | | Üretilecek azami token | | `temperature` | number | | Yaratıcılık (0–2) | | `top_p` | number | | Çekirdek örnekleme | | `stream` | boolean | | SSE akışı | | `stop` | string/dizi | | Durdurma dizileri | ## Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "prompt": "Bir zamanlar uzak bir galakside", "max_tokens": 64 }' ``` ```python [Python] resp = client.completions.create( model="verinova", prompt="Bir zamanlar uzak bir galakside", max_tokens=64, ) print(resp.choices[0].text) ``` ```javascript [JavaScript] const resp = await client.completions.create({ model: "verinova", prompt: "Bir zamanlar uzak bir galakside", max_tokens: 64, }); console.log(resp.choices[0].text); ``` ::: ## Yanıt ```json { "id": "cmpl-...", "object": "text_completion", "created": 1716200000, "model": "verinova", "choices": [ { "index": 0, "text": " parlak bir yıldızın etrafında...", "finish_reason": "length" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 64, "total_tokens": 72 } } ``` Üretilen metin `choices[0].text` içindedir (chat'teki `message.content` yerine). --- --- url: 'https://docs.qevron.ai/en/api/completions.md' --- # Completions The classic (pre-chat) text completion endpoint. It takes a single `prompt` and generates the continuation. New apps usually prefer [Chat Completions](/en/api/chat). ## Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Model name | | `prompt` | string | array | ✓ | Text to complete | | `max_tokens` | integer | | Max tokens to generate | | `temperature` | number | | Creativity (0–2) | | `top_p` | number | | Nucleus sampling | | `stream` | boolean | | SSE stream | | `stop` | string/array | | Stop sequences | ## Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "prompt": "Once upon a time in a distant galaxy", "max_tokens": 64 }' ``` ```python [Python] resp = client.completions.create( model="verinova", prompt="Once upon a time in a distant galaxy", max_tokens=64, ) print(resp.choices[0].text) ``` ```javascript [JavaScript] const resp = await client.completions.create({ model: "verinova", prompt: "Once upon a time in a distant galaxy", max_tokens: 64, }); console.log(resp.choices[0].text); ``` ::: ## Response ```json { "id": "cmpl-...", "object": "text_completion", "created": 1716200000, "model": "verinova", "choices": [ { "index": 0, "text": " around a bright star...", "finish_reason": "length" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 64, "total_tokens": 72 } } ``` Generated text is in `choices[0].text` (instead of chat's `message.content`). --- --- url: 'https://docs.qevron.ai/en/capabilities/embedding.md' --- # Embedding (Vectors) Turns text into a fixed-size vector. The foundation for RAG, semantic search and similarity comparisons. ## Available models | Model | Dimensions | Languages | |---|---|---| | **`veriEmbedding`** *(recommended)* | 1024 | TR + EN + 100+ (multilingual) | | `text-embedding-3-large` | 3072 | Via OpenAI | | `text-embedding-3-small` | 1536 | Via OpenAI | ## curl ```bash curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "veriEmbedding", "input": ["hello world", "merhaba dünya"]}' ``` ## Python (openai SDK) ```python from openai import OpenAI import numpy as np client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") resp = client.embeddings.create( model="veriEmbedding", input=["hello world", "merhaba dünya", "qevron is an AI gateway"], ) vectors = np.array([item.embedding for item in resp.data]) print(vectors.shape) # (3, 1024) ``` ## Batch `input` as an array processes all of them in one pass — 10–100× faster than per-item calls: ```python texts = ["chunk 1", "chunk 2", ..., "chunk 256"] resp = client.embeddings.create(model="veriEmbedding", input=texts) ``` ::: tip Batching pattern When indexing, send 50–100 chunks per request. One huge request (1000+) optimises throughput but risks timeouts. ::: ## Cosine similarity ```python from numpy import dot from numpy.linalg import norm def cosine(a, b): return dot(a, b) / (norm(a) * norm(b)) similarity = cosine(vectors[0], vectors[1]) # 0.85+ ⇒ very similar ``` ## RAG pipeline (typical) ``` 1. Chunk documents (~500 tokens each) 2. Embed each chunk → veriEmbedding 3. Store (chunk_text, vector) in a vector DB (pgvector, qdrant, ...) 4. On user query → embed query → search vector DB for top-K similar chunks 5. (optional) re-rank with verirerag 6. Pass selected chunks as context to verinova-large for the final answer ``` End-to-end: [RAG walkthrough](/en/guides/rag-embeddings). ## Troubleshooting * **Vectors look identical** → input might be empty or too short. Trim whitespace, supply ≥ 5–10 chars. * **Too slow** → batch instead of single calls. * **Dimension mismatch** → vector DB schema should match the model (1024 for `veriEmbedding`). Switching from OpenAI (1536/3072) requires a full re-index. Next: [Rerank](/en/capabilities/rerank) · [RAG walkthrough](/en/guides/rag-embeddings) --- --- url: 'https://docs.qevron.ai/capabilities/embedding.md' --- # Embedding (Vektör) Metni sabit boyutlu vektöre çevirir. RAG, semantik arama, benzerlik karşılaştırması için temel taş. ## Mevcut modeller | Model | Boyut | Dil | |---|---|---| | **`veriEmbedding`** *(önerilen)* | 1024 | TR + EN + 100+ dil (multilingual) | | `text-embedding-3-large` | 3072 | OpenAI üzerinden | | `text-embedding-3-small` | 1536 | OpenAI üzerinden | ## curl ```bash curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "veriEmbedding", "input": ["merhaba dünya", "hello world"]}' ``` ## Python (openai SDK) ```python from openai import OpenAI import numpy as np client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") resp = client.embeddings.create( model="veriEmbedding", input=["merhaba dünya", "hello world", "qevron bir AI gateway'idir"], ) vectors = np.array([item.embedding for item in resp.data]) print(vectors.shape) # (3, 1024) ``` ## Batch çağrı `input` bir array verirsen sunucu hepsini tek geçişte hesaplar (en az 10–100 kat daha hızlı): ```python texts = ["chunk 1", "chunk 2", ..., "chunk 256"] resp = client.embeddings.create(model="veriEmbedding", input=texts) ``` ::: tip Toplu işlem ipucu İndeks oluştururken 50–100'lük chunk'lar halinde gönder. Tek seferde 1000+ chunk göndermek sunucu memory'sini ve network round-trip'ini optimize eder ama timeout riskini artırır. ::: ## Vektörleri karşılaştırma (cosine similarity) ```python from numpy import dot from numpy.linalg import norm def cosine(a, b): return dot(a, b) / (norm(a) * norm(b)) similarity = cosine(vectors[0], vectors[1]) # 0.85+ ⇒ çok benzer ``` ## RAG akışı (tipik) ``` 1. Dokümanları chunk'la (~500 token) 2. Her chunk'ı embed et → veriEmbedding 3. (chunk_text, vector) çiftlerini bir vektör DB'ye yaz (pgvector, qdrant, ...) 4. Kullanıcı sorgusu geldiğinde → sorguyu embed et → vektör DB'de en benzer K chunk'ı bul 5. (opsiyonel) verirerag ile re-rank yap 6. Bulunan chunk'ları verinova-large'a context olarak ver, cevabı al ``` Tam uçtan uca: [RAG rehberi](/guides/rag-embeddings). ## Sorun çözme * **Vektörler hep aynı çıkıyor** → input boş ya da çok kısa olabilir. Whitespace temizle, en az 5–10 karakter ver. * **Çok yavaş** → tek tek değil array olarak gönder (batch). * **Boyut uyuşmazlığı** → vektör DB şeman 1024 olmalı (`veriEmbedding` için). OpenAI modelinden geçişte boyut farkı (1536/3072) yeniden indeksleme gerektirir. Devam: [Rerank](/capabilities/rerank) · [RAG rehberi](/guides/rag-embeddings) --- --- url: 'https://docs.qevron.ai/api/embeddings.md' --- # Embeddings Metni, anlamını temsil eden bir sayı dizisine (**vektör**) çevirir. Bu vektörler anlamsal arama, öneri ve RAG sistemlerinin temelidir. ## İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Embedding modeli (örn. `veriEmbedding`) | | `input` | string | dizi | ✓ | Vektöre çevrilecek metin veya metin listesi | | `encoding_format` | string | | `float` (varsayılan) veya `base64` | | `dimensions` | integer | | İstenen vektör boyutu (model destekliyorsa) | ## Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "veriEmbedding", "input": "Qevron bir AI gateway'\''idir." }' ``` ```python [Python] resp = client.embeddings.create( model="veriEmbedding", input="Qevron bir AI gateway'idir.", ) vector = resp.data[0].embedding print(len(vector), "boyutlu vektör") ``` ```javascript [JavaScript] const resp = await client.embeddings.create({ model: "veriEmbedding", input: "Qevron bir AI gateway'idir.", }); console.log(resp.data[0].embedding.length, "boyutlu vektör"); ``` ::: Birden çok metni tek istekte göndermek için `input`'a dizi verin: ```json { "model": "veriEmbedding", "input": ["birinci metin", "ikinci metin"] } ``` ## Yanıt ```json { "object": "list", "model": "veriEmbedding", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, 0.0789, "..."] } ], "usage": { "prompt_tokens": 9, "total_tokens": 9 } } ``` | Alan | Açıklama | |---|---| | `data[].embedding` | Float vektör | | `data[].index` | Girdideki sıra | | `usage` | Token kullanımı | ::: tip Embedding + arama + yeniden sıralama ile uçtan uca RAG kurmak için [RAG rehberine](/guides/rag-embeddings) bakın. ::: --- --- url: 'https://docs.qevron.ai/en/api/embeddings.md' --- # Embeddings Turns text into an array of numbers (a **vector**) that represents its meaning. These vectors are the foundation of semantic search, recommendations and RAG systems. ## Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Embedding model (e.g. `veriEmbedding`) | | `input` | string | array | ✓ | Text or list of texts to embed | | `encoding_format` | string | | `float` (default) or `base64` | | `dimensions` | integer | | Desired vector size (if the model supports it) | ## Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "veriEmbedding", "input": "Qevron is an AI gateway." }' ``` ```python [Python] resp = client.embeddings.create( model="veriEmbedding", input="Qevron is an AI gateway.", ) vector = resp.data[0].embedding print(len(vector), "dimensional vector") ``` ```javascript [JavaScript] const resp = await client.embeddings.create({ model: "veriEmbedding", input: "Qevron is an AI gateway.", }); console.log(resp.data[0].embedding.length, "dimensional vector"); ``` ::: To embed multiple texts in one request, pass an array to `input`: ```json { "model": "veriEmbedding", "input": ["first text", "second text"] } ``` ## Response ```json { "object": "list", "model": "veriEmbedding", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, 0.0789, "..."] } ], "usage": { "prompt_tokens": 9, "total_tokens": 9 } } ``` | Field | Description | |---|---| | `data[].embedding` | Float vector | | `data[].index` | Position in the input | | `usage` | Token usage | ::: tip To build end-to-end RAG with embedding + search + reranking, see the [RAG guide](/en/guides/rag-embeddings). ::: --- --- url: 'https://docs.qevron.ai/getting-started/integration.md' --- # Entegrasyon Rehberi Bu rehber, Qevron'u uygulamanıza **sıfırdan, adım adım** entegre etmenizi sağlar: kurulumdan ilk çağrıya, oradan da üretime (production) hazır bir kuruluma kadar. Hiçbir adımı atlamadan ilerleyebilirsiniz. ## Ön koşullar Başlamadan önce elinizde şunlar olmalı: | Gereksinim | Açıklama | |---|---| | **Qevron API anahtarı** | `sk-` ile başlayan anahtar. Yoksa [Kimlik Doğrulama](/getting-started/authentication) sayfasından oluşturun. | | **Bir programlama dili** | Bu rehberde Python ve JavaScript örnekleri var. curl ile dilden bağımsız da ilerleyebilirsiniz. | | **Temel terminal bilgisi** | Komut çalıştırma, ortam değişkeni ayarlama. | Base URL her örnekte aynıdır: **`https://app.qevron.ai/v1`** *** ## Adım 1 — Anahtarı al ve güvenli sakla API anahtarı bir şifre gibidir. **Asla** kaynak koduna yazmayın; bir **ortam değişkeninde** saklayın. ::: code-group ```bash [macOS / Linux] export QEVRON_API_KEY="sk-..." ``` ```powershell [Windows (PowerShell)] $Env:QEVRON_API_KEY = "sk-..." ``` ```bash [.env dosyası] # .env (bu dosyayı .gitignore'a ekleyin!) QEVRON_API_KEY=sk-... ``` ::: ::: warning Anahtarı tarayıcı/mobil uygulama gibi **istemci tarafına** koymayın — herkes görebilir. İstekleri her zaman kendi sunucunuz üzerinden geçirin (bkz. [Adım 7](#adim-7-uretim-prod-kontrol-listesi)). ::: *** ## Adım 2 — SDK'yı kur Qevron OpenAI uyumlu olduğu için resmi `openai` SDK'sını kullanırsınız. ::: code-group ```bash [Python] pip install openai ``` ```bash [JavaScript] npm install openai ``` ::: curl kullanacaksanız kuruluma gerek yok. *** ## Adım 3 — İstemciyi yapılandır Tek fark `base_url`: OpenAI yerine Qevron'a yönlendirin. ::: code-group ```python [Python] import os from openai import OpenAI client = OpenAI( api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) ``` ```javascript [JavaScript] import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_API_KEY, baseURL: "https://app.qevron.ai/v1", }); ``` ::: *** ## Adım 4 — İlk çağrı ve yanıtı okuma ::: code-group ```python [Python] resp = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Merhaba! Bir cümleyle kendini tanıt."}], ) print(resp.choices[0].message.content) # yanıt metni print(resp.usage.total_tokens) # harcanan token ``` ```javascript [JavaScript] const resp = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Merhaba! Bir cümleyle kendini tanıt." }], }); console.log(resp.choices[0].message.content); console.log(resp.usage.total_tokens); ``` ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"verinova","messages":[{"role":"user","content":"Merhaba!"}]}' ``` ::: Yanıt metni `choices[0].message.content`, kullanım bilgisi `usage` içindedir. Hangi modellerin mevcut olduğunu görmek için [`/v1/models`](/api/models) kullanın. *** ## Adım 5 — Akış (streaming) ekle Sohbet arayüzleri için yanıtı kelime kelime gösterin: ::: code-group ```python [Python] stream = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Üç maddede RAG anlat."}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ```javascript [JavaScript] const stream = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Üç maddede RAG anlat." }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0].delta.content ?? ""); } ``` ::: Ayrıntı: [Akış (Streaming)](/concepts/streaming). *** ## Adım 6 — Hata yönetimi ve yeniden deneme Qevron, kanal düzeyinde **otomatik failover** yapar (bir sağlayıcı düşerse diğerine geçer). Yine de istemci tarafında geçici hataları (`429`, `5xx`) üstel geri çekilme (exponential backoff) ile yeniden denemek iyi bir pratiktir. ```python import time from openai import OpenAI, APIStatusError, APIConnectionError client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") def chat_with_retry(messages, model="verinova", max_retries=4): for attempt in range(max_retries): try: return client.chat.completions.create(model=model, messages=messages) except APIStatusError as e: # 429 (hız limiti) ve 5xx yeniden denenebilir; 4xx (örn. 401/404) denenmez if e.status_code in (429, 500, 502, 503) and attempt < max_retries - 1: time.sleep(2 ** attempt) # 1s, 2s, 4s, 8s continue raise except APIConnectionError: if attempt < max_retries - 1: time.sleep(2 ** attempt) continue raise print(chat_with_retry([{"role": "user", "content": "selam"}]).choices[0].message.content) ``` Hata kodlarının tam listesi: [Hatalar](/api/errors). *** ## Adım 7 — Üretim (prod) kontrol listesi Canlıya çıkmadan önce: * \[ ] **Anahtarı sunucuda tutun.** Tarayıcı/mobilden doğrudan çağrı yapmayın; isteği kendi backend'iniz üzerinden proxy'leyin. * \[ ] **Gizli yönetimi.** Anahtarı ortam değişkeni / secret manager'da saklayın, depoya commit etmeyin. * \[ ] **Model seçimini dinamik yapın.** Model adlarını sabit yazmak yerine [`/v1/models`](/api/models) ile mevcut olanları doğrulayın. * \[ ] **Hız limitlerini izleyin.** Yanıt başlıklarındaki `X-RateLimit-*` değerlerini takip edip gerekirse yavaşlayın (bkz. [API Anahtarları ve Kota](/concepts/api-keys-and-quota)). * \[ ] **Yeniden deneme** mantığı ekleyin ([Adım 6](#adim-6-hata-yonetimi-ve-yeniden-deneme)). * \[ ] **Kullanımı izleyin.** Her yanıttaki `usage` veya [billing uç noktaları](/api/billing) ile maliyeti takip edin. * \[ ] **Zaman aşımı** ayarlayın; uzun isteklerde (görsel/video) makul timeout verin. *** ## AI ajanları ve araçlar için Bu dokümantasyonun tamamına **render etmeden, ham markdown** olarak ulaşabilirsiniz — bir AI asistanına veya IDE'ye beslemek için: ```bash # Tek sayfa: URL sonuna .md ekleyin curl https://docs.qevron.ai/api/chat.md # Tüm dokümanlar tek dosyada curl https://docs.qevron.ai/llms-full.txt ``` Ayrıntı: [API Genel Bakış — Ham markdown erişimi](/api/overview#ham-markdown-erisimi-render-siz). *** ## Sıradaki adımlar --- --- url: 'https://docs.qevron.ai/en/api/errors.md' --- # Errors When something goes wrong, Qevron returns an appropriate HTTP status code and a descriptive JSON body. ## Error format (OpenAI compatible) ```json { "error": { "message": "An error occurred while processing the request", "type": "qevron_error", "code": "model_not_found", "param": "model" } } ``` | Field | Description | |---|---| | `error.message` | Human-readable description | | `error.type` | Error category (e.g. `qevron_error`, `upstream_error`) | | `error.code` | Machine-readable code (e.g. `model_not_found`) | | `error.param` | The parameter that caused the error (if any) | Some responses also include a `qevron` request-id field for tracing. ## HTTP status codes | Code | Meaning | Typical cause | |---|---|---| | `400` | Bad Request | Invalid request format or missing field | | `401` | Unauthorized | Missing/invalid API key | | `403` | Forbidden | IP restriction, disabled group or insufficient balance | | `404` | Not Found | Model or resource not found | | `429` | Too Many Requests | Rate limit (RPM/TPM) exceeded | | `500` | Internal Server Error | Server error | | `502` | Bad Gateway | Upstream provider error | | `503` | Service Unavailable | All channels exhausted / overloaded | ## Provider-specific error formats Non-OpenAI endpoints use the corresponding provider's error format. **Anthropic** ([`/v1/messages`](/en/api/anthropic)): ```json { "type": "error", "error": { "type": "invalid_request_error", "message": "..." } } ``` **Gemini** ([`/v1beta/...`](/en/api/gemini)): ```json { "error": { "code": 400, "message": "...", "status": "INVALID_ARGUMENT" } } ``` ## Common errors | Symptom | Likely cause | Fix | |---|---|---| | `401` | Missing/wrong key | Is `Authorization: Bearer sk-...` correct? | | `404 model_not_found` | Wrong model name or no access | List with [`/v1/models`](/en/api/models) | | `429` | Rate limit | Wait until the `X-RateLimit-Reset-*` time | | `403` | Quota exhausted / IP block | Check your quota and IP restrictions | ::: tip For retryable errors (429, 502, 503), retry after a short wait (exponential backoff). Qevron already retries automatically across channels. ::: --- --- url: 'https://docs.qevron.ai/en/models/external-providers.md' description: >- How to reach OpenAI, Anthropic, Gemini and other external provider models through Qevron — just swap the base_url. --- # External Providers (Passthrough) Besides Qevron's own [local models](/en/models/), you can reach external providers' models (OpenAI, Anthropic, Google Gemini, Deepseek, …) **through the same API**. Qevron forwards these requests to the provider **unchanged** (passthrough); you only point `base_url` at Qevron and authenticate with your Qevron key. ## How it works 1. An admin configures a **channel** for the provider (provider API key + model list). 2. You make a normal request using the provider's **standard model id** (e.g. `gpt-4o`, `claude-sonnet-4-5`, `gemini-2.5-pro`). 3. The request shape is the provider's own — you just point the endpoint at Qevron. ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") # An external model — only base_url changed resp = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello"}], ) ``` ## Which models can I reach? For a **live list** of the models your key can reach: ```bash curl https://app.qevron.ai/v1/models \ -H "Authorization: Bearer $QEVRON_KEY" ``` Each model's `type`/`modality` field tells you what it does (llm, embedding, tts, …). ## Request shapes External models use the schema of their own protocol: * **OpenAI-compatible** (gpt-\*, most models): [Chat](/en/api/chat) · [Embeddings](/en/api/embeddings) · [Images](/en/api/images) · [Audio](/en/api/audio) * **Anthropic** (claude-\*): [Anthropic Messages](/en/api/anthropic) * **Google Gemini** (gemini-\*): [Gemini](/en/api/gemini) ::: tip You don't need to change your existing code — keep using the OpenAI/Anthropic/Gemini SDK and just point `base_url` (and the `api_key` for Gemini) at Qevron. ::: --- --- url: 'https://docs.qevron.ai/en/resources/faq.md' --- # FAQ ## General **What exactly is Qevron?** An *AI gateway* that unifies many AI providers behind one OpenAI-compatible API. One key, one address, one format. See [What is Qevron?](/en/getting-started/introduction) **I don't have an OpenAI account — can I still use it?** Yes. You connect to Qevron only with a Qevron API key. Provider keys (OpenAI, Anthropic, etc.) are managed on the Qevron side; you don't need to know them. ## Authentication **How do I get an API key?** Create a token in the Qevron admin dashboard. See [Authentication](/en/getting-started/authentication). **I'm getting `401 Unauthorized`, why?** The key is missing or wrong. Make sure you send the `Authorization: Bearer sk-...` header correctly. If using an SDK, check the `api_key` and `base_url` settings. ## Models **Which models are available?** List the models your key can access with `GET /v1/models`. See [Models API](/en/api/models). **I'm getting `404 model_not_found`.** The model name may be misspelled, or your group has no access to it. Use the names from the `/v1/models` output. **Can I use OpenAI model names (e.g. `gpt-4o`)?** Only if that model is defined on a channel in your deployment. Always verify available names with `/v1/models`. ## Requests **How do I stream the response?** Add `"stream": true` to the request. See [Streaming](/en/concepts/streaming). **I get an error when I send an image.** Images only work on vision-capable models (e.g. `spook-vision`). Don't send images to text models like `verinova`. Also, large images may return `413`; downscale before sending. See [Vision](/en/guides/vision). **What does `429 Too Many Requests` mean?** You exceeded the rate limit. Wait until the time in the `X-RateLimit-Reset-*` header and retry. See [API Keys & Quota](/en/concepts/api-keys-and-quota). ## Billing **How do I see how much I've spent?** Look at the `usage` field in each response or the [`/v1/dashboard/billing/usage`](/en/api/billing) endpoint. ## More Have a question you couldn't find an answer to? Check the [API Reference](/en/api/overview) and [Glossary](/en/resources/glossary). --- --- url: 'https://docs.qevron.ai/api/billing.md' --- # Faturalama / Kullanım Anahtarınızın kotasını ve kullanımını programatik olarak sorgulayabilirsiniz. Tüm uç noktalar `GET`'tir ve API anahtarı ile doğrulanır. ## Abonelik / kota ```bash curl https://app.qevron.ai/v1/dashboard/billing/subscription \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Grubunuzun toplam ve kalan kota bilgisini döndürür. ## Toplam kullanım ```bash curl https://app.qevron.ai/v1/dashboard/billing/usage \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ### Yanıt ```json { "total_usage": 1234.56 } ``` `total_usage` toplam harcamanızı temsil eder. ## Kota ```bash curl https://app.qevron.ai/v1/dashboard/billing/quota \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Grubun kota yapısını döndürür. ::: tip Anlık kullanım için her yanıttaki `usage` alanına ve hız limiti başlıklarına da bakabilirsiniz (bkz. [API Anahtarları ve Kota](/concepts/api-keys-and-quota)). ::: --- --- url: 'https://docs.qevron.ai/en/guides/first-chatbot.md' --- # First Chatbot In this guide we'll write a simple command-line chatbot with Python and the `openai` SDK. We'll make it remember history and stream responses. ## Setup ```bash pip install openai export QEVRON_API_KEY="sk-..." # your own key ``` ## 1. Create the client ```python import os from openai import OpenAI client = OpenAI( api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) ``` ## 2. A loop that keeps history For the chatbot to remember context, we accumulate every message in a `messages` list: ```python messages = [ {"role": "system", "content": "You are an assistant that answers briefly and clearly."}, ] print("Chat started (type 'q' to quit)\n") while True: user_input = input("You: ") if user_input.strip().lower() == "q": break messages.append({"role": "user", "content": user_input}) # Stream the response print("Bot: ", end="", flush=True) full = "" stream = client.chat.completions.create( model="verinova", messages=messages, stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content or "" full += delta print(delta, end="", flush=True) print("\n") # Add the bot's reply to history too messages.append({"role": "assistant", "content": full}) ``` ## How it works * The **`messages` list** grows each turn, so the bot "remembers" the prior conversation. * **`stream=True`** prints the response word by word (see [Streaming](/en/concepts/streaming)). * Adding the bot's reply (`full`) back into `messages` as the `assistant` role is critical for keeping context. ## Improvements * **Limit context**: In very long chats, trim old messages (save tokens). * **Customize the system message**: Define the bot's personality and task with the `system` message. * **Error handling**: On `429`/`503`, wait briefly and retry (see [Errors](/en/api/errors)). Next: teach your bot your own documents with [RAG: Embedding + Rerank](/en/guides/rag-embeddings). --- --- url: 'https://docs.qevron.ai/api/pricing.md' --- # Fiyatlandırma API anahtarınızın erişebildiği modellerin **satış fiyatını** programatik olarak sorgulayabilirsiniz — yani faturalandırıldığınız gerçek fiyatı. Tüm uç noktalar `GET`'tir ve API anahtarı ile doğrulanır. Fiyatlar müşteriye dönük birimlerde sunulur: LLM / embedding / rerank için **1M token**, TTS için **1M karakter**, STT için **dakika**, görsel üretimi/düzenlemesi için **görsel** başına. Para birimi `USD`'dir. ## Tüm fiyat listesi Anahtarınızın kullanabildiği her modelin fiyatını döndürür (kapsam `GET /v1/models` ile aynıdır). ```bash curl https://app.qevron.ai/v1/pricing \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ### Yanıt ```json { "object": "list", "data": [ { "model": "verinova-large", "type": 1, "modality": "llm", "owner": "arpanet", "currency": "USD", "pricing": { "input": { "amount": 0.1, "unit": "1M_tokens", "display": "$0.1 / 1M tokens" }, "output": { "amount": 0.3, "unit": "1M_tokens", "display": "$0.3 / 1M tokens" } } }, { "model": "blab-stable", "type": 7, "modality": "tts", "owner": "arpanet", "currency": "USD", "pricing": { "input": { "amount": 6, "unit": "1M_characters", "display": "$6 / 1M characters" } } }, { "model": "solab-stt", "type": 8, "modality": "stt", "owner": "arpanet", "currency": "USD", "pricing": { "input": { "amount": 0.003, "unit": "minute", "display": "$0.003 / minute" } } } ] } ``` | Alan | Açıklama | |---|---| | `model` | Model adı (`/v1/chat/completions` vb. çağrılarında kullandığınız ad). | | `type` | Sayısal model tipi (1=LLM, 3=embedding, 5=görsel, 6=görsel düzenleme, 7=TTS, 8=STT, 10=rerank). | | `modality` | İnsan/AI okunur tip etiketi: `llm`, `embedding`, `rerank`, `tts`, `stt`, `image`, `image_edit`. | | `owner` | Modelin sağlayıcısı. | | `currency` | Fiyat para birimi (`USD`). | | `pricing` | Bu modele uygulanan ücret boyutları. Yalnızca sıfırdan büyük boyutlar yer alır. | | `pricing..amount` | Birim başına satış fiyatı (sayısal). | | `pricing..unit` | Birim: `1M_tokens`, `1M_characters`, `minute`, `image`. | | `pricing..display` | İnsan-okunur fiyat metni (ör. `"$0.3 / 1M tokens"`). | Olası boyutlar: LLM için `input` + `output`; embedding/rerank/TTS için `input`; STT için `input`; görsel üretimi/düzenlemesi için `per_image`. ## Tek model fiyatı ```bash curl https://app.qevron.ai/v1/pricing/verinova-large \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Tek bir model nesnesi döndürür (yukarıdaki `data` öğeleriyle aynı şekil). Anahtarınız modele erişemiyorsa `404 model_not_found` döner. ::: tip Döndürülen fiyatlar **nihai satış fiyatıdır** — grup indirimleri ve platform çarpanı (markup) zaten uygulanmıştır, yani çağrı başına ödeyeceğiniz tutardır. Maliyet tabanı asla açığa çıkmaz. Yalnızca anahtarınızın kullanabildiği modeller listelenir. Gerçek harcamanız için [Faturalama / Kullanım](/api/billing)'a bakın. ::: --- --- url: 'https://docs.qevron.ai/en/api/gemini.md' --- # Gemini Compatible Qevron also supports Google Gemini's **native API** format. So you can point the `google-genai` SDK or your Gemini-format requests at Qevron. Both `/v1` and `/v1beta` prefixes are supported (the Gemini SDK usually uses `/v1beta`). ## Authentication The Gemini SDK uses the `x-goog-api-key` header; Qevron accepts it. `Authorization: Bearer` also works. ## Example ::: code-group ```bash [curl] curl "https://app.qevron.ai/v1beta/models/verinova:generateContent" \ -H "x-goog-api-key: $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "Hello, introduce yourself." } ] } ] }' ``` ```python [Python (google-genai)] from google import genai client = genai.Client( api_key="QEVRON_API_KEY", http_options={"base_url": "https://app.qevron.ai"}, ) resp = client.models.generate_content( model="verinova", contents="Hello, introduce yourself.", ) print(resp.text) ``` ::: ## Response A response in Gemini format is returned; the generated text is in `candidates[].content.parts[].text`: ```json { "candidates": [ { "content": { "role": "model", "parts": [ { "text": "Hello! I'm an assistant running through Qevron." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 8, "candidatesTokenCount": 14, "totalTokenCount": 22 } } ``` ::: tip Use `systemInstruction` for a system prompt and the `:streamGenerateContent` endpoint for streaming (same as the Gemini API). ::: --- --- url: 'https://docs.qevron.ai/api/gemini.md' --- # Gemini Uyumlu Qevron, Google Gemini'nin **native (yerel) API** biçimini de destekler. Böylece `google-genai` SDK'sını veya Gemini formatındaki isteklerinizi Qevron'a yönlendirebilirsiniz. Hem `/v1` hem `/v1beta` ön ekleri desteklenir (Gemini SDK genelde `/v1beta` kullanır). ## Kimlik doğrulama Gemini SDK `x-goog-api-key` başlığını kullanır; Qevron bunu kabul eder. `Authorization: Bearer` de çalışır. ## Örnek ::: code-group ```bash [curl] curl "https://app.qevron.ai/v1beta/models/verinova:generateContent" \ -H "x-goog-api-key: $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "Merhaba, kendini tanıt." } ] } ] }' ``` ```python [Python (google-genai)] from google import genai client = genai.Client( api_key="QEVRON_API_KEY", http_options={"base_url": "https://app.qevron.ai"}, ) resp = client.models.generate_content( model="verinova", contents="Merhaba, kendini tanıt.", ) print(resp.text) ``` ::: ## Yanıt Gemini biçiminde bir yanıt döner; üretilen metin `candidates[].content.parts[].text` içindedir: ```json { "candidates": [ { "content": { "role": "model", "parts": [ { "text": "Merhaba! Ben Qevron üzerinden çalışan bir asistanım." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 8, "candidatesTokenCount": 14, "totalTokenCount": 22 } } ``` ::: tip Sistem talimatı için `systemInstruction`, akış için `:streamGenerateContent` uç noktasını kullanabilirsiniz (Gemini API ile aynı). ::: --- --- url: 'https://docs.qevron.ai/en/resources/glossary.md' --- # Glossary Terms that come up often with Qevron and AI APIs. **AI Gateway** A middle layer that unifies many AI providers behind one API. Qevron is an AI gateway. **API Key** A secret string (`sk-...`) that proves a request is made on your behalf. See [Authentication](/en/getting-started/authentication). **Base URL** The API's base address. For Qevron it's `https://app.qevron.ai/v1`. **Embedding** An array of numbers (a vector) representing the meaning of text. The foundation of search and RAG. See [Embeddings](/en/api/embeddings). **Group** The access and quota unit for keys. Determines which models can be accessed and the limits. **Channel** The upstream source serving a model: provider + address + credential. See [Providers](/en/concepts/providers). **LLM (Large Language Model)** An AI model that generates text (e.g. chat models). **MCP (Model Context Protocol)** A protocol that lets models access external tools in a standard way. See [MCP / SSE](/en/guides/mcp). **Moderation** Classifying whether text contains harmful/inappropriate content. See [Moderations](/en/api/moderations). **Prompt** The input text / instruction you give the model. **Quota** The total usage/balance a group can spend. **RAG (Retrieval-Augmented Generation)** A method to get more accurate answers by retrieving your own documents for the model. See [RAG guide](/en/guides/rag-embeddings). **Rerank** Sorting a list of documents by relevance to a query. See [Rerank](/en/api/rerank). **SSE (Server-Sent Events)** A continuous, one-way data stream from server to client. Streaming is built on this. **STT (Speech-to-Text)** Converting speech to text (transcription). See [Audio](/en/api/audio). **Streaming** Receiving the response piece by piece (word by word) instead of all at once. See [Streaming](/en/concepts/streaming). **Token** A chunk of text the model processes (roughly a syllable/word). Usage and pricing are token-based. **TTS (Text-to-Speech)** Converting text to speech. See [Audio](/en/api/audio). **Vision** A model's ability to "see" an image and respond about it. See [Vision](/en/guides/vision). --- --- url: 'https://docs.qevron.ai/capabilities/vision-vqa.md' --- # Görsel + Soru-Cevap (VQA) Bir görsel + soru verirsin, model görseli "okur" ve sorunu cevaplar. OpenAI vision formatı — görsel `image_url` content tipi olarak chat completion içine gömülür. ## Mevcut modeller | Model | Özellik | |---|---| | **`spook-vision`** *(önerilen, yerel)* | Multimodal, hızlı, GPU üzerinden | | `gpt-4o` | OpenAI üzerinden — yüksek kalite, daha pahalı | | `claude-3-5-sonnet` | Anthropic üzerinden | ## curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-vision", "messages": [{ "role": "user", "content": [ {"type": "text", "text": "Bu görselde ne var?"}, {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}} ] }] }' ``` ## Python (openai SDK) ```python import base64 from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") # Yerel dosyadan with open("foto.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = client.chat.completions.create( model="spook-vision", messages=[{ "role": "user", "content": [ {"type": "text", "text": "Bu fotoğrafta kaç kişi var, ne yapıyorlar?"}, {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64}"}}, ], }], ) print(resp.choices[0].message.content) ``` URL'den de geçer: ```python {"type": "image_url", "image_url": {"url": "https://example.com/foto.jpg"}} ``` ## Boyut limiti * Maksimum payload: **50 MB** (data URL + JSON tüm gövde). * Önerilen: client tarafında 1280 px maksimum genişlik + JPEG 0.85 kalite → ~150–300 KB. * Çok büyük görsel gönderirsen ingress (nginx/Caddy) 413 dönebilir. ## Hangisi vision için? | İhtiyaç | Model | |---|---| | "Bu görselde ne var?" — genel betimleme | `spook-vision` | | Detaylı analiz / akıl yürütme | `gpt-4o` (OpenAI anahtarı varsa) | | Görseldeki yazıyı çıkarmak (OCR) | `spook-ocr` — özel endpoint, [OCR sayfası](/capabilities/vision-ocr) | | Nesneleri bbox ile saymak | `spook-detect` — özel endpoint, [Detect sayfası](/capabilities/vision-detect) | ## Sorun çözme * **"413 Request Entity Too Large"** → görsel çok büyük. Client'ta downscale + JPEG sıkıştır. * **"image format not supported"** → `data:image/png;base64,...` veya `data:image/jpeg;base64,...` prefix'ini doğru ver. * **Yanlış cevap** → daha spesifik soru sor; "Bu görselde ne var?" çok genel, "Köpek kaç tane?" daha güvenilir. Devam: [OCR](/capabilities/vision-ocr) · [Nesne tespiti](/capabilities/vision-detect) --- --- url: 'https://docs.qevron.ai/guides/vision.md' --- # Görsel Anlama (Vision) Görsel destekleyen modeller (örn. `spook-vision`, `spook-ocr`, `spook-detect`) bir görseli "görüp" hakkında soru yanıtlayabilir. Görseli, sohbet mesajının içine çok parçalı içerik olarak eklersiniz. ## Görseli gönderme yöntemleri İki yol vardır: 1. **Genel URL** — Görsel internette erişilebilir bir adreste. 2. **Base64 data URL** — Görseli `data:image/jpeg;base64,...` olarak gömün (yerel dosyalar için). ## Örnek (base64 ile) ```python import os, base64 from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") with open("foto.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = client.chat.completions.create( model="spook-vision", messages=[ { "role": "user", "content": [ {"type": "text", "text": "Bu görselde ne görüyorsun?"}, {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64}"}}, ], } ], ) print(resp.choices[0].message.content) ``` ## Örnek (URL ile) ```json { "model": "spook-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Bu görseli açıkla." }, { "type": "image_url", "image_url": { "url": "https://ornek.com/foto.jpg" } } ] } ] } ``` ## Görsel görevleri için modeller | Model | Görev | |---|---| | `spook-vision` | Görseli açıklama / hakkında soru-cevap | | `spook-ocr` | Görseldeki metni çıkarma (OCR) | | `spook-detect` | Görseldeki nesneleri tespit etme | ## İpuçları ::: tip Görsel boyutunu küçültün Çok büyük görseller hem yavaştır hem de istek boyutu sınırına (413 hatası) takılabilir. Göndermeden önce görseli makul bir boyuta (örn. en fazla 1280 piksel) küçültün ve JPEG olarak sıkıştırın. ::: * Yalnızca metin soruları için görsel eklemeyin; görsel desteklemeyen modellere (örn. `verinova`) görsel gönderirseniz hata alırsınız. * Tek mesajda birden fazla görsel gönderebilirsiniz (içerik dizisine birden çok `image_url` ekleyin). İlgili: [Chat API — Vision](/api/chat#gorsel-anlama-vision). --- --- url: 'https://docs.qevron.ai/guides/image-generation.md' --- # Görsel Üretimi Bir metin açıklamasından görsel üretin ve kaydedin. ## Görsel üretip dosyaya kaydetme ```python import os, base64 from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") resp = client.images.generate( model="spook-generate", prompt="Geceleyin neon ışıklı bir şehir caddesi, sinematik, yüksek detay", n=1, size="1024x1024", response_format="b64_json", ) img_b64 = resp.data[0].b64_json with open("gorsel.png", "wb") as f: f.write(base64.b64decode(img_b64)) print("gorsel.png kaydedildi") ``` ## curl ile ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "Geceleyin neon ışıklı bir şehir caddesi, sinematik", "n": 1, "size": "1024x1024", "response_format": "b64_json" }' ``` ## Arka plan temizleme (görsel düzenleme) Var olan bir görselin arka planını silmek için `spook-background` modeliyle görsel düzenleme uç noktasını kullanın: ```bash curl https://app.qevron.ai/v1/images/edits \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=spook-background" \ -F "image=@urun.jpg" \ -F "n=1" \ -F "response_format=b64_json" ``` Sonuç, arka planı silinmiş şeffaf bir PNG'dir. Bu model `prompt` gerektirmez. ## İyi prompt yazma ipuçları * **Net ve betimleyici olun**: Konu + stil + ışık + kompozisyon (örn. "sulu boya", "sinematik", "geniş açı"). * **`response_format`**: `b64_json` (gömülü veri) veya `url` (bağlantı). * **`size`**: Model destekliyorsa `1024x1024`, `1792x1024` vb. İlgili: [Images API](/api/images). --- --- url: 'https://docs.qevron.ai/capabilities/image-gen.md' --- # Görsel Üretimi (Text-to-Image) Bir metin tarifinden görsel üretir. OpenAI `images/generations` formatı. ## Mevcut modeller | Model | Çıktı | Hız | |---|---|---| | **`spook-generate`** *(önerilen, yerel)* | 1024×1024 (SDXL türevi) | Orta | | `dall-e-3` | OpenAI tarafı | Yavaş ama yüksek kalite | | `dall-e-2` | OpenAI tarafı | Hızlı, kalite düşük | ## curl ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "İstanbul Boğazı, gün batımı, sinematik aydınlatma, fotoğraf gerçekçi", "size": "1024x1024", "n": 1 }' ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") resp = client.images.generate( model="spook-generate", prompt="Bir mavi kedi, akıllı, kütüphanede kitap okuyor, illüstrasyon", size="1024x1024", n=1, ) print(resp.data[0].url) # public URL veya b64_json ``` ## Parametreler | Parametre | Anlamı | Geçerli değerler | |---|---|---| | `prompt` | İstediğin görsel | Detaylı yaz — "cat" değil "blue domestic cat sitting on a windowsill, oil painting style" | | `size` | Boyut | `256x256`, `512x512`, `1024x1024` | | `n` | Kaç görsel üretilsin | 1–4 (spook-generate için 1 önerilen) | | `quality` | Kalite seviyesi | `standard` / `hd` (OpenAI tarafı) | | `response_format` | Yanıt biçimi | `url` (varsayılan) / `b64_json` | ## Prompt yazma ipuçları * **Sıfat sırası**: konu → stil → ışık → açı → kompozisyon. Örnek: "kırmızı sportif araba, fotoğraf gerçekçi, gün batımı ışığı, alçak açı, sinematik kompozisyon". * **Yasak/negatif**: spook-generate negatif prompt'u `prompt`'un sonuna `, --no <şey>` şeklinde alır (bazı SDXL sürümleri). * **Stil referansı**: "Studio Ghibli style", "oil painting", "watercolor", "low-poly 3D render". ## Sorun çözme * **Görsel bulanık** → prompt çok kısa olabilir. En az 15–20 kelimelik açıklama yaz. * **Yanlış sayıda nesne** → SDXL "üç" kavramını sayısal olarak iyi anlamaz; "three blue birds" yerine her birini ayrı tanımla. * **NSFW filtreye takıldı** → spook-generate açık prompt'lar için reddedebilir; yeniden ifade et. Devam: [Arka plan kaldırma](/capabilities/background-removal) · [VQA](/capabilities/vision-vqa) --- --- url: 'https://docs.qevron.ai/models/external-providers.md' description: >- OpenAI, Anthropic, Gemini ve diğer harici sağlayıcı modellerine Qevron üzerinden nasıl erişilir — sadece base_url'i değiştirin. --- # Harici Sağlayıcılar (Passthrough) Qevron'un kendi barındırdığı [yerel modellerin](/models/) yanında, harici sağlayıcıların (OpenAI, Anthropic, Google Gemini, Deepseek, …) modellerine de **aynı API üzerinden** erişebilirsiniz. Qevron bu istekleri sağlayıcıya **olduğu gibi** iletir (passthrough); siz yalnızca `base_url`'i Qevron'a çevirir ve Qevron anahtarınızla kimlik doğrularsınız. ## Nasıl çalışır? 1. Bir yönetici, ilgili sağlayıcı için bir **kanal** tanımlar (sağlayıcı API anahtarı + model listesi). 2. Siz, sağlayıcının **standart model kimliğini** (örn. `gpt-4o`, `claude-sonnet-4-5`, `gemini-2.5-pro`) kullanarak normal bir istek atarsınız. 3. İstek şeması sağlayıcının kendi şemasıyla aynıdır — sadece uç noktayı Qevron'a yöneltirsiniz. ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") # Harici bir model — yalnızca base_url değişti resp = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Merhaba"}], ) ``` ## Hangi modellere erişebilirim? Anahtarınızın erişebildiği modellerin **canlı listesi** için: ```bash curl https://app.qevron.ai/v1/models \ -H "Authorization: Bearer $QEVRON_KEY" ``` Her modelin `type`/`modality` alanı, ne işe yaradığını söyler (llm, embedding, tts, …). ## İstek şemaları Harici modeller, ait oldukları protokolün şemasını kullanır: * **OpenAI uyumlu** (gpt-\*, çoğu model): [Chat](/api/chat) · [Embeddings](/api/embeddings) · [Images](/api/images) · [Audio](/api/audio) * **Anthropic** (claude-\*): [Anthropic Messages](/api/anthropic) * **Google Gemini** (gemini-\*): [Gemini](/api/gemini) ::: tip Mevcut kodunuzu değiştirmenize gerek yok — OpenAI/Anthropic/Gemini SDK'sını kullanıp yalnızca `base_url`'i (ve Gemini için `api_key`'i) Qevron'a çevirin. ::: --- --- url: 'https://docs.qevron.ai/api/errors.md' --- # Hatalar Bir şey ters gittiğinde Qevron, uygun bir HTTP durum kodu ve açıklayıcı bir JSON gövdesi döndürür. ## Hata biçimi (OpenAI uyumlu) ```json { "error": { "message": "İsteği işlerken bir hata oluştu", "type": "qevron_error", "code": "model_not_found", "param": "model" } } ``` | Alan | Açıklama | |---|---| | `error.message` | İnsan tarafından okunabilir açıklama | | `error.type` | Hata kategorisi (örn. `qevron_error`, `upstream_error`) | | `error.code` | Makine tarafından okunabilir kod (örn. `model_not_found`) | | `error.param` | Hataya neden olan parametre (varsa) | Bazı yanıtlarda izleme için bir `qevron` istek kimliği alanı da bulunur. ## HTTP durum kodları | Kod | Anlamı | Tipik neden | |---|---|---| | `400` | Bad Request | Geçersiz istek biçimi veya eksik alan | | `401` | Unauthorized | Eksik/geçersiz API anahtarı | | `403` | Forbidden | IP kısıtlaması, devre dışı grup veya yetersiz bakiye | | `404` | Not Found | Model veya kaynak bulunamadı | | `429` | Too Many Requests | Hız limiti (RPM/TPM) aşıldı | | `500` | Internal Server Error | Sunucu hatası | | `502` | Bad Gateway | Üst sağlayıcı hatası | | `503` | Service Unavailable | Tüm kanallar tükendi / aşırı yük | ## Sağlayıcıya özgü hata biçimleri OpenAI dışındaki uç noktalar, ilgili sağlayıcının hata biçimini kullanır. **Anthropic** ([`/v1/messages`](/api/anthropic)): ```json { "type": "error", "error": { "type": "invalid_request_error", "message": "..." } } ``` **Gemini** ([`/v1beta/...`](/api/gemini)): ```json { "error": { "code": 400, "message": "...", "status": "INVALID_ARGUMENT" } } ``` ## Sık karşılaşılan hatalar | Belirti | Olası neden | Çözüm | |---|---|---| | `401` | Anahtar eksik/yanlış | `Authorization: Bearer sk-...` doğru mu? | | `404 model_not_found` | Model adı yanlış veya erişiminiz yok | [`/v1/models`](/api/models) ile listeleyin | | `429` | Hız limiti | `X-RateLimit-Reset-*` zamanına kadar bekleyin | | `403` | Kota bitti / IP engeli | Kotanızı ve IP kısıtlamasını kontrol edin | ::: tip Yeniden denenebilir hatalarda (429, 502, 503) kısa bir bekleme ile (exponential backoff) tekrar deneyin. Qevron zaten kanallar arasında otomatik yeniden deneme yapar. ::: --- --- url: 'https://docs.qevron.ai/getting-started/quickstart.md' --- # Hızlı Başlangıç Bu sayfada **5 dakikada** ilk yapay zeka isteğinizi atacaksınız. İhtiyacınız olan tek şey bir API anahtarı. ## İhtiyacınız olanlar * Bir **Qevron API anahtarı** (`sk-...`). Yoksa [Kimlik Doğrulama](/getting-started/authentication) sayfasından oluşturun. * İsteğe bağlı: Python veya Node.js (curl ile bunlara gerek yok). ::: tip Daha kapsamlı kurulum mu istiyorsunuz? Bu sayfa en hızlı yolu gösterir. Kurulumdan üretime kadar adım adım, hata yönetimi ve prod kontrol listesiyle ilerlemek için [Entegrasyon Rehberi](/getting-started/integration)'ne bakın. ::: ## 1. API anahtarınızı alın Qevron yönetim panelinden bir anahtar oluşturun. Anahtar `sk-` ile başlayan bir metindir, örneğin: ``` sk-aBcD1234eFgH5678... ``` ::: warning Anahtarınızı gizli tutun API anahtarı bir şifre gibidir. Kaynak koduna, ekran görüntülerine veya genel depolara koymayın. Sunucu ortam değişkeninde (`QEVRON_API_KEY` gibi) saklayın. ::: Anahtar oluşturma adımları için [Kimlik Doğrulama](/getting-started/authentication) sayfasına bakın. ## 2. İlk isteğinizi atın Aşağıdaki örnek, `verinova` modeline basit bir soru gönderir. `$QEVRON_API_KEY` yerine kendi anahtarınızı koyun. ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ { "role": "user", "content": "Merhaba! Kendini bir cümleyle tanıt." } ] }' ``` ```python [Python] from openai import OpenAI client = OpenAI( api_key="QEVRON_API_KEY", # kendi anahtarınız base_url="https://app.qevron.ai/v1", ) resp = client.chat.completions.create( model="verinova", messages=[ {"role": "user", "content": "Merhaba! Kendini bir cümleyle tanıt."}, ], ) print(resp.choices[0].message.content) ``` ```javascript [JavaScript] import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_API_KEY, baseURL: "https://app.qevron.ai/v1", }); const resp = await client.chat.completions.create({ model: "verinova", messages: [ { role: "user", content: "Merhaba! Kendini bir cümleyle tanıt." }, ], }); console.log(resp.choices[0].message.content); ``` ::: ## 3. Yanıtı okuyun Qevron OpenAI biçiminde bir yanıt döndürür: ```json { "id": "chatcmpl-...", "object": "chat.completion", "created": 1716200000, "model": "verinova", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Merhaba! Ben Qevron üzerinden çalışan bir yapay zeka asistanıyım." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 18, "completion_tokens": 16, "total_tokens": 34 } } ``` Yanıt metni `choices[0].message.content` içindedir. `usage` alanı kaç token harcadığınızı gösterir. ## İlk çağrı sorun giderme | Belirti | Olası neden | Çözüm | |---|---|---| | `401 Unauthorized` | Anahtar eksik/yanlış | `Authorization: Bearer sk-...` doğru mu? SDK'da `api_key` + `base_url` ayarlı mı? | | `404 model_not_found` | Model adı yanlış / erişim yok | [`/v1/models`](/api/models) ile mevcut adları listeleyin | | Bağlantı hatası | Yanlış `base_url` | `https://app.qevron.ai/v1` (sonunda `/v1` olmalı) | | `429` | Hız limiti | Kısa bekleyip tekrar deneyin (bkz. [Entegrasyon Rehberi](/getting-started/integration#adim-6-hata-yonetimi-ve-yeniden-deneme)) | ## Sırada ne var? --- --- url: 'https://docs.qevron.ai/en/concepts/how-it-works.md' --- # How it Works When you send a request to Qevron, it goes through a few stages before the response comes back. This page walks through that journey simply. ## The request's journey ``` 1. Request 2. Auth 3. Distributor 4. Provider 5. Response ───────▶ app.qevron.ai/v1 ───▶ (picks channel) ───▶ (channel) ───▶ Bearer sk-... key + group based on the OpenAI / OpenAI-format + quota checked model name Anthropic / response local model ``` 1. **Request** — Your app hits `https://app.qevron.ai/v1/...` with an `Authorization: Bearer sk-...` header. 2. **Authentication** — Qevron validates the key, finds its **group**, and checks the group's access to the model and its quota. 3. **Distributor** — Picks a suitable **channel** among those serving the requested model. With multiple channels it load-balances. 4. **Provider** — The chosen channel converts the request to the right format and forwards it to the real provider (OpenAI, Anthropic, Gemini, a local model, etc.). 5. **Response** — The provider's response is converted back to OpenAI format and returned; usage (tokens) is recorded. ## Automatic retry and failover If a channel fails (e.g. the provider is temporarily unreachable or hits a rate limit), Qevron automatically tries to route the request to **another suitable channel**. This shields your app from a single provider's problems. * Rate limit (HTTP 429) → retries after a short wait. * Model unavailable → skips that channel, tries the next. * All channels exhausted → returns a meaningful error (see [Errors](/en/api/errors)). ## Key terms | Term | Meaning | |---|---| | **Model** | The AI you request (e.g. `verinova`). Represents a capability. | | **Channel** | The upstream source serving a model; provider + address + credential. | | **Provider** | Services like OpenAI, Anthropic, Gemini. A channel's type. | | **Group** | The access and quota unit for keys. | | **Token** | A chunk of text the model processes; usage is measured in these. | Next: [Models](/en/concepts/models) · [Providers](/en/concepts/providers) · [API Keys & Quota](/en/concepts/api-keys-and-quota) --- --- url: 'https://docs.qevron.ai/guides/first-chatbot.md' --- # İlk Sohbet Botu Bu rehberde, Python ve `openai` SDK'sı ile komut satırında çalışan basit bir sohbet botu yazacağız. Botun geçmişi hatırlamasını ve yanıtları akışla göstermesini sağlayacağız. ## Hazırlık ```bash pip install openai export QEVRON_API_KEY="sk-..." # kendi anahtarınız ``` ## 1. İstemciyi kurun ```python import os from openai import OpenAI client = OpenAI( api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) ``` ## 2. Geçmişi tutan döngü Sohbet botunun bağlamı hatırlaması için, her mesajı bir `messages` listesinde biriktiririz: ```python messages = [ {"role": "system", "content": "Sen kısa ve net yanıt veren bir asistansın."}, ] print("Sohbet başladı (çıkmak için 'q')\n") while True: user_input = input("Sen: ") if user_input.strip().lower() == "q": break messages.append({"role": "user", "content": user_input}) # Yanıtı akışla al print("Bot: ", end="", flush=True) full = "" stream = client.chat.completions.create( model="verinova", messages=messages, stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content or "" full += delta print(delta, end="", flush=True) print("\n") # Botun yanıtını da geçmişe ekle messages.append({"role": "assistant", "content": full}) ``` ## Nasıl çalışıyor? * **`messages` listesi** her turda büyür; böylece bot önceki konuşmayı "hatırlar". * **`stream=True`** sayesinde yanıt kelime kelime ekrana yazılır (bkz. [Akış](/concepts/streaming)). * Botun yanıtını (`full`) tekrar `messages`'a `assistant` rolüyle eklemek bağlamın korunması için kritiktir. ## İyileştirmeler * **Bağlamı sınırlayın**: Çok uzun sohbetlerde eski mesajları kırpın (token tasarrufu). * **Sistem mesajını özelleştirin**: Botun kişiliğini ve görevini `system` mesajıyla belirleyin. * **Hata yönetimi**: `429`/`503` durumunda kısa bekleyip yeniden deneyin (bkz. [Hatalar](/api/errors)). Sıradaki: [RAG: Embedding + Rerank](/guides/rag-embeddings) ile botunuza kendi dokümanlarınızı öğretin. --- --- url: 'https://docs.qevron.ai/en/guides/image-generation.md' --- # Image Generation Generate and save an image from a text description. ## Generate and save to a file ```python import os, base64 from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") resp = client.images.generate( model="spook-generate", prompt="A neon-lit city street at night, cinematic, high detail", n=1, size="1024x1024", response_format="b64_json", ) img_b64 = resp.data[0].b64_json with open("image.png", "wb") as f: f.write(base64.b64decode(img_b64)) print("image.png saved") ``` ## With curl ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "A neon-lit city street at night, cinematic", "n": 1, "size": "1024x1024", "response_format": "b64_json" }' ``` ## Background removal (image editing) To remove the background of an existing image, use the image edits endpoint with the `spook-background` model: ```bash curl https://app.qevron.ai/v1/images/edits \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=spook-background" \ -F "image=@product.jpg" \ -F "n=1" \ -F "response_format=b64_json" ``` The result is a transparent PNG with the background removed. This model requires no `prompt`. ## Prompt-writing tips * **Be clear and descriptive**: subject + style + lighting + composition (e.g. "watercolor", "cinematic", "wide angle"). * **`response_format`**: `b64_json` (embedded data) or `url` (link). * **`size`**: `1024x1024`, `1792x1024`, etc., if the model supports it. Related: [Images API](/en/api/images). --- --- url: 'https://docs.qevron.ai/en/capabilities/image-gen.md' --- # Image Generation (Text-to-Image) Generates an image from a text prompt. OpenAI `images/generations` format. ## Available models | Model | Output | Speed | |---|---|---| | **`spook-generate`** *(recommended, local)* | 1024×1024 (SDXL derivative) | Medium | | `dall-e-3` | OpenAI side | Slow but high quality | | `dall-e-2` | OpenAI side | Fast, lower quality | ## curl ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "Bosphorus at sunset, cinematic lighting, photorealistic", "size": "1024x1024", "n": 1 }' ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") resp = client.images.generate( model="spook-generate", prompt="A blue cat, intelligent, reading a book in a library, illustration", size="1024x1024", n=1, ) print(resp.data[0].url) # public URL or b64_json ``` ## Parameters | Param | Meaning | Valid values | |---|---|---| | `prompt` | What you want | Be descriptive — not "cat" but "blue domestic cat sitting on a windowsill, oil painting style" | | `size` | Output size | `256x256`, `512x512`, `1024x1024` | | `n` | How many images | 1–4 (1 recommended for spook-generate) | | `quality` | Quality tier | `standard` / `hd` (OpenAI side) | | `response_format` | Result shape | `url` (default) / `b64_json` | ## Prompt tips * **Order matters**: subject → style → lighting → angle → composition. Example: "red sports car, photorealistic, sunset lighting, low angle, cinematic composition". * **Negative prompts**: spook-generate accepts `, --no ` at the end of `prompt` (some SDXL builds). * **Style refs**: "Studio Ghibli style", "oil painting", "watercolor", "low-poly 3D render". ## Troubleshooting * **Blurry output** → prompt too short. Aim for 15–20 descriptive words minimum. * **Wrong object count** → SDXL doesn't reliably "count"; describe each element separately rather than relying on numbers. * **Refused (NSFW filter)** → spook-generate may reject explicit prompts; rephrase. Next: [Background removal](/en/capabilities/background-removal) · [VQA](/en/capabilities/vision-vqa) --- --- url: 'https://docs.qevron.ai/api/images.md' --- # Images Metinden görsel üretimi ve görsel düzenleme (örn. arka plan temizleme) için iki uç nokta vardır. ## Görsel üretimi Bir metin açıklamasından (`prompt`) görsel üretir. ### İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Görsel modeli (örn. `spook-generate`) | | `prompt` | string | ✓ | Üretilecek görselin açıklaması | | `n` | integer | | Üretilecek görsel sayısı | | `size` | string | | `1024x1024` gibi | | `quality` | string | | `standard` / `hd` | | `response_format` | string | | `url` veya `b64_json` | | `output_format` | string | | `png`, `jpeg`, `webp` | ### Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "Dağların ardında gün batımı, sulu boya tarzı", "n": 1, "size": "1024x1024", "response_format": "b64_json" }' ``` ```python [Python] resp = client.images.generate( model="spook-generate", prompt="Dağların ardında gün batımı, sulu boya tarzı", n=1, size="1024x1024", response_format="b64_json", ) b64 = resp.data[0].b64_json ``` ```javascript [JavaScript] const resp = await client.images.generate({ model: "spook-generate", prompt: "Dağların ardında gün batımı, sulu boya tarzı", n: 1, size: "1024x1024", response_format: "b64_json", }); const b64 = resp.data[0].b64_json; ``` ::: ### Yanıt ```json { "created": 1716200000, "data": [ { "b64_json": "iVBORw0KGgoAAAANS..." } ] } ``` `response_format` `url` ise `data[].url`, `b64_json` ise `data[].b64_json` döner. ## Görsel düzenleme Bir görseli yükleyip düzenler. Örneğin `spook-background` modeli görselin **arka planını siler**. Bu uç nokta `multipart/form-data` kullanır. ### Form alanları | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Düzenleme modeli (örn. `spook-background`) | | `image` | dosya | ✓ | Düzenlenecek görsel | | `prompt` | string | | Düzenleme talimatı (arka plan temizlemede yok sayılır) | | `n` | integer | | Çıktı sayısı | | `response_format` | string | | `b64_json` | ### Örnek ```bash curl https://app.qevron.ai/v1/images/edits \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=spook-background" \ -F "image=@photo.jpg" \ -F "n=1" \ -F "response_format=b64_json" ``` ::: tip `spook-background` arka plan temizleme yapar ve `prompt` gerektirmez; gönderseniz bile yok sayılır. Şeffaf PNG döner. ::: --- --- url: 'https://docs.qevron.ai/en/api/images.md' --- # Images There are two endpoints: text-to-image generation and image editing (e.g. background removal). ## Image generation Generates an image from a text description (`prompt`). ### Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Image model (e.g. `spook-generate`) | | `prompt` | string | ✓ | Description of the image to generate | | `n` | integer | | Number of images to generate | | `size` | string | | Like `1024x1024` | | `quality` | string | | `standard` / `hd` | | `response_format` | string | | `url` or `b64_json` | | `output_format` | string | | `png`, `jpeg`, `webp` | ### Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "Sunset behind mountains, watercolor style", "n": 1, "size": "1024x1024", "response_format": "b64_json" }' ``` ```python [Python] resp = client.images.generate( model="spook-generate", prompt="Sunset behind mountains, watercolor style", n=1, size="1024x1024", response_format="b64_json", ) b64 = resp.data[0].b64_json ``` ```javascript [JavaScript] const resp = await client.images.generate({ model: "spook-generate", prompt: "Sunset behind mountains, watercolor style", n: 1, size: "1024x1024", response_format: "b64_json", }); const b64 = resp.data[0].b64_json; ``` ::: ### Response ```json { "created": 1716200000, "data": [ { "b64_json": "iVBORw0KGgoAAAANS..." } ] } ``` If `response_format` is `url`, `data[].url` is returned; if `b64_json`, `data[].b64_json`. ## Image editing Uploads and edits an image. For example, the `spook-background` model **removes the background** of the image. This endpoint uses `multipart/form-data`. ### Form fields | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Edit model (e.g. `spook-background`) | | `image` | file | ✓ | Image to edit | | `prompt` | string | | Edit instruction (ignored for background removal) | | `n` | integer | | Number of outputs | | `response_format` | string | | `b64_json` | ### Example ```bash curl https://app.qevron.ai/v1/images/edits \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=spook-background" \ -F "image=@photo.jpg" \ -F "n=1" \ -F "response_format=b64_json" ``` ::: tip `spook-background` removes the background and requires no `prompt`; even if you send one it is ignored. It returns a transparent PNG. ::: --- --- url: 'https://docs.qevron.ai/en/getting-started/integration.md' --- # Integration Guide This guide integrates Qevron into your application **from scratch, step by step**: from setup to your first call, then to a production-ready configuration. You can follow it without skipping any step. ## Prerequisites Before you start, you should have: | Requirement | Description | |---|---| | **Qevron API key** | A key starting with `sk-`. If you don't have one, create it from [Authentication](/en/getting-started/authentication). | | **A programming language** | This guide has Python and JavaScript examples. You can also follow along language-agnostically with curl. | | **Basic terminal knowledge** | Running commands, setting environment variables. | The base URL is the same in every example: **`https://app.qevron.ai/v1`** *** ## Step 1 — Get and store the key securely An API key is like a password. **Never** put it in source code; store it in an **environment variable**. ::: code-group ```bash [macOS / Linux] export QEVRON_API_KEY="sk-..." ``` ```powershell [Windows (PowerShell)] $Env:QEVRON_API_KEY = "sk-..." ``` ```bash [.env file] # .env (add this file to .gitignore!) QEVRON_API_KEY=sk-... ``` ::: ::: warning Don't put the key on the **client side** (browser/mobile app) — anyone can read it. Always proxy requests through your own server (see [Step 7](#step-7-production-checklist)). ::: *** ## Step 2 — Install the SDK Because Qevron is OpenAI-compatible, you use the official `openai` SDK. ::: code-group ```bash [Python] pip install openai ``` ```bash [JavaScript] npm install openai ``` ::: If you use curl, no installation is needed. *** ## Step 3 — Configure the client The only difference is `base_url`: point it at Qevron instead of OpenAI. ::: code-group ```python [Python] import os from openai import OpenAI client = OpenAI( api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) ``` ```javascript [JavaScript] import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_API_KEY, baseURL: "https://app.qevron.ai/v1", }); ``` ::: *** ## Step 4 — First call and reading the response ::: code-group ```python [Python] resp = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Hello! Introduce yourself in one sentence."}], ) print(resp.choices[0].message.content) # reply text print(resp.usage.total_tokens) # tokens spent ``` ```javascript [JavaScript] const resp = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Hello! Introduce yourself in one sentence." }], }); console.log(resp.choices[0].message.content); console.log(resp.usage.total_tokens); ``` ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"verinova","messages":[{"role":"user","content":"Hello!"}]}' ``` ::: The reply text is in `choices[0].message.content`, usage info is in `usage`. To see which models are available, use [`/v1/models`](/en/api/models). *** ## Step 5 — Add streaming For chat UIs, show the response word by word: ::: code-group ```python [Python] stream = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Explain RAG in three bullet points."}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ```javascript [JavaScript] const stream = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Explain RAG in three bullet points." }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0].delta.content ?? ""); } ``` ::: Details: [Streaming](/en/concepts/streaming). *** ## Step 6 — Error handling and retries Qevron does **automatic failover** at the channel level (if one provider goes down it switches to another). Still, it's good practice to retry transient errors (`429`, `5xx`) on the client side with exponential backoff. ```python import time from openai import OpenAI, APIStatusError, APIConnectionError client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") def chat_with_retry(messages, model="verinova", max_retries=4): for attempt in range(max_retries): try: return client.chat.completions.create(model=model, messages=messages) except APIStatusError as e: # 429 (rate limit) and 5xx are retryable; 4xx (e.g. 401/404) are not if e.status_code in (429, 500, 502, 503) and attempt < max_retries - 1: time.sleep(2 ** attempt) # 1s, 2s, 4s, 8s continue raise except APIConnectionError: if attempt < max_retries - 1: time.sleep(2 ** attempt) continue raise print(chat_with_retry([{"role": "user", "content": "hi"}]).choices[0].message.content) ``` Full list of error codes: [Errors](/en/api/errors). *** ## Step 7 — Production checklist Before going live: * \[ ] **Keep the key on the server.** Don't call directly from browser/mobile; proxy the request through your own backend. * \[ ] **Secret management.** Store the key in an environment variable / secret manager, never commit it. * \[ ] **Make model selection dynamic.** Instead of hardcoding model names, verify available ones with [`/v1/models`](/en/api/models). * \[ ] **Monitor rate limits.** Track the `X-RateLimit-*` values in response headers and slow down if needed (see [API Keys & Quota](/en/concepts/api-keys-and-quota)). * \[ ] **Add retry** logic ([Step 6](#step-6-error-handling-and-retries)). * \[ ] **Track usage.** Monitor cost with the `usage` field in each response or the [billing endpoints](/en/api/billing). * \[ ] **Set timeouts.** Give a reasonable timeout for long requests (image/video). *** ## For AI agents and tools You can reach all of this documentation as **raw markdown, without rendering** — to feed it to an AI assistant or IDE: ```bash # A single page: append .md to the URL curl https://docs.qevron.ai/en/api/chat.md # All docs in one file curl https://docs.qevron.ai/llms-full.txt ``` Details: [API Overview — Raw markdown access](/en/api/overview#raw-markdown-access-no-rendering). *** ## Next steps --- --- url: 'https://docs.qevron.ai/getting-started/authentication.md' --- # Kimlik Doğrulama Qevron'a yapılan her istek bir **API anahtarı** ile doğrulanır. Bu sayfa anahtarın nasıl alınacağını ve gönderileceğini anlatır. ## API anahtarı nedir? API anahtarı, isteğin sizin adınıza yapıldığını kanıtlayan gizli bir metindir ve `sk-` ile başlar. Her anahtar bir **gruba** bağlıdır; grup, anahtarın hangi modellere erişebileceğini ve kotasını belirler (bkz. [API Anahtarları ve Kota](/concepts/api-keys-and-quota)). ## Anahtar oluşturma 1. Qevron **yönetim paneline** giriş yapın. 2. **Anahtarlar / Tokens** bölümüne gidin. 3. **Yeni anahtar oluştur** deyin; bir ad verin ve (varsa) erişebileceği model kümesi / grubu seçin. 4. Üretilen `sk-...` değerini **hemen kopyalayın** — anahtar yalnızca bir kez tam olarak gösterilir. 5. Anahtarı bir ortam değişkeninde saklayın (aşağıya bakın). ::: tip Farklı uygulamalar/ortamlar (geliştirme, üretim) için ayrı anahtarlar oluşturun. Böylece birini iptal etmek diğerlerini etkilemez. ::: ## Anahtarı ortam değişkeninde saklama ::: code-group ```bash [macOS / Linux] export QEVRON_API_KEY="sk-..." # kalıcı olması için ~/.bashrc veya ~/.zshrc dosyanıza ekleyin ``` ```powershell [Windows (PowerShell)] $Env:QEVRON_API_KEY = "sk-..." # kalıcı: [Environment]::SetEnvironmentVariable("QEVRON_API_KEY","sk-...","User") ``` ```bash [.env dosyası] # .env — bu dosyayı .gitignore'a EKLEYİN QEVRON_API_KEY=sk-... ``` ::: Kodda okuma: Python `os.environ["QEVRON_API_KEY"]`, Node.js `process.env.QEVRON_API_KEY`. ## Anahtarı gönderme Standart yöntem `Authorization` başlığında `Bearer` öneki ile göndermektir: ```bash Authorization: Bearer sk-aBcD1234... ``` Qevron, uyumluluk için birkaç alternatif başlığı da kabul eder: | Başlık | Biçim | Kullanım | |---|---|---| | `Authorization` | `Bearer sk-...` | **Önerilen.** OpenAI/Anthropic standardı. | | `Authorization` | `sk-...` | `Bearer` öneki olmadan da çalışır. | | `x-api-key` | `sk-...` | Anthropic SDK uyumluluğu. | | `x-goog-api-key` | `sk-...` | Google Gemini SDK uyumluluğu. | ::: tip Çoğu SDK (Python/JS `openai`, `anthropic`) doğru başlığı sizin için otomatik gönderir; yalnızca anahtarı ve `base_url`'i ayarlamanız yeterlidir. ::: ## Belirli bir sağlayıcıyı seçme (opsiyonel) Varsayılan olarak Qevron, istediğiniz model için en uygun kanalı kendisi seçer. Belirli bir kanalı zorlamak isterseniz `Qevron-Channel` başlığını ekleyin: ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Qevron-Channel: openai" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [{"role":"user","content":"selam"}] }' ``` Değer, kanalın adı veya sayısal kimliği olabilir. ## Yanıt başlıkları Başarılı isteklerde Qevron bazı bilgilendirici başlıklar döndürür: | Başlık | Anlamı | |---|---| | `Group` | İsteğin işlendiği grubun kimliği. | | `X-RateLimit-Limit-Requests` | Periyot başına izin verilen istek sayısı. | | `X-RateLimit-Remaining-Requests` | Kalan istek hakkı. | | `X-RateLimit-Reset-Requests` | Limitin sıfırlanacağı zaman (Unix). | | `X-RateLimit-Limit-Tokens` / `-Remaining-Tokens` / `-Reset-Tokens` | Token bazlı limitler. | ## Güvenlik ::: warning * Anahtarı **istemci tarafı** (tarayıcı, mobil uygulama) koduna gömmeyin — herkes görebilir. İstekleri kendi sunucunuz üzerinden geçirin. * Anahtarı ortam değişkeninde saklayın; depoya commit etmeyin. * Sızdığından şüphelenirseniz panelden anahtarı iptal edip yenisini oluşturun. ::: Geçersiz veya eksik anahtar `401 Unauthorized` döndürür. Ayrıntılar için [Hatalar](/api/errors) sayfasına bakın. --- --- url: 'https://docs.qevron.ai/guides/using-with-langchain.md' --- # LangChain ile Kullanım Qevron OpenAI uyumlu olduğu için, LangChain'in OpenAI bileşenlerini yalnızca `base_url`'i değiştirerek Qevron'a yönlendirebilirsiniz. ## Kurulum ```bash pip install langchain langchain-openai export QEVRON_API_KEY="sk-..." ``` ## Sohbet modeli ```python import os from langchain_openai import ChatOpenAI llm = ChatOpenAI( model="verinova", api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) print(llm.invoke("RAG nedir, bir cümleyle?").content) ``` ## Embeddings ```python from langchain_openai import OpenAIEmbeddings embeddings = OpenAIEmbeddings( model="veriEmbedding", api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) vec = embeddings.embed_query("Qevron bir AI gateway'idir.") print(len(vec)) ``` ## Zincir (chain) örneği ```python from langchain_core.prompts import ChatPromptTemplate prompt = ChatPromptTemplate.from_messages([ ("system", "Sen kısa yanıt veren bir asistansın."), ("user", "{soru}"), ]) chain = prompt | llm print(chain.invoke({"soru": "Embedding ne işe yarar?"}).content) ``` ## Diğer çerçeveler Aynı mantık `base_url`/`api_base` kabul eden tüm araçlarda geçerlidir: ```python # LlamaIndex from llama_index.llms.openai import OpenAI llm = OpenAI(model="verinova", api_base="https://app.qevron.ai/v1", api_key="sk-...") ``` ```javascript // Vercel AI SDK import { createOpenAI } from "@ai-sdk/openai"; const qevron = createOpenAI({ baseURL: "https://app.qevron.ai/v1", apiKey: process.env.QEVRON_API_KEY, }); ``` İlgili: [OpenAI Uyumluluğu](/getting-started/openai-compatibility). --- --- url: 'https://docs.qevron.ai/en/models.md' description: Full list and capability matrix of Qevron local models. --- # Local Models These are the models Qevron hosts on its own (self-hosted) infrastructure. All are reachable via the OpenAI-compatible API at `https://app.qevron.ai/v1`. | Model | Capability | Endpoint | Price (in/out, 1K) | |---|---|---|---| | [`blab-fast-en-emma`](/en/models/blab-fast-en-emma) | Text to Speech (TTS) | `POST /v1/audio/speech` | $0.001 | | [`blab-fast-tr-naz`](/en/models/blab-fast-tr-naz) | Text to Speech (TTS) | `POST /v1/audio/speech` | $0.001 | | [`blab-stable`](/en/models/blab-stable) | Text to Speech (TTS) | `POST /v1/audio/speech` | $0.001 | | [`blab-tts`](/en/models/blab-tts) | Text to Speech (TTS) | `POST /v1/audio/speech` | $0.005 | | [`solab-stt`](/en/models/solab-stt) | Speech to Text (STT) | `POST /v1/audio/transcriptions` | $0.003 | | [`spook-background`](/en/models/spook-background) | Background Removal | `POST /v1/vision/background (preferred) | POST /api/channel/:id/custom_test (legacy)` | — | | [`spook-detect`](/en/models/spook-detect) | Object Detection | `POST /v1/vision/detect (preferred) | POST /api/channel/:id/custom_test (legacy)` | — | | [`spook-generate`](/en/models/spook-generate) | Image Generation | `POST /v1/images/generations` | — | | [`spook-ocr`](/en/models/spook-ocr) | Optical Character Recognition | `POST /v1/vision/ocr (preferred) | POST /api/channel/:id/custom_test (legacy)` | — | | [`spook-vision`](/en/models/spook-vision) | Vision Question-Answering | `POST /v1/chat/completions (with image_url content)` | — | | [`veriEmbedding`](/en/models/veriEmbedding) | Embedding | `POST /v1/embeddings` | $0.00002 | | [`verinova-large`](/en/models/verinova-large) | Chat (LLM) | `POST /v1/chat/completions` | $0.0005 / $0.001 | | [`verinova-stable`](/en/models/verinova-stable) | Chat (LLM) | `POST /v1/chat/completions` | $0.0005 / $0.001 | | [`verirerag`](/en/models/verirerag) | Rerank | `POST /v1/rerank` | $0.00003 | > For external provider models (OpenAI, Anthropic, Gemini, ...): [External providers](/en/models/external-providers). --- --- url: 'https://docs.qevron.ai/en/guides/local-models-admin.md' --- # Local Models Administration Admin API endpoints for managing local model assignments (`cp_cluster_assignments`). The operator UI (`/cluster/assignments`) sits on top of these — but they're also reachable directly via curl / SDK. All endpoints require **admin authentication** (`Authorization: Bearer ` or JWT). Writes (POST/PUT/DELETE) reject the viewer role. ## Core concepts | Concept | Meaning | |---|---| | **Assignment** | A `(channel_id, model_name, node_id, gpu_index, runtime_key)` 5-tuple. Plans which model runs on which server. | | **Runtime** | A `cp_cluster_runtimes` record (e.g. `vllm`, `blab-tts`). Carries `requires_gpu` + `default_vram_gb` for tier + suggestion behaviour. | | **Node** | A `cp_cluster_nodes` record. Runs qevron-agent at `agent_endpoint`; pipes telemetry to qevron via SSH or agent collector. | | **Deploy** | Actually install the assignment on a node (write systemd unit + enable). | | **Move** | Atomically relocate an assignment from one node to another (5-step pipeline). | ## Move — relocate an assignment Atomic 5-step pipeline: **deploy\_target → wait\_target\_health → stop\_source → undeploy\_source → update\_assignment**. Step 3/4 failures roll back the target and (if source was active) restart it. Step 5 (DB write) failure cleans up the target. ::: code-group ```bash [curl] curl -X POST https://app.qevron.ai/api/cluster/assignments/42/move \ -H "Authorization: Bearer $ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "target_node_id": 2, "target_gpu_index": 0, "target_channel_id": 7, "start_after_move": true }' ``` ::: ### Request body | Field | Type | Notes | |---|---|---| | `target_node_id` | int | Required. Target server ID. Cannot equal the source. | | `target_gpu_index` | int? | Optional. If absent, the source GPU index is kept. | | `start_after_move` | bool? | Optional (default `true`). When `false`, the handler does not wait for `active=active` on the target before stopping the source. | | `target_channel_id` | int? | Optional. Promotes / rebinds the routing channel. If absent, the channel is preserved. | ### Pre-flight validation errors | HTTP | `data.reason` | Meaning | |---|---|---| | 400 | — | Target equals source / target node not found | | 422 | `over_subscribed_target` | Target GPU's VRAM reservation sum exceeds capacity (`data.target_gpu_index` returned) | | 422 | `tier_mismatch` | Runtime is `requires_gpu=true` but target node has zero GPUs (`data.target_gpus: 0`) | | 400 | `channel_not_found` | `target_channel_id` does not exist | | 400 | `channel_disabled` | Target channel is disabled | | 422 | `channel_model_drift` | Target channel's `models[]` does not list the assignment's `model_name` (`data.target_channel_models` returned) | ### Response — `final_state` enum | Value | Meaning | |---|---| | `moved` | All 5 steps clean. Binding updated. | | `failed` | Step 1 or 2 failed. Source untouched. | | `failed_rolled_back` | Step 3 or step-5 DB write failed; target cleanly rolled back. | | `failed_rolled_back_source_restarted` | Step 4 failed; target rolled back, source restarted to prior state. | | `failed_rollback_dirty` | Forward step failed AND rollback also failed. Manual inspection required on both nodes. | The response also carries `steps[]` with per-step `ok` + `ms` + `active` (when relevant) detail. ## Bulk Move — relocate multiple assignments at once Move N assignments to the same target node in one request. Backend runs them sequentially — one failed id never aborts the rest. ::: code-group ```bash [curl] curl -X POST https://app.qevron.ai/api/cluster/assignments/bulk-move \ -H "Authorization: Bearer $ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "assignment_ids": [42, 43, 44], "target_node_id": 2, "target_gpu_index": 0, "start_after_move": false }' ``` ::: Response: ```json { "data": { "total": 3, "moved_count": 2, "failed_count": 1, "items": [ { "id": 42, "ok": true, "response": { "final_state": "moved", "from_node": "SRV-1", "to_node": "SRV-2", "steps": [...] } }, { "id": 43, "ok": false, "response": { "final_state": "failed_rolled_back", ... } }, { "id": 44, "ok": false, "error": { "status": 422, "message": "blab-tts requires a GPU; SRV-3 has none", "details": { "reason": "tier_mismatch", ... } } } ] }, "success": true } ``` Limit: `assignment_ids` between 1 and 50. ## Control — start / stop / restart Manage an assignment's systemd unit. ::: code-group ```bash [curl] curl -X POST "https://app.qevron.ai/api/cluster/assignments/42/control?action=restart" \ -H "Authorization: Bearer $ADMIN_KEY" ``` ::: `action` ∈ `{start, stop, restart}`. If the assignment is not deployed, the pre-flight returns **422**: ```json { "success": false, "message": "solab-stt is not deployed on SRV-4. Click Deploy first.", "data": { "action": "stop", "unit": "solab-stt", "node": "SRV-4", "reason": "unit_not_deployed" } } ``` ## Deploy / Undeploy Install (write systemd unit + enable + optional start) or remove the runtime on the assignment's node. ::: code-group ```bash [Deploy] curl -X POST "https://app.qevron.ai/api/cluster/assignments/42/deploy?start_now=1&enable_now=1" \ -H "Authorization: Bearer $ADMIN_KEY" ``` ```bash [Undeploy] curl -X DELETE "https://app.qevron.ai/api/cluster/assignments/42/deploy" \ -H "Authorization: Bearer $ADMIN_KEY" ``` ::: The response mirrors the agent's `/v1/services//install` (or `DELETE`) result: `{installed, enabled, started, unit, ...}`. On failure, 502 + `data.raw_error` plus a structured translation (`exit status 5` → "systemd unit not found", `exit status 4` → "unit failed to load", etc.). ## Logs — snapshot and live stream ### Snapshot (last N lines) ```bash curl -G "https://app.qevron.ai/api/cluster/assignments/42/logs" \ -H "Authorization: Bearer $ADMIN_KEY" \ --data-urlencode tail=100 ``` ### Live stream (SSE) Two steps: mint a ticket, then open the EventSource. Tickets are single-use, 60-second TTL, Redis-backed. The long-lived JWT never enters the URL. ::: code-group ```bash [1. mint ticket] TICKET=$(curl -sS -X POST \ -H "Authorization: Bearer $ADMIN_KEY" \ "https://app.qevron.ai/api/cluster/assignments/42/logs/ticket" \ | jq -r '.data.ticket') ``` ```bash [2. open stream] curl -N "https://app.qevron.ai/api/cluster/assignments/42/logs/stream?tail=10&ticket=$TICKET" ``` ```javascript [browser] // fetch ticket via standard axios (header auth) const t = await api.post(`/cluster/assignments/${id}/logs/ticket`) const es = new EventSource(`/api/cluster/assignments/${id}/logs/stream?ticket=${t.ticket}`) es.onmessage = (ev) => console.log(ev.data) es.addEventListener('end', (ev) => console.log('stream ended:', ev.data)) ``` ::: Response is `text/event-stream` — each line emitted as `data: \n\n`. A `: keepalive` comment frame goes out every 25 seconds so reverse-proxy idle timeouts don't drop the connection. Client disconnect kills the server-side `journalctl -f` child. ## Service status Live systemd state (`active`, `enabled`, `sub_state`, `active_enter_timestamp`, `main_pid`). ```bash curl -H "Authorization: Bearer $ADMIN_KEY" \ "https://app.qevron.ai/api/cluster/assignments/42/service-status" ``` ```json { "data": { "unit": "vllm", "active": "active", "enabled": "enabled", "sub_state": "running", "main_pid": 12345, "active_enter_timestamp": "2026-05-27T14:30:00Z" }, "success": true } ``` ## Runtime — tier flag and VRAM suggestion `cp_cluster_runtimes` records carry two optional fields: | Field | Behaviour | |---|---| | `requires_gpu` | When `true`, assignments cannot be placed on CPU-only nodes (Create/Update/Move return 422 with `reason: tier_mismatch`). UI hides CPU-only servers from selectors. | | `default_vram_gb` | Auto-suggested reservation in the assignment form (the "Reserve VRAM" input pre-fills). `0` = no suggestion. | Seed defaults: `vllm=24`, `blab-tts=4`, `blab-fast=2`, `blab-stable=2`, `solab-stt=4`, `spook-vision=3` (all `requires_gpu=true`). Toggle via the operator UI. ## Agent push When adding a new node or refreshing the agent binary: ```bash curl -X POST "https://app.qevron.ai/api/cluster/nodes/2/agent/install" \ -H "Authorization: Bearer $ADMIN_KEY" ``` SSH into the node, push the binary, write the systemd unit, restart, probe `/v1/health`. Response carries `stdout_tail` with the install log. ## Failure modes — friendly message examples Earlier versions surfaced raw JSON like `agent HTTP 502: {"error":"exit status 5"}`. v2.10+ wraps failures in a structured envelope: | Scenario | HTTP | `message` | |---|---|---| | Stop on an undeployed unit | 422 | `solab-stt is not deployed on SRV-4. Click Deploy first.` | | GPU-required runtime on a CPU-only node | 422 | `blab-tts requires a GPU; SRV-3 has none` | | Channel.models drift on Move | 422 | `target channel "prod-chat" does not list model "verinova"; add the model to the channel first` | | Agent unreachable | 502 | `agent on SRV-1 is unreachable` | | Agent unit absent (systemctl exit 5) | 502 | `systemd unit not found on target server` | Every error carries structured detail in `data` (`action`, `unit`, `node`, `reason`, `raw_error` …) so UIs can render `Cannot on : ` instead of parsing the message string. ## Related pages * [Local Models Catalogue](/en/guides/local-models) — model inventory + base URL info * [Errors](/en/api/errors) — general API error envelope --- --- url: 'https://docs.qevron.ai/en/guides/local-models.md' --- # Local Models Catalogue Qevron serves **our own models** — running on our own GPU servers — through the same OpenAI-compatible interface as third-party providers (OpenAI / Anthropic / Gemini). For the client, the only thing that changes is the `"model"` field in the request body. This page lists every locally-hosted model that's online right now, what it does, and **how to call it** — all in one table. ## Quick table | Model name | Type | Notes | Endpoint (via qevron) | |---|---|---|---| | `verinova` | chat | gpt-oss-20b Q8 — **reasoning OFF**, fast for telephony | `POST /v1/chat/completions` | | `verinova-large` | chat | Qwen3-30B-A3B-Instruct (Q8 MoE) — **reasoning ON**, rich/detailed answers | `POST /v1/chat/completions` | | `veriEmbedding` | embedding | Multilingual embeddings (vLLM) | `POST /v1/embeddings` | | `verirerag` | rerank | TEI cross-encoder; reorders search results | `POST /v1/rerank` | | `solab-stt` | stt | Whisper TR/EN — speech-to-text | `POST /v1/audio/transcriptions` | | `blab-tts` | tts | Piper TTS (CPU) — good for short clips | `POST /v1/audio/speech` | | `blab-fast-tr-naz` | tts | Piper GPU — Turkish Naz voice | `POST /v1/audio/speech` | | `blab-fast-en-emma` | tts | Piper GPU — English Emma voice | `POST /v1/audio/speech` | | `blab-stable` | tts | Supertonic v3 — high quality, natural tone | `POST /v1/audio/speech` | | `spook-vision` | vision | Image understanding / VQA | `POST /v1/chat/completions` (image input) | | `spook-detect` | detect | Object detection — bbox list | `POST /api/channel/:id/custom_test` | | `spook-background` | image | Background removal / replacement | `POST /api/channel/:id/custom_test` | | `spook-ocr` | ocr | Extract text from images | `POST /api/channel/:id/custom_test` | | `spook-generate` | image | Text-to-image generation | `POST /v1/images/generations` | ::: tip Important **You don't need to know which server or port a model runs on.** All requests go through the Qevron gateway (`http://localhost:3001` internally, `https://app.qevron.ai` externally). Qevron looks at the model name and routes to the right backend channel. If a server is moved, added or removed, your code doesn't change. ::: ## Connection basics Two environments, two base URLs: | From where? | Base URL | API key | |---|---|---| | Same-host services (calleague-platform, callekit-agents, …) | `http://localhost:3001` | `QEVRON_API_KEY` (= qevron's `ADMIN_KEY`) | | External / SaaS clients, browser SDKs | `https://app.qevron.ai` | The user's own `sk-...` key | Auth is the same in both cases: ``` Authorization: Bearer ``` ### Why a single model might live in two channels (the verinova case) Sometimes you want **two configurations** of the same model. Example: * **`verinova`** → fast, short answers for the CalleKit telephony agent (reasoning off). This channel runs on port **8903** — channel #9. * **`verinova-large`** → detailed, "thinking" answers for the docs / chatbot side (reasoning on). This is actually a different model (Qwen3 30B), channel #143, port **8907**. The caller picks the behavior by picking the **model name**. There is **no need to add the same model as a second channel** — that just causes confusion, and Qevron's distributor will pick one of them at random, making results unstable. ::: warning Common mistake If you add a **second** channel with model name `verinova` and base URL `:8900`, requests will be refused. Port 8900 belongs to `vllm` / `veriEmbedding` — there is no llama-server there. **`verinova` is already defined as channel #9**, you don't need a second one. ::: ## Chat — `verinova` / `verinova-large` ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ {"role": "system", "content": "Be concise."}, {"role": "user", "content": "What is 1 + 1?"} ] }' ``` ### Python (openai SDK) ```python from openai import OpenAI client = OpenAI( api_key="sk-...", base_url="https://app.qevron.ai/v1", ) # Fast (telephony, short chat) fast = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Write me a limerick"}], ) # Detailed / "thinking" (reports, analysis) deep = client.chat.completions.create( model="verinova-large", messages=[{"role": "user", "content": "Draft a PRD for a SaaS product"}], ) ``` ### Streaming Add `"stream": true` — the server sends Server-Sent Events with partial chunks: ```python for chunk in client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "..."}], stream=True, ): print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ## Embedding — `veriEmbedding` ```bash curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "veriEmbedding", "input": ["merhaba dünya", "hello world"]}' ``` ```python emb = client.embeddings.create( model="veriEmbedding", input=["merhaba dünya", "hello world"], ) vectors = [item.embedding for item in emb.data] ``` ## Rerank — `verirerag` ```bash curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "what is qevron", "documents": ["Qevron is an AI gateway.", "The weather is nice today.", "Channels follow the OpenAI schema."] }' ``` The response returns indices into the `documents` array you sent, **sorted by relevance** (`results[].index` + `relevance_score`). ## STT (speech-to-text) — `solab-stt` ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer sk-..." \ -F "model=solab-stt" \ -F "file=@/path/to/audio.wav" \ -F "language=tr" ``` ::: tip Language hint The `language` parameter is optional but recommended — it prevents Whisper from drifting to the wrong language. Use `tr` for Turkish, `en` for English. ::: ## TTS (text-to-speech) — `blab-*` Same endpoint, three quality/voice options: ```bash # Fast, CPU, short clips (notification, IVR menu) curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -d '{"model": "blab-tts", "input": "Hello", "voice": "en"}' \ -o out.wav # GPU, Naz voice (Turkish) curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -d '{"model": "blab-fast-tr-naz", "input": "Tanıştığımıza memnun oldum"}' \ -o naz.wav # Highest quality, natural tone (long-form, product demo) curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -d '{"model": "blab-stable", "input": "Qevron serves your own models through one API."}' \ -o stable.wav ``` Which one should I pick? * **`blab-tts`** — latency-critical, content is short (notification, IVR). * **`blab-fast-*`** — real-time phone conversation; fixed voice character (Naz/Emma). * **`blab-stable`** — when quality matters (training video, product launch, podcast prototype). ## Vision — `spook-vision` Uses OpenAI's image-input format. Accepts URL or base64 data URLs. ```python resp = client.chat.completions.create( model="spook-vision", messages=[{ "role": "user", "content": [ {"type": "text", "text": "What's in this image?"}, {"type": "image_url", "image_url": {"url": "https://.../photo.jpg"}}, ], }], ) ``` ## Image generation — `spook-generate` ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "Bosphorus at sunset, cinematic lighting", "size": "1024x1024" }' ``` ## Utility models — `spook-detect / -ocr / -background` These three don't fit the pure OpenAI schema, so they're called via the admin **custom\_test** endpoint: ```bash curl https://app.qevron.ai/api/channel/85/custom_test \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "spook-detect", "image": "data:image/jpeg;base64,..."}' ``` Channel IDs: spook-detect=85, spook-background=86, spook-ocr=87. (You can also try them interactively from the **Channels** page in the admin UI via the "Test" button.) ## Calleague-platform side Calleague projects connect to Qevron through two ENV vars: ```bash # .env QEVRON_URL=http://localhost:3001 # If you're on the same host QEVRON_API_KEY= # qevron's .env ADMIN_KEY ``` In Pro / Plus flows, the `[...path].ts` self-host handler reads these and points the OpenAI SDK at Qevron — you only need to change the model name in code. For callekit-agents: ```bash QEVRON_INTERNAL_URL=http://localhost:3001 QEVRON_API_KEY= ``` ## Troubleshooting ### "connection refused" In 99% of cases the **base URL is pointing at the wrong port**. The correct port is already wired up on the qevron side — you should not be setting ports manually. In the Qevron admin SPA: 1. Go to **/channel** 2. Find the model 3. Hit the "Test" button — a 200 OK means the endpoint is healthy If it still fails, look at **/cluster/assignments** and check the **Actual** column for that runtime: * `active` → the service is running; the problem is elsewhere (channel base\_url, network, …) * `inactive` / `failed` → the service is down; use **Start** on the right ### Response is too slow * Are you streaming? (`"stream": true`) * `verinova-large` is naturally ~3-5× slower than `verinova` (30B vs 20B + reasoning on). * Cap output for long contexts; `max_tokens: 256-512` is a sane ceiling for `verinova`. ### "model not found" The `"model"` value in the request body must match the table above. Typical mistakes: `Verinova` (capitalized), `verinova_large` (underscore instead of dash), the old name `gpt-oss-20b`. Live list of valid models: ```bash curl https://app.qevron.ai/v1/models -H "Authorization: Bearer sk-..." ``` ## See also * [API Overview](/en/api/overview) — full reference for every endpoint * [Authentication](/en/getting-started/authentication) — key generation and quotas * [First Chatbot](/en/guides/first-chatbot) — end-to-end example * [RAG: Embedding + Rerank](/en/guides/rag-embeddings) — `veriEmbedding` + `verirerag` together --- --- url: 'https://docs.qevron.ai/guides/local-models-admin.md' --- # Local Models Yönetim Yerel model atamalarını (`cp_cluster_assignments`) yönetmek için kullanılan admin API'leri. Operatör UI'sının (`/cluster/assignments`) altında bu uç noktalar çalışır — ama doğrudan curl / SDK ile de erişilebilir. Tüm uç noktalar **admin yetkisi** gerektirir (`Authorization: Bearer ` ya da JWT). Yazma işlemleri (POST/PUT/DELETE) viewer rolünü reddeder. ## Temel kavramlar | Kavram | Anlamı | |---|---| | **Assignment** | `(channel_id, model_name, node_id, gpu_index, runtime_key)` beşlisi. Hangi modelin hangi sunucuda çalışacağını planlar. | | **Runtime** | `cp_cluster_runtimes` kaydı (örn. `vllm`, `blab-tts`). `requires_gpu` ve `default_vram_gb` tier + öneri davranışı. | | **Node** | `cp_cluster_nodes` kaydı. `agent_endpoint` ile qevron-agent çalıştırır; SSH veya agent collector ile telemetriyi qevron'a iletir. | | **Deploy** | Atamayı node'a fiilen kurmak (systemd unit yaz + enable). | | **Move** | Atamayı bir node'dan diğerine aktarmak (5-step atomik akış). | ## Move — atama taşıma Atomik 5 adım: **deploy\_target → wait\_target\_health → stop\_source → undeploy\_source → update\_assignment**. Adım 3/4 başarısız olursa target rollback edilir, source (varsa) eski durumuna döndürülür. Adım 5 (DB write) başarısız olursa target temizlenir. ::: code-group ```bash [curl] curl -X POST https://app.qevron.ai/api/cluster/assignments/42/move \ -H "Authorization: Bearer $ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "target_node_id": 2, "target_gpu_index": 0, "target_channel_id": 7, "start_after_move": true }' ``` ::: ### İstek alanları | Alan | Tip | Açıklama | |---|---|---| | `target_node_id` | int | Zorunlu. Hedef sunucu ID'si. Kaynakla aynı olamaz. | | `target_gpu_index` | int? | Opsiyonel. Belirsizse kaynak GPU index'i korunur. | | `start_after_move` | bool? | Opsiyonel (default `true`). `false` → hedefin `active=active` olmasını beklemez. | | `target_channel_id` | int? | Opsiyonel. Kanal değiştirme (promote/rebind). Yoksa kanal korunur. | ### Validasyon hataları (taşıma öncesi) | HTTP | `data.reason` | Açıklama | |---|---|---| | 400 | — | Target source ile aynı / target node yok | | 422 | `over_subscribed_target` | Target GPU'nun VRAM toplamı aşıyor (`data.target_gpu_index` döner) | | 422 | `tier_mismatch` | Runtime `requires_gpu=true` ama target node'da GPU yok (`data.target_gpus: 0`) | | 400 | `channel_not_found` | `target_channel_id` mevcut değil | | 400 | `channel_disabled` | Target kanal disabled durumda | | 422 | `channel_model_drift` | Target kanal `models[]` array'i `assignment.model_name`'i içermiyor (`data.target_channel_models` döner) | ### Yanıt — `final_state` enum'u | Değer | Anlamı | |---|---| | `moved` | Beş adım da temiz. Bağlama güncellendi. | | `failed` | Adım 1 veya 2 fail. Source dokunulmadı. | | `failed_rolled_back` | Adım 3 fail veya adım 5 DB write fail; target temiz şekilde geri alındı. | | `failed_rolled_back_source_restarted` | Adım 4 fail; target geri alındı, source önceden aktifse yeniden başlatıldı. | | `failed_rollback_dirty` | Bir adım fail VE rollback da fail. İki sunucuda manuel inceleme gerekir. | Yanıt gövdesi `steps[]` array'i ile her adımın `ok` + `ms` + `active` (varsa) detayını da içerir. ## Bulk Move — birden çok atamayı taşıma Aynı target node'a birden fazla atamayı tek istekle taşıma. Backend sıralı çalıştırır — bir başarısız id diğerlerini iptal etmez. ::: code-group ```bash [curl] curl -X POST https://app.qevron.ai/api/cluster/assignments/bulk-move \ -H "Authorization: Bearer $ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "assignment_ids": [42, 43, 44], "target_node_id": 2, "target_gpu_index": 0, "start_after_move": false }' ``` ::: Yanıt: ```json { "data": { "total": 3, "moved_count": 2, "failed_count": 1, "items": [ { "id": 42, "ok": true, "response": { "final_state": "moved", "from_node": "SRV-1", "to_node": "SRV-2", "steps": [...] } }, { "id": 43, "ok": false, "response": { "final_state": "failed_rolled_back", ... } }, { "id": 44, "ok": false, "error": { "status": 422, "message": "blab-tts requires a GPU; SRV-3 has none", "details": { "reason": "tier_mismatch", ... } } } ] }, "success": true } ``` Limit: `assignment_ids` 1–50 arası. ## Control — start / stop / restart Bir atamanın systemd unit'ini yönet. ::: code-group ```bash [curl] curl -X POST "https://app.qevron.ai/api/cluster/assignments/42/control?action=restart" \ -H "Authorization: Bearer $ADMIN_KEY" ``` ::: `action` ∈ `{start, stop, restart}`. Atama deploy edilmemişse pre-flight **422** döner: ```json { "success": false, "message": "solab-stt is not deployed on SRV-4. Click Deploy first.", "data": { "action": "stop", "unit": "solab-stt", "node": "SRV-4", "reason": "unit_not_deployed" } } ``` ## Deploy / Undeploy Runtime'ı node'a fiilen kur (systemd unit yaz + enable + opsiyonel start). ::: code-group ```bash [Deploy] curl -X POST "https://app.qevron.ai/api/cluster/assignments/42/deploy?start_now=1&enable_now=1" \ -H "Authorization: Bearer $ADMIN_KEY" ``` ```bash [Undeploy] curl -X DELETE "https://app.qevron.ai/api/cluster/assignments/42/deploy" \ -H "Authorization: Bearer $ADMIN_KEY" ``` ::: Yanıt agent'ın `/v1/services//install` (veya `DELETE`) çıktısını yansıtır: `{installed, enabled, started, unit, ...}`. Hatalarda 502 + `data.raw_error` (`exit status 5` → "systemd unit not found", `exit status 4` → "unit failed to load", vb. yapısal çeviri). ## Logs — anlık görüntü ve canlı akış ### Snapshot (son N satır) ```bash curl -G "https://app.qevron.ai/api/cluster/assignments/42/logs" \ -H "Authorization: Bearer $ADMIN_KEY" \ --data-urlencode tail=100 ``` ### Canlı akış (SSE) İki adım: önce ticket al, sonra EventSource ile aç. Ticket tek-kullanımlık, 60 saniye TTL, Redis backed. Uzun ömürlü JWT URL'ye düşmez. ::: code-group ```bash [1. ticket al] TICKET=$(curl -sS -X POST \ -H "Authorization: Bearer $ADMIN_KEY" \ "https://app.qevron.ai/api/cluster/assignments/42/logs/ticket" \ | jq -r '.data.ticket') ``` ```bash [2. stream'i aç] curl -N "https://app.qevron.ai/api/cluster/assignments/42/logs/stream?tail=10&ticket=$TICKET" ``` ```javascript [browser] // fetch ticket via standard axios (header auth) const t = await api.post(`/cluster/assignments/${id}/logs/ticket`) const es = new EventSource(`/api/cluster/assignments/${id}/logs/stream?ticket=${t.ticket}`) es.onmessage = (ev) => console.log(ev.data) es.addEventListener('end', (ev) => console.log('stream ended:', ev.data)) ``` ::: `text/event-stream` yanıt — her satır `data: \n\n`. Her 25 saniyede bir `: keepalive` comment frame (reverse-proxy idle timeout'ları için). Client disconnect → server-side `journalctl -f` kill. ## Service status Live systemd durumu (`active`, `enabled`, `sub_state`, `active_enter_timestamp`, `main_pid`). ```bash curl -H "Authorization: Bearer $ADMIN_KEY" \ "https://app.qevron.ai/api/cluster/assignments/42/service-status" ``` ```json { "data": { "unit": "vllm", "active": "active", "enabled": "enabled", "sub_state": "running", "main_pid": 12345, "active_enter_timestamp": "2026-05-27T14:30:00Z" }, "success": true } ``` ## Runtime — tier flag ve VRAM önerisi `cp_cluster_runtimes` kayıtları iki opsiyonel alan taşır: | Alan | Davranış | |---|---| | `requires_gpu` | `true` ise CPU-only node'lara atama yapılamaz (Create/Update/Move 422 `tier_mismatch` döner). UI'da CPU-only sunucular gizlenir. | | `default_vram_gb` | Atama formunda otomatik öneri (Reserve VRAM input'u dolar). 0 = öneri yok. | Seed default'ları: `vllm=24`, `blab-tts=4`, `blab-fast=2`, `blab-stable=2`, `solab-stt=4`, `spook-vision=3` (hepsi `requires_gpu=true`). Operator UI'dan toggle edilir. ## Agent push Yeni node ekleyince ya da agent binary'sini güncelleyince: ```bash curl -X POST "https://app.qevron.ai/api/cluster/nodes/2/agent/install" \ -H "Authorization: Bearer $ADMIN_KEY" ``` SSH ile binary push + systemd unit yaz + restart + `/v1/health` probe. Yanıt `stdout_tail` ile install log'unu döner. ## Hatalı durumlar — friendly mesaj örnekleri Önceki sürümlerde operatör `agent HTTP 502: {"error":"exit status 5"}` gibi raw JSON görürdü. v2.10+ structured envelope ile: | Senaryo | HTTP | `message` | |---|---|---| | Undeployed unit'e stop | 422 | `solab-stt is not deployed on SRV-4. Click Deploy first.` | | GPU-required runtime CPU-only node'a | 422 | `blab-tts requires a GPU; SRV-3 has none` | | Channel.models drift | 422 | `target channel "prod-chat" does not list model "verinova"; add the model to the channel first` | | Agent unreachable | 502 | `agent on SRV-1 is unreachable` | | Agent unit eksik (systemctl exit 5) | 502 | `systemd unit not found on target server` | Her birinde `data` field'ı structured detay taşır (`action`, `unit`, `node`, `reason`, `raw_error` …) — UI'lar `Cannot on : ` cümle haline çevirir. ## İlgili sayfalar * [Yerel Modeller Kataloğu](/guides/local-models) — model envanteri + base URL bilgisi * [Hata yönetimi](/api/errors) — genel API hata yapısı --- --- url: 'https://docs.qevron.ai/en/guides/mcp.md' --- # MCP / SSE **MCP** (Model Context Protocol) is a protocol that lets AI models access tools and data sources in a standard way. Qevron exposes endpoints that MCP clients can connect to. ## Endpoints | Endpoint | Description | |---|---| | `/mcp` | MCP protocol endpoint | | `/sse` | Server-Sent Events connection (streaming communication) | | `/message` | Message-sending endpoint | These endpoints live under `https://app.qevron.ai`. ## What is SSE? SSE (Server-Sent Events) lets the server send a one-way, continuous data stream to the client. MCP uses this channel for tool calls and event notifications. For the general idea of streaming, see [Streaming](/en/concepts/streaming). ## When to use it * When the model needs to call **external tools** (file system, database, APIs). * When an MCP-compatible client (e.g. desktop AI apps) connects to Qevron. ## Connecting Point your MCP-compatible client at Qevron's `/sse` or `/mcp` endpoint as the server address, and authenticate with `Authorization: Bearer sk-...`. ::: tip MCP is an advanced topic for most users. For standard chat/embedding/image needs, the endpoints in the [API Reference](/en/api/overview) are sufficient. ::: --- --- url: 'https://docs.qevron.ai/guides/mcp.md' --- # MCP / SSE **MCP** (Model Context Protocol), yapay zeka modellerinin araçlara ve veri kaynaklarına standart bir biçimde erişmesini sağlayan bir protokoldür. Qevron, MCP istemcilerinin bağlanabileceği uç noktalar sunar. ## Uç noktalar | Uç nokta | Açıklama | |---|---| | `/mcp` | MCP protokol uç noktası | | `/sse` | Server-Sent Events bağlantısı (akışlı iletişim) | | `/message` | Mesaj gönderme uç noktası | Bu uç noktalar `https://app.qevron.ai` altındadır. ## SSE nedir? SSE (Server-Sent Events), sunucunun istemciye tek yönlü, sürekli veri akışı göndermesini sağlar. MCP, araç çağrıları ve olay bildirimleri için bu kanalı kullanır. Akışın genel mantığı için [Akış (Streaming)](/concepts/streaming) sayfasına bakın. ## Ne zaman kullanılır? * Modelin **dış araçları** (dosya sistemi, veritabanı, API'ler) çağırması gerektiğinde. * Bir MCP uyumlu istemci (örn. masaüstü AI uygulamaları) Qevron'a bağlanırken. ## Bağlanma MCP uyumlu bir istemciyi, sunucu adresi olarak Qevron'un `/sse` veya `/mcp` uç noktasına yönlendirin ve `Authorization: Bearer sk-...` ile kimlik doğrulayın. ::: tip MCP, çoğu kullanıcı için ileri düzey bir konudur. Standart sohbet/embedding/görsel ihtiyaçları için [API Referansı](/api/overview)ndaki uç noktalar yeterlidir. ::: --- --- url: 'https://docs.qevron.ai/capabilities/tts.md' --- # Metinden Sese (TTS) Bir metin alır, doğal sese çevirir. OpenAI `audio/speech` formatı. ## Mevcut modeller | Model | Kalite | Latans | Kullanım yeri | |---|---|---|---| | **`blab-stable`** *(önerilen)* | Yüksek | Orta | Eğitim videosu, ürün demo, podcast | | `blab-fast-tr-naz` | Orta | Düşük | Telefonda Türkçe (Naz sesi) | | `blab-fast-en-emma` | Orta | Düşük | Telefonda İngilizce (Emma sesi) | | `blab-tts` | Düşük | Çok düşük | Anlık bildirim, IVR menü | | `tts-1` | OpenAI tarafı | — | OpenAI anahtarı ekli channel'da | ## curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "blab-stable", "input": "Merhaba dünya", "voice": "tr"}' \ -o cikti.wav ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") resp = client.audio.speech.create( model="blab-stable", input="Qevron, kendi modellerinizi tek API ile sunar.", voice="tr", ) resp.stream_to_file("cikti.wav") ``` ## Hangi modeli ne zaman? * **`blab-stable`** — kalite öncelikli, telefon olmayan tüm yerler. ~600–900 ms gecikme, üst seviye doğal ton. * **`blab-fast-tr-naz` / `blab-fast-en-emma`** — gerçek zamanlı konuşma (telefon ajanı). ~80–150 ms gecikme, ses karakteri sabit (Naz Türkçe, Emma İngilizce). * **`blab-tts`** — anlık duyurular, IVR menü açılışları. CPU bazlı, GPU bekletmez. Kalite mütevazı ama latans neredeyse sıfır. ## voice parametresi * `blab-tts` için dil kodu: `tr` ya da `en` * `blab-fast-*` için zaten ses sabitlenmiştir (parametre yoksayılır) * `blab-stable` için `tr` / `en` (varsayılan `tr`) * OpenAI `tts-1` için: `alloy`, `echo`, `fable`, `onyx`, `nova`, `shimmer` ## Akış (streaming) ```python stream = client.audio.speech.create( model="blab-stable", input="Uzun bir metin...", voice="tr", stream=True, ) with open("cikti.wav", "wb") as f: for chunk in stream.iter_bytes(): f.write(chunk) ``` ::: tip Eski `stream_format` parametresi v2.2.0 öncesi OpenAI TTS API'sinin orijinal `stream_format: "sse"` parametresini açıkça vermek gerekiyordu. v2.2.0 ile qevron `stream: true` (SDK kullanımı) ⇒ `stream_format: "sse"` otomatik köprüleme yapıyor. Her ikisi de çalışır; `stream_format` daha açıkça verilirse onun kazanması esastır. ::: ## Sorun çözme * **Sessiz dosya çıkıyor** → `Content-Type: application/json` başlığını ekledin mi? Form-data yerine JSON gönder. * **Yanlış sesle çıkıyor** → `blab-fast-*` modellerinin ses karakteri sabit; ses değiştirmek için modeli değiştir (`blab-fast-tr-naz` yerine `blab-fast-en-emma`). * **MP3 mi WAV mı?** → Varsayılan WAV. `"response_format": "mp3"` ekleyerek MP3 alırsın. Devam: [Telefon ajanı](/concepts/how-it-works) · [STT — Sesten Metne](/capabilities/stt) --- --- url: 'https://docs.qevron.ai/guides/text-to-speech.md' --- # Metinden Sese (TTS) Bir metni doğal sesli bir konuşmaya çevirip ses dosyası olarak kaydedin. ## Temel kullanım ```python import os from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") resp = client.audio.speech.create( model="blab-tts", voice="naz", input="Merhaba! Bu ses Qevron üzerinden üretildi.", ) resp.stream_to_file("cikti.mp3") print("cikti.mp3 kaydedildi") ``` ## curl ile ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "blab-tts", "voice": "naz", "input": "Merhaba! Bu ses Qevron üzerinden üretildi.", "response_format": "mp3" }' --output cikti.mp3 ``` ## Ses ve format seçenekleri | Parametre | Değerler | Açıklama | |---|---|---| | `voice` | modele bağlı | Konuşmacı sesi | | `response_format` | `mp3`, `opus`, `aac`, `flac` | Çıktı ses formatı | | `speed` | 0.25–4.0 | Konuşma hızı | Bu kurulumdaki bazı TTS modelleri: `blab-tts`, `blab-fast-tr-naz` (Türkçe), `blab-fast-en-emma` (İngilizce). ## İpuçları * **Dile uygun model seçin**: Türkçe metin için Türkçe optimize edilmiş bir ses/model daha doğal sonuç verir. * **Uzun metinleri bölün**: Çok uzun metinleri cümle/paragraf bazında parçalayıp birleştirin. * **Akış**: Gerçek zamanlı oynatma için `stream_format` ile parça parça ses alabilirsiniz (bkz. [Audio API](/api/audio)). İlgili: [Audio API — TTS](/api/audio#metinden-sese-tts). --- --- url: 'https://docs.qevron.ai/concepts/models.md' --- # Modeller **Model**, istek attığınız yapay zekanın adıdır. İstek gövdesindeki `"model"` alanına bu adı yazarsınız. Qevron, model adına bakarak isteği doğru sağlayıcıya yönlendirir. ## Mevcut modelleri listeleme Hesabınızın erişebildiği modelleri görmek için: ```bash curl https://app.qevron.ai/v1/models \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Yanıt: ```json { "object": "list", "data": [ { "id": "verinova", "object": "model", "owned_by": "arpanet" }, { "id": "veriEmbedding", "object": "model", "owned_by": "arpanet" }, { "id": "verirerag", "object": "model", "owned_by": "arpanet" } ] } ``` Yalnızca anahtarınızın bağlı olduğu grubun erişebildiği modeller listelenir. ## Model türleri Her model bir yetenek türüne aittir. Doğru uç noktaya doğru türde model göndermelisiniz: | Tür | Ne yapar | Örnek uç nokta | |---|---|---| | **LLM (Sohbet)** | Metin üretir, soruları yanıtlar, araç çağırır, görsel anlar | [`/v1/chat/completions`](/api/chat) | | **Embedding** | Metni sayısal vektöre çevirir (arama, RAG) | [`/v1/embeddings`](/api/embeddings) | | **Rerank** | Doküman listesini alaka düzeyine göre sıralar | [`/v1/rerank`](/api/rerank) | | **Image** | Görsel üretir / düzenler | [`/v1/images/*`](/api/images) | | **TTS** | Metni sese çevirir | [`/v1/audio/speech`](/api/audio) | | **STT** | Sesi metne çevirir | [`/v1/audio/transcriptions`](/api/audio) | ## Örnek modeller Bu kurulumda mevcut bazı modeller ve türleri: | Model | Tür | Açıklama | |---|---|---| | `verinova` | LLM | Genel amaçlı sohbet ve metin üretimi | | `spook-vision` | LLM (görsel) | Görsel anlama / açıklama | | `spook-ocr` | LLM (görsel) | Görselden metin çıkarma (OCR) | | `spook-detect` | LLM (görsel) | Görselde nesne tespiti | | `veriEmbedding` | Embedding | Metin embedding üretimi | | `verirerag` | Rerank | Doküman yeniden sıralama | | `solab-stt` | STT | Sesten metne | | `blab-tts` | TTS | Metinden sese | | `spook-generate` | Image | Metinden görsel üretimi | | `spook-background` | Image (edit) | Görsel arka plan temizleme | ::: tip Kendi kurulumunuzdaki güncel listeyi her zaman `/v1/models` ile alın; modeller eklenip çıkarılabilir. ::: ## Tek bir model adını sorgulama ```bash curl https://app.qevron.ai/v1/models/verinova \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Ayrıntı: [Models API](/api/models). --- --- url: 'https://docs.qevron.ai/api/models.md' --- # Models Hesabınızın erişebildiği modelleri listeler ve tek bir modelin bilgisini döndürür. ## Model listesi ```bash curl https://app.qevron.ai/v1/models \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ```python models = client.models.list() for m in models.data: print(m.id) ``` ### Yanıt ```json { "object": "list", "data": [ { "id": "verinova", "object": "model", "created": 1716200000, "owned_by": "arpanet" }, { "id": "veriEmbedding", "object": "model", "created": 1716200000, "owned_by": "arpanet" }, { "id": "solab-stt", "object": "model", "created": 1716200000, "owned_by": "arpanet" } ] } ``` Yalnızca anahtarınızın bağlı olduğu grubun erişebildiği modeller listelenir. ## Tek model bilgisi ```bash curl https://app.qevron.ai/v1/models/verinova \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ### Yanıt ```json { "id": "verinova", "object": "model", "created": 1716200000, "owned_by": "arpanet" } ``` | Alan | Açıklama | |---|---| | `id` | Model adı (istek gövdesinde `"model"` olarak kullanılır) | | `owned_by` | Modelin sahibi/sağlayıcısı | | `created` | Oluşturulma zamanı (Unix) | ::: tip Model türlerini ve örnek model adlarını [Modeller (kavram)](/concepts/models) sayfasında bulabilirsiniz. ::: --- --- url: 'https://docs.qevron.ai/en/api/models.md' --- # Models Lists the models your account can access and returns info for a single model. ## List models ```bash curl https://app.qevron.ai/v1/models \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ```python models = client.models.list() for m in models.data: print(m.id) ``` ### Response ```json { "object": "list", "data": [ { "id": "verinova", "object": "model", "created": 1716200000, "owned_by": "arpanet" }, { "id": "veriEmbedding", "object": "model", "created": 1716200000, "owned_by": "arpanet" }, { "id": "solab-stt", "object": "model", "created": 1716200000, "owned_by": "arpanet" } ] } ``` Only models available to your key's group are listed. ## Single model info ```bash curl https://app.qevron.ai/v1/models/verinova \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ### Response ```json { "id": "verinova", "object": "model", "created": 1716200000, "owned_by": "arpanet" } ``` | Field | Description | |---|---| | `id` | Model name (used as `"model"` in the request body) | | `owned_by` | The model's owner/provider | | `created` | Creation time (Unix) | ::: tip Find model types and example model names on the [Models (concept)](/en/concepts/models) page. ::: --- --- url: 'https://docs.qevron.ai/en/concepts/models.md' --- # Models A **model** is the name of the AI you call. You put that name in the `"model"` field of the request body. Qevron looks at the model name to route the request to the right provider. ## Listing available models To see the models your account can access: ```bash curl https://app.qevron.ai/v1/models \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Response: ```json { "object": "list", "data": [ { "id": "verinova", "object": "model", "owned_by": "arpanet" }, { "id": "veriEmbedding", "object": "model", "owned_by": "arpanet" }, { "id": "verirerag", "object": "model", "owned_by": "arpanet" } ] } ``` Only models available to your key's group are listed. ## Model types Each model belongs to a capability type. You must send the right type of model to the right endpoint: | Type | What it does | Example endpoint | |---|---|---| | **LLM (Chat)** | Generates text, answers, calls tools, understands images | [`/v1/chat/completions`](/en/api/chat) | | **Embedding** | Turns text into a numeric vector (search, RAG) | [`/v1/embeddings`](/en/api/embeddings) | | **Rerank** | Sorts a document list by relevance | [`/v1/rerank`](/en/api/rerank) | | **Image** | Generates / edits images | [`/v1/images/*`](/en/api/images) | | **TTS** | Converts text to speech | [`/v1/audio/speech`](/en/api/audio) | | **STT** | Converts speech to text | [`/v1/audio/transcriptions`](/en/api/audio) | ## Example models Some models available in this deployment and their types: | Model | Type | Description | |---|---|---| | `verinova` | LLM | General-purpose chat and text generation | | `spook-vision` | LLM (vision) | Image understanding / captioning | | `spook-ocr` | LLM (vision) | Text extraction from images (OCR) | | `spook-detect` | LLM (vision) | Object detection in images | | `veriEmbedding` | Embedding | Text embedding generation | | `verirerag` | Rerank | Document reranking | | `solab-stt` | STT | Speech-to-text | | `blab-tts` | TTS | Text-to-speech | | `spook-generate` | Image | Text-to-image generation | | `spook-background` | Image (edit) | Background removal | ::: tip Always fetch the current list for your own deployment with `/v1/models`; models can be added or removed. ::: ## Querying a single model ```bash curl https://app.qevron.ai/v1/models/verinova \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Details: [Models API](/en/api/models). --- --- url: 'https://docs.qevron.ai/api/moderations.md' --- # Moderations Bir metnin zararlı/uygunsuz içerik barındırıp barındırmadığını sınıflandırır. Kullanıcı girdilerini filtrelemek için kullanışlıdır. ## İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Moderasyon modeli | | `input` | string | dizi | ✓ | Sınıflandırılacak metin | ## Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/moderations \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "text-moderation-latest", "input": "Sınıflandırılacak metin burada." }' ``` ```python [Python] resp = client.moderations.create( model="text-moderation-latest", input="Sınıflandırılacak metin burada.", ) print(resp.results[0].flagged) ``` ::: ## Yanıt Yanıt, sağlayıcıya göre değişebilir; OpenAI uyumlu biçimde tipik olarak şu yapıdadır: ```json { "id": "modr-...", "model": "text-moderation-latest", "results": [ { "flagged": false, "categories": { "hate": false, "violence": false, "...": false }, "category_scores": { "hate": 0.0001, "violence": 0.0002 } } ] } ``` | Alan | Açıklama | |---|---| | `results[].flagged` | İçerik işaretlendi mi (true/false) | | `results[].categories` | Kategori bazında ihlal var/yok | | `results[].category_scores` | Kategori bazında skorlar | ::: warning Moderasyon yanıt alanları kullanılan sağlayıcı modeline bağlıdır. Kendi modelinizin tam çıktısını test ederek doğrulayın. ::: --- --- url: 'https://docs.qevron.ai/en/api/moderations.md' --- # Moderations Classifies whether a piece of text contains harmful/inappropriate content. Useful for filtering user input. ## Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Moderation model | | `input` | string | array | ✓ | Text to classify | ## Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/moderations \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "text-moderation-latest", "input": "Text to classify goes here." }' ``` ```python [Python] resp = client.moderations.create( model="text-moderation-latest", input="Text to classify goes here.", ) print(resp.results[0].flagged) ``` ::: ## Response The response may vary by provider; in the OpenAI-compatible shape it typically looks like: ```json { "id": "modr-...", "model": "text-moderation-latest", "results": [ { "flagged": false, "categories": { "hate": false, "violence": false, "...": false }, "category_scores": { "hate": 0.0001, "violence": 0.0002 } } ] } ``` | Field | Description | |---|---| | `results[].flagged` | Whether the content was flagged (true/false) | | `results[].categories` | Violation per category | | `results[].category_scores` | Scores per category | ::: warning Moderation response fields depend on the provider model used. Verify your model's exact output by testing. ::: --- --- url: 'https://docs.qevron.ai/concepts/how-it-works.md' --- # Nasıl Çalışır? Qevron'a bir istek gönderdiğinizde, yanıt size dönene kadar birkaç aşamadan geçer. Bu sayfa o yolculuğu basitçe anlatır. ## İsteğin yolculuğu ``` 1. İstek 2. Kimlik 3. Dağıtıcı 4. Sağlayıcı 5. Yanıt ───────▶ app.qevron.ai/v1 ───▶ (Distributor) ───▶ (kanal) ───▶ Bearer sk-... anahtar + model adına OpenAI / OpenAI grup + kota göre uygun Anthropic / biçiminde doğrulanır kanalı seçer yerel model yanıt ``` 1. **İstek** — Uygulamanız `https://app.qevron.ai/v1/...` adresine `Authorization: Bearer sk-...` başlığıyla istek atar. 2. **Kimlik doğrulama** — Qevron anahtarı doğrular, bağlı olduğu **grubu** bulur ve grubun bu modele erişimi ile kota durumunu kontrol eder. 3. **Dağıtıcı (Distributor)** — İstenen modeli sağlayan **kanallar** arasından uygun olanı seçer. Birden fazla kanal varsa yük dengeleme yapar. 4. **Sağlayıcı** — Seçilen kanal, isteği gerçek sağlayıcıya (OpenAI, Anthropic, Gemini, yerel bir model vb.) uygun biçime çevirip iletir. 5. **Yanıt** — Sağlayıcının yanıtı tekrar OpenAI biçimine çevrilip size döner; kullanım (token) kaydedilir. ## Otomatik yeniden deneme ve yedekleme Bir kanal hata verirse (örneğin sağlayıcı geçici olarak erişilemezse veya hız limitine takılırsa), Qevron isteği **otomatik olarak başka bir uygun kanala** yönlendirmeyi dener. Bu sayede tek bir sağlayıcının sorunundan uygulamanız etkilenmez. * Hız limiti (HTTP 429) → kısa beklemeyle yeniden dener. * Model erişilemez → o kanalı atlar, sıradakini dener. * Tüm kanallar tükenirse → anlamlı bir hata döndürür (bkz. [Hatalar](/api/errors)). ## Temel kavramlar sözlüğü | Kavram | Anlamı | |---|---| | **Model** | İstek attığınız yapay zeka (örn. `verinova`). Bir yeteneği temsil eder. | | **Kanal (Channel)** | Bir modeli sağlayan üst kaynak; sağlayıcı + adres + kimlik bilgisi. | | **Sağlayıcı (Provider)** | OpenAI, Anthropic, Gemini gibi servisler. Bir kanalın türü. | | **Grup (Group)** | Anahtarların erişim ve kota birimi. | | **Token** | Modelin işlediği metin parçası; kullanım bu birimle ölçülür. | Devamı: [Modeller](/concepts/models) · [Sağlayıcılar](/concepts/providers) · [API Anahtarları ve Kota](/concepts/api-keys-and-quota) --- --- url: 'https://docs.qevron.ai/capabilities/vision-detect.md' --- # Nesne Tespiti Bir görseldeki nesneleri bulup her birinin etiketini + bounding box'ını (x, y, w, h) + güven skorunu döner. ## Mevcut modeller | Model | Özellik | |---|---| | **`spook-detect`** *(önerilen)* | YOLO benzeri, gerçek zamanlı, 80+ COCO sınıfı | ## İki yol var ### Yeni alias yolu (v2.0.0+, önerilen) ```bash curl https://app.qevron.ai/v1/vision/detect \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-detect", "image": "data:image/jpeg;base64,...", "threshold": 0.5 }' ``` ### Eski yol (`custom_test`) ```bash curl https://app.qevron.ai/api/channel/85/custom_test \ -H "Authorization: Bearer sk-..." \ -d '{"model": "spook-detect", "image": "data:image/jpeg;base64,..."}' ``` ## Python ```python import base64, requests with open("sokak.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://app.qevron.ai/v1/vision/detect", headers={"Authorization": "Bearer sk-..."}, json={ "model": "spook-detect", "image": f"data:image/jpeg;base64,{b64}", "threshold": 0.4, }, ) detections = resp.json().get("detections", []) for d in detections: print(f"{d['label']:10s} score={d['score']:.2f} bbox={d['bbox']}") ``` ## Yanıt şekli ```json { "detections": [ {"label": "person", "score": 0.92, "bbox": [120, 80, 240, 480]}, {"label": "car", "score": 0.88, "bbox": [600, 200, 320, 180]}, {"label": "bicycle", "score": 0.71, "bbox": [50, 300, 90, 140]} ] } ``` `bbox` formatı: `[x, y, width, height]` (sol-üst köşe + boyut, piksel cinsinden). ## threshold Hangi güven skoruna kadar dahil edilsin? Varsayılan 0.5: * `0.3` — daha fazla aday, daha çok yanlış pozitif * `0.5` — denge (önerilen) * `0.7` — sadece çok emin olduklarımız Düşük threshold + sonradan client'ta filtre = en esnek pattern. ## Görselin üzerine çizmek ```python from PIL import Image, ImageDraw img = Image.open("sokak.jpg") draw = ImageDraw.Draw(img) for d in detections: x, y, w, h = d["bbox"] draw.rectangle([x, y, x+w, y+h], outline="red", width=3) draw.text((x, y-10), f"{d['label']} {d['score']:.2f}", fill="red") img.save("ciktili.jpg") ``` ## Sorun çözme * **Hiçbir şey bulamadı** → threshold'u düşür (0.3) ya da görsel kalitesi düşük olabilir. * **Yanlış sınıf** → spook-detect COCO 80 sınıfla eğitilmiş; tıbbi/endüstriyel niş sınıflar için custom model lazım. * **Çok yavaş** → görseli 1280 px'e küçült. Detect modeli kare giriş ister, sunucu tarafı resize yapıyor ama büyük girdi network'te uzar. Devam: [OCR](/capabilities/vision-ocr) · [Görsel üretimi](/capabilities/image-gen) --- --- url: 'https://docs.qevron.ai/en/capabilities/vision-detect.md' --- # Object Detection Finds objects in an image and returns each one's label + bounding box (x, y, w, h) + confidence score. ## Available models | Model | Note | |---|---| | **`spook-detect`** *(recommended)* | YOLO-style, real-time, 80+ COCO classes | ## Two paths ### New alias path (v2.0.0+, preferred) ```bash curl https://app.qevron.ai/v1/vision/detect \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-detect", "image": "data:image/jpeg;base64,...", "threshold": 0.5 }' ``` ### Legacy (`custom_test`) ```bash curl https://app.qevron.ai/api/channel/85/custom_test \ -H "Authorization: Bearer sk-..." \ -d '{"model": "spook-detect", "image": "data:image/jpeg;base64,..."}' ``` ## Python ```python import base64, requests with open("street.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://app.qevron.ai/v1/vision/detect", headers={"Authorization": "Bearer sk-..."}, json={ "model": "spook-detect", "image": f"data:image/jpeg;base64,{b64}", "threshold": 0.4, }, ) detections = resp.json().get("detections", []) for d in detections: print(f"{d['label']:10s} score={d['score']:.2f} bbox={d['bbox']}") ``` ## Response shape ```json { "detections": [ {"label": "person", "score": 0.92, "bbox": [120, 80, 240, 480]}, {"label": "car", "score": 0.88, "bbox": [600, 200, 320, 180]}, {"label": "bicycle", "score": 0.71, "bbox": [50, 300, 90, 140]} ] } ``` `bbox` is `[x, y, width, height]` (top-left corner + size, in pixels). ## threshold Up to what confidence score to include. Default 0.5: * `0.3` — more candidates, more false positives * `0.5` — balanced (default) * `0.7` — only very confident ones A low threshold + client-side filter is the most flexible pattern. ## Drawing boxes ```python from PIL import Image, ImageDraw img = Image.open("street.jpg") draw = ImageDraw.Draw(img) for d in detections: x, y, w, h = d["bbox"] draw.rectangle([x, y, x+w, y+h], outline="red", width=3) draw.text((x, y-10), f"{d['label']} {d['score']:.2f}", fill="red") img.save("annotated.jpg") ``` ## Troubleshooting * **Nothing detected** → lower the threshold (0.3) or check image quality. * **Wrong class** → spook-detect is trained on COCO 80 classes; medical / industrial niches need a custom model. * **Slow** → downscale to 1280 px. Detect models prefer square input; the server resizes but large inputs travel slowly over the wire. Next: [OCR](/en/capabilities/vision-ocr) · [Image generation](/en/capabilities/image-gen) --- --- url: 'https://docs.qevron.ai/capabilities/vision-ocr.md' --- # OCR — Görselden Metin Bir görseldeki yazıyı metne çevirir. Faturalar, dokümanlar, kimlik kartları, ekran görüntüleri için ideal. ## Mevcut modeller | Model | Özellik | |---|---| | **`spook-ocr`** *(önerilen)* | Türkçe + İngilizce, basılı + el yazısı | ## İki yol var ::: tip Yeni: `/v1/vision/ocr` (önerilen) v2.0.0 ile gelen yeni alias. OpenAI tarzı şeması — SDK ile rahat çağrılır. ::: ### Yeni alias yolu (v2.0.0+) ```bash curl https://app.qevron.ai/v1/vision/ocr \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-ocr", "image": "data:image/jpeg;base64,...", "language": "tr" }' ``` ### Eski yol (`custom_test` — hâlâ çalışır) ```bash curl https://app.qevron.ai/api/channel/87/custom_test \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-ocr", "image": "data:image/jpeg;base64,..." }' ``` Channel id (`87`) admin panelinden değişebilir. **Tercih edilen artık alias yolu** — channel id sabitlemek zorunda kalmıyorsun. ## Python ```python import base64, requests with open("fatura.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://app.qevron.ai/v1/vision/ocr", headers={"Authorization": "Bearer sk-..."}, json={ "model": "spook-ocr", "image": f"data:image/jpeg;base64,{b64}", "language": "tr", }, ) data = resp.json() print(data) ``` ## Yanıt şekli Şu an upstream'in çıktısını doğrudan döner (ham). v2.0.0 sonrası bir minor sürüm normalize edecek: ```json { "text": "Tüm görseldeki metin ardışık şekilde", "blocks": [ {"text": "Başlık", "bbox": [x, y, w, h], "confidence": 0.98}, {"text": "Detay satırı", "bbox": [...], "confidence": 0.95} ] } ``` ## İpuçları * Yüksek çözünürlük (1280+ px) verim arttırır. * Eğri-çarpık görsel için önce `spook-background`'la temizle, sonra OCR çek. * `language` parametresi opsiyonel ama önerilen — yanlış dile sapmayı engeller (özellikle "I", "1", "l" karakterlerinde). ## Sorun çözme * **Boş metin** → görsel düşük çözünürlüklü ya da bulanık. 1024 px altı zorlanır. * **Yanlış karakterler (l ↔ 1, O ↔ 0)** → `language` parametresini ver. Türkçe içerikte `tr`, İngilizce'de `en`. * **PDF için?** → Önce PDF'yi sayfa-sayfa JPG'ye çevir (`pdfium`, `pdf2image`), sonra her sayfayı bu endpoint'e gönder. Ya da [PDF Ayrıştırma](/api/parse-pdf) endpoint'ini kullan. Devam: [Nesne tespiti](/capabilities/vision-detect) · [VQA — Görsel anlama](/capabilities/vision-vqa) --- --- url: 'https://docs.qevron.ai/en/capabilities/vision-ocr.md' --- # OCR — Text from Image Extracts text from an image. Ideal for invoices, documents, ID cards, screenshots. ## Available models | Model | Note | |---|---| | **`spook-ocr`** *(recommended)* | Turkish + English, printed + handwriting | ## Two paths ::: tip New: `/v1/vision/ocr` (preferred) v2.0.0 alias. OpenAI-shaped — SDK-friendly. ::: ### New alias path (v2.0.0+) ```bash curl https://app.qevron.ai/v1/vision/ocr \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-ocr", "image": "data:image/jpeg;base64,...", "language": "en" }' ``` ### Legacy (`custom_test` — still works) ```bash curl https://app.qevron.ai/api/channel/87/custom_test \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-ocr", "image": "data:image/jpeg;base64,..." }' ``` Channel id (`87`) can change via the admin panel. **Prefer the alias path** — no need to pin a channel id in your code. ## Python ```python import base64, requests with open("invoice.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = requests.post( "https://app.qevron.ai/v1/vision/ocr", headers={"Authorization": "Bearer sk-..."}, json={ "model": "spook-ocr", "image": f"data:image/jpeg;base64,{b64}", "language": "en", }, ) data = resp.json() print(data) ``` ## Response shape Today the upstream response passes through verbatim. A v2.0.0-minor will normalize to: ```json { "text": "All text from the image, concatenated.", "blocks": [ {"text": "Heading", "bbox": [x, y, w, h], "confidence": 0.98}, {"text": "Body line", "bbox": [...], "confidence": 0.95} ] } ``` ## Tips * Higher resolution (1280+ px) improves accuracy. * For skewed images, run `spook-background` first to clean up, then OCR. * `language` is optional but recommended — prevents drift on ambiguous chars (I, 1, l). ## Troubleshooting * **Empty text** → image too low resolution or too blurry. Below 1024 px is hard. * **Wrong chars (l ↔ 1, O ↔ 0)** → pass `language`. Turkish content → `tr`, English → `en`. * **What about PDFs?** → convert PDF to per-page JPGs first (`pdfium`, `pdf2image`), then send each page. Or use the [PDF parsing](/en/api/parse-pdf) endpoint. Next: [Object detection](/en/capabilities/vision-detect) · [VQA — visual Q\&A](/en/capabilities/vision-vqa) --- --- url: 'https://docs.qevron.ai/en/getting-started/openai-compatibility.md' --- # OpenAI Compatibility Qevron speaks OpenAI's API format. That means you can point your existing OpenAI code at Qevron with **almost no changes**. The only change: `base_url` (or `baseURL`). ## Migrating from OpenAI: just 2 lines If you already use OpenAI, the only thing to change is the client configuration: ```diff client = OpenAI( - api_key=os.environ["OPENAI_API_KEY"], + api_key=os.environ["QEVRON_API_KEY"], + base_url="https://app.qevron.ai/v1", ) ``` All your calls like `chat.completions.create(...)`, `embeddings.create(...)` stay the same. Just change the `model` name to one defined in Qevron (see [`/v1/models`](/en/api/models)). ## Python (`openai` SDK) ```python from openai import OpenAI client = OpenAI( api_key="QEVRON_API_KEY", base_url="https://app.qevron.ai/v1", # the only change ) resp = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Explain RAG briefly."}], ) print(resp.choices[0].message.content) ``` ## JavaScript / TypeScript (`openai` SDK) ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_API_KEY, baseURL: "https://app.qevron.ai/v1", // the only change }); const resp = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Explain RAG briefly." }], }); console.log(resp.choices[0].message.content); ``` ## Which endpoints are compatible? All the common methods the OpenAI client uses are supported: | OpenAI SDK call | Qevron endpoint | |---|---| | `chat.completions.create()` | [`POST /v1/chat/completions`](/en/api/chat) | | `completions.create()` | [`POST /v1/completions`](/en/api/completions) | | `embeddings.create()` | [`POST /v1/embeddings`](/en/api/embeddings) | | `images.generate()` | [`POST /v1/images/generations`](/en/api/images) | | `images.edit()` | [`POST /v1/images/edits`](/en/api/images) | | `audio.speech.create()` | [`POST /v1/audio/speech`](/en/api/audio) | | `audio.transcriptions.create()` | [`POST /v1/audio/transcriptions`](/en/api/audio) | | `audio.translations.create()` | [`POST /v1/audio/translations`](/en/api/audio) | | `moderations.create()` | [`POST /v1/moderations`](/en/api/moderations) | | `models.list()` | [`GET /v1/models`](/en/api/models) | ## Other ecosystems Any tool that accepts a `base_url` works: * **LangChain** — `ChatOpenAI(base_url=..., api_key=...)` * **LlamaIndex** — `OpenAI(api_base=..., api_key=...)` * **Vercel AI SDK** — `createOpenAI({ baseURL, apiKey })` See the [Using with LangChain](/en/guides/using-with-langchain) guide for a full example. ## Anthropic and Gemini formats too Besides the OpenAI format, you can also use these providers' **native API formats**: * Anthropic Messages API → [`/v1/messages`](/en/api/anthropic) * Google Gemini API → [`/v1beta/models/...`](/en/api/gemini) So you can connect the `anthropic` or `google-genai` SDKs just by changing the address. --- --- url: 'https://docs.qevron.ai/getting-started/openai-compatibility.md' --- # OpenAI Uyumluluğu Qevron, OpenAI'nin API biçimini konuşur. Bu, OpenAI ile çalışan mevcut kodunuzu **neredeyse hiç değiştirmeden** Qevron'a yönlendirebileceğiniz anlamına gelir. Tek değişiklik: `base_url` (veya `baseURL`). ## OpenAI'dan geçiş: yalnızca 2 satır Zaten OpenAI kullanıyorsanız, değiştirmeniz gereken tek şey istemci yapılandırmasıdır: ```diff client = OpenAI( - api_key=os.environ["OPENAI_API_KEY"], + api_key=os.environ["QEVRON_API_KEY"], + base_url="https://app.qevron.ai/v1", ) ``` `chat.completions.create(...)`, `embeddings.create(...)` gibi tüm çağrılarınız aynı kalır. Yalnızca `model` adını Qevron'da tanımlı bir modelle değiştirin (bkz. [`/v1/models`](/api/models)). ## Python (`openai` SDK) ```python from openai import OpenAI client = OpenAI( api_key="QEVRON_API_KEY", base_url="https://app.qevron.ai/v1", # tek değişiklik bu satır ) resp = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "RAG nedir, kısaca anlat."}], ) print(resp.choices[0].message.content) ``` ## JavaScript / TypeScript (`openai` SDK) ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_API_KEY, baseURL: "https://app.qevron.ai/v1", // tek değişiklik bu satır }); const resp = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "RAG nedir, kısaca anlat." }], }); console.log(resp.choices[0].message.content); ``` ## Hangi uç noktalar uyumlu? OpenAI istemcisinin kullandığı tüm yaygın metotlar desteklenir: | OpenAI SDK çağrısı | Qevron uç noktası | |---|---| | `chat.completions.create()` | [`POST /v1/chat/completions`](/api/chat) | | `completions.create()` | [`POST /v1/completions`](/api/completions) | | `embeddings.create()` | [`POST /v1/embeddings`](/api/embeddings) | | `images.generate()` | [`POST /v1/images/generations`](/api/images) | | `images.edit()` | [`POST /v1/images/edits`](/api/images) | | `audio.speech.create()` | [`POST /v1/audio/speech`](/api/audio) | | `audio.transcriptions.create()` | [`POST /v1/audio/transcriptions`](/api/audio) | | `audio.translations.create()` | [`POST /v1/audio/translations`](/api/audio) | | `moderations.create()` | [`POST /v1/moderations`](/api/moderations) | | `models.list()` | [`GET /v1/models`](/api/models) | ## Diğer ekosistemler `base_url` ayarı kabul eden her araç çalışır: * **LangChain** — `ChatOpenAI(base_url=..., api_key=...)` * **LlamaIndex** — `OpenAI(api_base=..., api_key=...)` * **Vercel AI SDK** — `createOpenAI({ baseURL, apiKey })` Ayrıntılı örnek için [LangChain ile Kullanım](/guides/using-with-langchain) rehberine bakın. ## Anthropic ve Gemini formatları da var OpenAI biçiminin yanı sıra, bu sağlayıcıların **kendi yerel API biçimlerini** de kullanabilirsiniz: * Anthropic Messages API → [`/v1/messages`](/api/anthropic) * Google Gemini API → [`/v1beta/models/...`](/api/gemini) Böylece `anthropic` veya `google-genai` SDK'larını da yalnızca adresi değiştirerek bağlayabilirsiniz. --- --- url: 'https://docs.qevron.ai/en/resources/openapi.md' --- # OpenAPI / Swagger Qevron also publishes its entire API as a machine-readable **OpenAPI** specification. This lets you try it interactively or generate client code. ## Swagger UI Access the interactive UI from your browser: ``` https://app.qevron.ai/swagger/ ``` There you can see every endpoint, inspect parameters, and use "Try it out" to send requests directly (by entering your API key). ## Raw OpenAPI document Download the JSON spec directly: ``` https://app.qevron.ai/doc.json ``` You can use this file for: * **Client code generation** — Python, Go, TypeScript, etc. clients with `openapi-generator`. * **Postman / Insomnia** — Import the document to build a collection. * **API explorer tools** — Visualize the schema. ## Example: client generation ```bash # A TypeScript client with OpenAPI Generator npx @openapitools/openapi-generator-cli generate \ -i https://app.qevron.ai/doc.json \ -g typescript-axios \ -o ./qevron-client ``` ::: tip For most use cases, the official `openai` SDK + a `base_url` change is the most practical path (see [OpenAI Compatibility](/en/getting-started/openai-compatibility)). The OpenAPI spec is there for custom clients or automation needs. ::: --- --- url: 'https://docs.qevron.ai/resources/openapi.md' --- # OpenAPI / Swagger Qevron, tüm API'sini makine tarafından okunabilir bir **OpenAPI** spesifikasyonu olarak da yayınlar. Bu sayede etkileşimli olarak deneyebilir veya istemci kodu üretebilirsiniz. ## Swagger UI Tarayıcıdan etkileşimli arayüze erişin: ``` https://app.qevron.ai/swagger/ ``` Burada her uç noktayı görür, parametreleri inceleyebilir ve "Try it out" ile doğrudan istek atabilirsiniz (API anahtarınızı girerek). ## Ham OpenAPI dökümanı JSON spesifikasyonunu doğrudan indirin: ``` https://app.qevron.ai/doc.json ``` Bu dosyayı şunlar için kullanabilirsiniz: * **İstemci kodu üretimi** — `openapi-generator` ile Python, Go, TypeScript vb. istemciler. * **Postman / Insomnia** — Dökümanı içe aktarıp koleksiyon oluşturma. * **API gezgini araçları** — Şemayı görselleştirme. ## Örnek: istemci üretimi ```bash # OpenAPI Generator ile TypeScript istemcisi npx @openapitools/openapi-generator-cli generate \ -i https://app.qevron.ai/doc.json \ -g typescript-axios \ -o ./qevron-client ``` ::: tip Çoğu kullanım için resmi `openai` SDK + `base_url` değişikliği en pratik yoldur (bkz. [OpenAPI Uyumluluğu](/getting-started/openai-compatibility)). OpenAPI spesifikasyonu, özel istemci veya otomasyon ihtiyaçları için vardır. ::: --- --- url: 'https://docs.qevron.ai/api/parse-pdf.md' --- # PDF Ayrıştırma Bir PDF dosyasını yükler ve içindeki metni çıkarır. `multipart/form-data` kullanır. ## Form alanları | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | PDF ayrıştırma modeli | | `file` | dosya | ✓ | Ayrıştırılacak PDF dosyası | ## Örnek ```bash curl https://app.qevron.ai/v1/parse/pdf \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=" \ -F "file=@belge.pdf" ``` ```python import httpx with open("belge.pdf", "rb") as f: resp = httpx.post( "https://app.qevron.ai/v1/parse/pdf", headers={"Authorization": f"Bearer {API_KEY}"}, data={"model": ""}, files={"file": ("belge.pdf", f, "application/pdf")}, ) print(resp.json()) ``` ## Yanıt Yanıt, çıkarılan metni (ve varsa sayfa/yapı bilgisini) içerir: ```json { "text": "Belgeden çıkarılan tüm metin...", "pages": [ { "page": 1, "text": "Birinci sayfanın metni..." } ] } ``` ::: tip Bu uç noktanın kullanılabilmesi için kurulumunuzda bir PDF ayrıştırma modeli/kanalı (örn. Doc2x) tanımlı olmalıdır. Mevcut modelleri [`/v1/models`](/api/models) ile kontrol edin. ::: --- --- url: 'https://docs.qevron.ai/en/api/parse-pdf.md' --- # PDF Parsing Uploads a PDF file and extracts the text inside it. Uses `multipart/form-data`. ## Form fields | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | PDF parsing model | | `file` | file | ✓ | PDF file to parse | ## Example ```bash curl https://app.qevron.ai/v1/parse/pdf \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=" \ -F "file=@document.pdf" ``` ```python import httpx with open("document.pdf", "rb") as f: resp = httpx.post( "https://app.qevron.ai/v1/parse/pdf", headers={"Authorization": f"Bearer {API_KEY}"}, data={"model": ""}, files={"file": ("document.pdf", f, "application/pdf")}, ) print(resp.json()) ``` ## Response The response contains the extracted text (and page/structure info if available): ```json { "text": "All text extracted from the document...", "pages": [ { "page": 1, "text": "Text of the first page..." } ] } ``` ::: tip To use this endpoint, your deployment must have a PDF parsing model/channel defined (e.g. Doc2x). Check available models with [`/v1/models`](/en/api/models). ::: --- --- url: 'https://docs.qevron.ai/en/api/pricing.md' --- # Pricing You can query the **selling price** of the models your API key can access programmatically — i.e. the actual price you are billed. All endpoints are `GET` and authenticated with an API key. Prices are presented in customer-facing units: per **1M tokens** for LLM / embedding / rerank, per **1M characters** for TTS, per **minute** for STT, and per **image** for image generation/editing. Currency is `USD`. ## Full price list Returns the price of every model your key can use (same scope as `GET /v1/models`). ```bash curl https://app.qevron.ai/v1/pricing \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ### Response ```json { "object": "list", "data": [ { "model": "verinova-large", "type": 1, "modality": "llm", "owner": "arpanet", "currency": "USD", "pricing": { "input": { "amount": 0.1, "unit": "1M_tokens", "display": "$0.1 / 1M tokens" }, "output": { "amount": 0.3, "unit": "1M_tokens", "display": "$0.3 / 1M tokens" } } }, { "model": "blab-stable", "type": 7, "modality": "tts", "owner": "arpanet", "currency": "USD", "pricing": { "input": { "amount": 6, "unit": "1M_characters", "display": "$6 / 1M characters" } } }, { "model": "solab-stt", "type": 8, "modality": "stt", "owner": "arpanet", "currency": "USD", "pricing": { "input": { "amount": 0.003, "unit": "minute", "display": "$0.003 / minute" } } } ] } ``` | Field | Description | |---|---| | `model` | Model name (the one you use in `/v1/chat/completions` etc.). | | `type` | Numeric model type (1=LLM, 3=embedding, 5=image, 6=image edit, 7=TTS, 8=STT, 10=rerank). | | `modality` | Human/AI-readable type label: `llm`, `embedding`, `rerank`, `tts`, `stt`, `image`, `image_edit`. | | `owner` | The model's provider. | | `currency` | Price currency (`USD`). | | `pricing` | The billing dimensions for this model. Only dimensions greater than zero are included. | | `pricing..amount` | Selling price per unit (numeric). | | `pricing..unit` | Unit: `1M_tokens`, `1M_characters`, `minute`, `image`. | | `pricing..display` | Human-readable price string (e.g. `"$0.3 / 1M tokens"`). | Possible dimensions: `input` + `output` for LLM; `input` for embedding/rerank/TTS; `input` for STT; `per_image` for image generation/editing. ## Single model price ```bash curl https://app.qevron.ai/v1/pricing/verinova-large \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Returns a single model object (same shape as the `data` items above). Returns `404 model_not_found` if your key cannot access the model. ::: tip The returned prices are the **final selling price** — group discounts and the platform markup are already applied, i.e. what you pay per call. Cost basis is never exposed. Only models your key can use are listed. For your actual spend, see [Billing / Usage](/en/api/billing). ::: --- --- url: 'https://docs.qevron.ai/en/concepts/providers.md' --- # Providers A **provider** is the service that actually runs the models: OpenAI, Anthropic, Google Gemini, local models and more. Qevron unifies all of them behind one API. ## The channel concept In Qevron, a connection to a provider is called a **channel**. A channel contains: * **Type** — Which provider (OpenAI, Anthropic, ...). * **Address** — The provider's API endpoint. * **Credential** — That provider's API key (hidden from you, kept in the dashboard). * **Models** — The model names this channel serves. If the same model is defined on multiple channels, Qevron load-balances between them at request time and fails over if one breaks (see [How it Works](/en/concepts/how-it-works)). ## Supported providers (38+) Qevron supports many provider types. Some of them: | Provider | Provider | Provider | |---|---|---| | OpenAI | Azure OpenAI | Anthropic | | Google Gemini | Vertex AI | Deepseek | | Mistral | Groq | Cohere | | Ollama | OpenRouter | xAI | | Moonshot | Minimax | Zhipu | | Baidu | Ali (Qwen) | Tencent | | AWS Bedrock | Cloudflare | Novita | | Siliconflow | Jina | TEI (embed/rerank) | | llama.cpp | Stepfun | and more... | Each provider type has its own set of capabilities (some chat-only, some embedding/rerank, etc.). ## What changes for you? As a developer you **don't deal with** provider details. You just pick a model name; which provider hosts it is Qevron's job. As a result: * Switching providers = just changing the model name. * If a provider goes down, your app fails over. * Your code stays loyal to one format (OpenAI). ## Forcing a specific provider In advanced cases, to select a specific channel use the `Qevron-Channel` header (see [Authentication](/en/getting-started/authentication#forcing-a-specific-provider-optional)). --- --- url: 'https://docs.qevron.ai/en.md' --- --- --- url: 'https://docs.qevron.ai/getting-started/introduction.md' --- # Qevron nedir? Qevron, **yapay zeka modellerine tek bir kapıdan erişmenizi** sağlayan bir *AI gateway*'dir (yapay zeka ağ geçidi). Uygulamanız tek bir API'ye bağlanır; Qevron arka planda isteğinizi doğru sağlayıcıya (OpenAI, Anthropic, Google Gemini, yerel modeller ve 38+ sağlayıcı) yönlendirir. ## AI gateway ne işe yarar? Diyelim ki uygulamanızda bir sohbet asistanı, bir arama özelliği ve bir görsel üretici var. Normalde her biri için ayrı sağlayıcıya, ayrı API anahtarına, ayrı SDK'ya ve ayrı faturaya ihtiyaç duyarsınız. Bir gateway bu karmaşıklığı ortadan kaldırır: * **Tek API anahtarı** — Tüm modeller için tek bir `sk-...` anahtarı. * **Tek adres** — Her şey `https://app.qevron.ai/v1` altında. * **Tek format** — OpenAI'nin API biçimi. Yeni bir şey öğrenmenize gerek yok. * **Tek panel** — Kullanım, kota ve maliyet tek yerden izlenir. ``` ┌────────────┐ tek API ┌──────────┐ ┌─────────────────┐ │ Sizin │ ─────────────────▶ │ │ ───▶ │ OpenAI │ │ uygulamanız│ Bearer sk-... │ Qevron │ ───▶ │ Anthropic │ │ │ ◀───────────────── │ gateway │ ───▶ │ Gemini │ └────────────┘ yanıt │ │ ───▶ │ Yerel modeller │ └──────────┘ └─────────────────┘ ``` ## Kimler için? * **Yeni başlayanlar** — Tek bir `curl` komutuyla ilk yapay zeka isteğinizi atın. SDK kurmanıza bile gerek yok. * **Geliştiriciler** — Mevcut OpenAI/Anthropic SDK'nızda yalnızca adresi değiştirin; gerisi aynı kalır. * **Ekipler** — Birden çok sağlayıcıyı tek yerden yönetin, ekip üyelerine kotalı anahtarlar verin. ## Qevron neler yapabilir? | Yetenek | Açıklama | API | |---|---|---| | **Sohbet (Chat)** | Metin üretimi, araç çağırma, görsel anlama, akış | [`/v1/chat/completions`](/api/chat) | | **Embeddings** | Metni vektöre çevirme (arama, RAG) | [`/v1/embeddings`](/api/embeddings) | | **Rerank** | Doküman listesini alaka düzeyine göre sıralama | [`/v1/rerank`](/api/rerank) | | **Görsel üretimi** | Metinden görsel, görsel düzenleme | [`/v1/images/*`](/api/images) | | **Ses** | Metinden sese (TTS), sesten metne (STT) | [`/v1/audio/*`](/api/audio) | | **Video** | Asenkron video üretimi | [`/v1/video/*`](/api/video) | | **Anthropic / Gemini** | Bu sağlayıcıların kendi yerel formatları | [`/v1/messages`](/api/anthropic), [`/v1beta/...`](/api/gemini) | ## Neden "OpenAI uyumlu"? OpenAI'nin API biçimi sektörde fiili standart hâline geldi. Qevron bu biçimi konuştuğu için, OpenAI ile çalışan hemen hemen her araç, kütüphane ve SDK (Python `openai`, JavaScript `openai`, LangChain, LlamaIndex, vb.) Qevron ile de çalışır — tek yapmanız gereken `base_url` değerini değiştirmektir. ::: tip Sıradaki adım Hemen denemek isterseniz [Hızlı Başlangıç](/getting-started/quickstart) sayfasına geçin; 5 dakikada ilk isteğinizi atın. ::: --- --- url: 'https://docs.qevron.ai/en/getting-started/quickstart.md' --- # Quickstart This page gets you to your **first AI request in 5 minutes**. All you need is an API key. ## What you need * A **Qevron API key** (`sk-...`). If you don't have one, create it from [Authentication](/en/getting-started/authentication). * Optional: Python or Node.js (not needed for curl). ::: tip Want a more thorough setup? This page shows the fastest path. To go from setup to production step by step, with error handling and a prod checklist, see the [Integration Guide](/en/getting-started/integration). ::: ## 1. Get your API key Create a key in the Qevron admin dashboard. A key is a string starting with `sk-`, for example: ``` sk-aBcD1234eFgH5678... ``` ::: warning Keep your key secret An API key is like a password. Don't put it in source code, screenshots or public repos. Store it in a server environment variable (e.g. `QEVRON_API_KEY`). ::: See [Authentication](/en/getting-started/authentication) for how to create a key. ## 2. Make your first request The example below sends a simple question to the `verinova` model. Replace `$QEVRON_API_KEY` with your own key. ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ { "role": "user", "content": "Hello! Introduce yourself in one sentence." } ] }' ``` ```python [Python] from openai import OpenAI client = OpenAI( api_key="QEVRON_API_KEY", # your own key base_url="https://app.qevron.ai/v1", ) resp = client.chat.completions.create( model="verinova", messages=[ {"role": "user", "content": "Hello! Introduce yourself in one sentence."}, ], ) print(resp.choices[0].message.content) ``` ```javascript [JavaScript] import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_API_KEY, baseURL: "https://app.qevron.ai/v1", }); const resp = await client.chat.completions.create({ model: "verinova", messages: [ { role: "user", content: "Hello! Introduce yourself in one sentence." }, ], }); console.log(resp.choices[0].message.content); ``` ::: ## 3. Read the response Qevron returns a response in OpenAI format: ```json { "id": "chatcmpl-...", "object": "chat.completion", "created": 1716200000, "model": "verinova", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! I'm an AI assistant running through Qevron." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 18, "completion_tokens": 16, "total_tokens": 34 } } ``` The reply text is in `choices[0].message.content`. The `usage` field shows how many tokens you spent. ## Troubleshooting your first call | Symptom | Likely cause | Fix | |---|---|---| | `401 Unauthorized` | Missing/wrong key | Is `Authorization: Bearer sk-...` correct? Are `api_key` + `base_url` set in the SDK? | | `404 model_not_found` | Wrong model name / no access | List available names with [`/v1/models`](/en/api/models) | | Connection error | Wrong `base_url` | `https://app.qevron.ai/v1` (must end with `/v1`) | | `429` | Rate limit | Wait briefly and retry (see [Integration Guide](/en/getting-started/integration#step-6-error-handling-and-retries)) | ## What's next? --- --- url: 'https://docs.qevron.ai/en/guides/rag-embeddings.md' --- # RAG: Embedding + Rerank **RAG** (Retrieval-Augmented Generation) is how you get more accurate answers by having the model "read" your own documents. In this guide we'll build a simple RAG pipeline using Qevron's embedding, rerank and chat models together. ## The idea ``` User question │ ├─▶ 1. Embedding: question + documents are turned into vectors ├─▶ 2. Search: nearest documents found (vector similarity) ├─▶ 3. Rerank: candidates sorted by relevance └─▶ 4. Chat: best documents + question given to the model → answer ``` ## 1. Embed the documents ```python import os, numpy as np from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") docs = [ "Qevron authenticates requests with the Authorization: Bearer header.", "For streaming, add stream: true to the request.", "The spook-background model removes an image's background.", "Embedding turns text into a vector; used for search.", ] emb = client.embeddings.create(model="veriEmbedding", input=docs) doc_vectors = np.array([d.embedding for d in emb.data]) ``` ## 2. Embed the question and find the nearest ```python def cosine(a, b): return (a @ b) / (np.linalg.norm(a) * np.linalg.norm(b) + 1e-9) question = "How does authentication work in Qevron?" q_vec = np.array(client.embeddings.create(model="veriEmbedding", input=question).data[0].embedding) scores = [cosine(q_vec, dv) for dv in doc_vectors] top_idx = sorted(range(len(docs)), key=lambda i: scores[i], reverse=True)[:3] candidates = [docs[i] for i in top_idx] ``` ## 3. Pick the most relevant with rerank Vector search is fast but coarse. A rerank model sorts the candidates far more accurately: ```python import httpx rr = httpx.post( "https://app.qevron.ai/v1/rerank", headers={"Authorization": f"Bearer {os.environ['QEVRON_API_KEY']}"}, json={ "model": "verirerag", "query": question, "documents": candidates, "top_n": 2, "return_documents": True, }, ).json() best_docs = [r["document"]["text"] for r in rr["results"]] ``` ## 4. Give the context to the model and get an answer ```python context = "\n".join(f"- {d}" for d in best_docs) resp = client.chat.completions.create( model="verinova", messages=[ {"role": "system", "content": "Answer only using the given context. If it's not there, say 'I don't know'."}, {"role": "user", "content": f"Context:\n{context}\n\nQuestion: {question}"}, ], ) print(resp.choices[0].message.content) ``` ## Production tips * Use a **vector database** (FAISS, Qdrant, pgvector) — the plain NumPy search above is just an example. * **Chunk your documents**; split long texts before embedding. * **Limit context**: only give the model the top N documents (save tokens). * Related APIs: [Embeddings](/en/api/embeddings) · [Rerank](/en/api/rerank) · [Chat](/en/api/chat). --- --- url: 'https://docs.qevron.ai/guides/rag-embeddings.md' --- # RAG: Embedding + Rerank **RAG** (Retrieval-Augmented Generation), modele kendi dokümanlarınızı "okutarak" daha doğru yanıtlar almanın yoludur. Bu rehberde Qevron'un embedding, rerank ve chat modellerini birlikte kullanarak basit bir RAG hattı kuracağız. ## Mantık ``` Kullanıcı sorusu │ ├─▶ 1. Embedding: soru + dokümanlar vektöre çevrilir ├─▶ 2. Arama: en yakın dokümanlar bulunur (vektör benzerliği) ├─▶ 3. Rerank: adaylar alaka düzeyine göre sıralanır └─▶ 4. Chat: en iyi dokümanlar + soru modele verilir → yanıt ``` ## 1. Dokümanları embedding'e çevirin ```python import os, numpy as np from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") docs = [ "Qevron istekleri Authorization: Bearer başlığıyla doğrular.", "Akış için isteğe stream: true eklenir.", "spook-background modeli görselin arka planını siler.", "Embedding metni vektöre çevirir; arama için kullanılır.", ] emb = client.embeddings.create(model="veriEmbedding", input=docs) doc_vectors = np.array([d.embedding for d in emb.data]) ``` ## 2. Soruyu vektörle ve en yakınları bulun ```python def cosine(a, b): return (a @ b) / (np.linalg.norm(a) * np.linalg.norm(b) + 1e-9) question = "Qevron'da kimlik doğrulama nasıl yapılır?" q_vec = np.array(client.embeddings.create(model="veriEmbedding", input=question).data[0].embedding) scores = [cosine(q_vec, dv) for dv in doc_vectors] top_idx = sorted(range(len(docs)), key=lambda i: scores[i], reverse=True)[:3] candidates = [docs[i] for i in top_idx] ``` ## 3. Rerank ile en alakalıyı seçin Vektör araması hızlıdır ama kabadır. Rerank modeli adayları çok daha isabetli sıralar: ```python import httpx rr = httpx.post( "https://app.qevron.ai/v1/rerank", headers={"Authorization": f"Bearer {os.environ['QEVRON_API_KEY']}"}, json={ "model": "verirerag", "query": question, "documents": candidates, "top_n": 2, "return_documents": True, }, ).json() best_docs = [r["document"]["text"] for r in rr["results"]] ``` ## 4. Modele bağlamı verip yanıt alın ```python context = "\n".join(f"- {d}" for d in best_docs) resp = client.chat.completions.create( model="verinova", messages=[ {"role": "system", "content": "Yalnızca verilen bağlamı kullanarak yanıt ver. Bağlamda yoksa 'bilmiyorum' de."}, {"role": "user", "content": f"Bağlam:\n{context}\n\nSoru: {question}"}, ], ) print(resp.choices[0].message.content) ``` ## Üretim için ipuçları * **Vektör veritabanı** kullanın (FAISS, Qdrant, pgvector) — yukarıdaki saf NumPy araması yalnızca örnektir. * **Dokümanları parçalara bölün** (chunking); çok uzun metinleri bölerek embedding'leyin. * **Bağlamı sınırlayın**: yalnızca en iyi N dokümanı modele verin (token tasarrufu). * İlgili API'ler: [Embeddings](/api/embeddings) · [Rerank](/api/rerank) · [Chat](/api/chat). --- --- url: 'https://docs.qevron.ai/api/rerank.md' --- # Rerank Bir sorgu ile bir doküman listesi alır ve dokümanları **alaka düzeyine göre** yeniden sıralar. RAG sistemlerinde, aramadan dönen aday dokümanları en iyiden en kötüye sıralamak için kullanılır. ## İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Rerank modeli (örn. `verirerag`) | | `query` | string | ✓ | Arama sorgusu | | `documents` | dizi | ✓ | Sıralanacak metin listesi | | `top_n` | integer | | Yalnızca en iyi N sonucu döndür | | `return_documents` | boolean | | Sonuçta doküman metnini de döndür | | `max_chunks_per_doc` | integer | | Doküman başına azami parça | ## Örnek ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "Qevron nasıl kimlik doğrular?", "documents": [ "Qevron istekleri Bearer token ile doğrular.", "Hava bugün İstanbul'\''da yağmurlu.", "Embedding metni vektöre çevirir." ], "top_n": 2, "return_documents": true }' ``` ```python [Python] import httpx resp = httpx.post( "https://app.qevron.ai/v1/rerank", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "model": "verirerag", "query": "Qevron nasıl kimlik doğrular?", "documents": [ "Qevron istekleri Bearer token ile doğrular.", "Hava bugün İstanbul'da yağmurlu.", "Embedding metni vektöre çevirir.", ], "top_n": 2, "return_documents": True, }, ) print(resp.json()) ``` ::: ## Yanıt ```json { "id": "rerank-...", "results": [ { "index": 0, "relevance_score": 0.987, "document": { "text": "Qevron istekleri Bearer token ile doğrular." } }, { "index": 2, "relevance_score": 0.142, "document": { "text": "Embedding metni vektöre çevirir." } } ], "meta": { "tokens": { "input_tokens": 48 } } } ``` | Alan | Açıklama | |---|---| | `results[].index` | Girdideki orijinal sıra | | `results[].relevance_score` | Alaka skoru (yüksek = daha alakalı) | | `results[].document` | `return_documents: true` ise doküman metni | Sonuçlar skora göre azalan sırada döner. --- --- url: 'https://docs.qevron.ai/en/api/rerank.md' --- # Rerank Takes a query and a list of documents and re-sorts the documents **by relevance**. In RAG systems it's used to rank candidate documents returned from search, from best to worst. ## Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Rerank model (e.g. `verirerag`) | | `query` | string | ✓ | Search query | | `documents` | array | ✓ | List of texts to rank | | `top_n` | integer | | Return only the top N results | | `return_documents` | boolean | | Also return the document text in results | | `max_chunks_per_doc` | integer | | Max chunks per document | ## Example ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "How does Qevron authenticate?", "documents": [ "Qevron authenticates requests with a Bearer token.", "The weather in Istanbul is rainy today.", "Embedding turns text into a vector." ], "top_n": 2, "return_documents": true }' ``` ```python [Python] import httpx resp = httpx.post( "https://app.qevron.ai/v1/rerank", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "model": "verirerag", "query": "How does Qevron authenticate?", "documents": [ "Qevron authenticates requests with a Bearer token.", "The weather in Istanbul is rainy today.", "Embedding turns text into a vector.", ], "top_n": 2, "return_documents": True, }, ) print(resp.json()) ``` ::: ## Response ```json { "id": "rerank-...", "results": [ { "index": 0, "relevance_score": 0.987, "document": { "text": "Qevron authenticates requests with a Bearer token." } }, { "index": 2, "relevance_score": 0.142, "document": { "text": "Embedding turns text into a vector." } } ], "meta": { "tokens": { "input_tokens": 48 } } } ``` | Field | Description | |---|---| | `results[].index` | Original position in the input | | `results[].relevance_score` | Relevance score (higher = more relevant) | | `results[].document` | Document text if `return_documents: true` | Results are returned in descending score order. --- --- url: 'https://docs.qevron.ai/en/capabilities/rerank.md' --- # Rerank Takes a search query and a list of candidate documents, returns a stronger ranking of which document best answers the query. The second pass after embedding-based top-K retrieval. ## Available models | Model | Type | |---|---| | **`verirerag`** *(recommended)* | TEI (Text Embeddings Inference) cross-encoder, multilingual | | Cohere `rerank-multilingual-v3.0` | If a Cohere-keyed channel exists | ## Why rerank? Embedding similarity is fast (vector dot product) but "closest neighbour" isn't always "correct answer". A cross-encoder examines each (query, document) pair and scores actual relevance. It's slower — so we first cut down to 50–100 with embedding, then verirerag picks the real top 3. ``` [5000 docs via embedding → top 50] → [verirerag → top 5] ``` ## curl ```bash curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "what is qevron", "documents": [ "The weather is nice today.", "Qevron is an AI gateway application.", "Channels follow the OpenAI schema.", "Turkish and English are supported." ] }' ``` ## Response ```json { "results": [ {"index": 1, "relevance_score": 0.96, "document": {"text": "Qevron is an AI gateway application."}}, {"index": 2, "relevance_score": 0.62, "document": {"text": "Channels follow the OpenAI schema."}}, {"index": 3, "relevance_score": 0.18, "document": {"text": "Turkish and English are supported."}}, {"index": 0, "relevance_score": 0.02, "document": {"text": "The weather is nice today."}} ] } ``` `index` is the position in the original `documents` array — use it to look up your own metadata. ## Python (raw requests — OpenAI SDK doesn't expose rerank) ```python import requests resp = requests.post( "https://app.qevron.ai/v1/rerank", headers={"Authorization": "Bearer sk-..."}, json={ "model": "verirerag", "query": "what is qevron", "documents": ["d1", "d2", "d3"], }, ) results = resp.json()["results"] # already sorted by relevance_score desc ``` ## In a RAG pipeline ```python # 1) Embedding picks candidates candidates = vector_db.search(embed(user_query), top_k=50) # 2) Rerank computes real relevance reranked = rerank("verirerag", user_query, [c.text for c in candidates]) # 3) Top 3 go into the LLM as context top_3 = [candidates[r["index"]] for r in reranked[:3]] ``` ## Troubleshooting * **All scores very low (< 0.05)** → query likely doesn't overlap with documents. Audit embedding-side candidate selection first. * **Slow** → 100+ documents are heavy. Trim with embedding to ~50 before rerank. * **OpenAI SDK doesn't work** → correct, rerank isn't in OpenAI's standard; use raw `requests`/`httpx`. Next: [Embedding](/en/capabilities/embedding) · [RAG walkthrough](/en/guides/rag-embeddings) --- --- url: 'https://docs.qevron.ai/api/responses.md' --- # Responses API OpenAI'nin yeni nesil **Responses API**'si ile uyumludur. Sohbet completions'a benzer ancak yanıtlar sunucu tarafında bir nesne olarak tutulur; oluşturabilir, getirebilir, iptal edebilir ve girdilerini listeleyebilirsiniz. ## Response oluşturma ```bash curl https://app.qevron.ai/v1/responses \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "input": "Üç maddede yapay zekayı anlat." }' ``` ```python resp = client.responses.create( model="verinova", input="Üç maddede yapay zekayı anlat.", ) print(resp.id, resp.status) ``` ### Yanıt ```json { "object": "response", "id": "resp_abc123", "status": "completed", "created_at": 1716200000, "usage": { "input_tokens": 12, "output_tokens": 64, "total_tokens": 76 } } ``` `status` değerleri: `in_progress`, `completed`, `failed`, `cancelled`. ## Response getirme ```bash curl https://app.qevron.ai/v1/responses/resp_abc123 \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ## Response silme Başarılı silmede `204 No Content` döner. ## Response iptal etme Devam eden (`in_progress`) bir response'u iptal eder. ## Girdi öğelerini listeleme İlgili response'a verilen girdi öğelerinin listesini döndürür. ::: tip Basit metin üretimi için [Chat Completions](/api/chat) genellikle daha pratiktir. Responses API'yi durum tutan (stateful) gelişmiş iş akışları için tercih edin. ::: --- --- url: 'https://docs.qevron.ai/en/api/responses.md' --- # Responses API Compatible with OpenAI's next-generation **Responses API**. It's similar to chat completions, but responses are kept as a server-side object; you can create, fetch, cancel and list their inputs. ## Create a response ```bash curl https://app.qevron.ai/v1/responses \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "input": "Explain AI in three bullet points." }' ``` ```python resp = client.responses.create( model="verinova", input="Explain AI in three bullet points.", ) print(resp.id, resp.status) ``` ### Response ```json { "object": "response", "id": "resp_abc123", "status": "completed", "created_at": 1716200000, "usage": { "input_tokens": 12, "output_tokens": 64, "total_tokens": 76 } } ``` `status` values: `in_progress`, `completed`, `failed`, `cancelled`. ## Fetch a response ```bash curl https://app.qevron.ai/v1/responses/resp_abc123 \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` ## Delete a response A successful delete returns `204 No Content`. ## Cancel a response Cancels an in-progress (`in_progress`) response. ## List input items Returns the list of input items given to the response. ::: tip For simple text generation, [Chat Completions](/en/api/chat) is usually more practical. Prefer the Responses API for stateful, advanced workflows. ::: --- --- url: 'https://docs.qevron.ai/concepts/providers.md' --- # Sağlayıcılar **Sağlayıcı (provider)**, modelleri gerçekte çalıştıran servistir: OpenAI, Anthropic, Google Gemini, yerel modeller ve daha fazlası. Qevron bunların hepsini tek API arkasında birleştirir. ## Kanal kavramı Qevron'da bir sağlayıcıya bağlantı **kanal (channel)** olarak adlandırılır. Bir kanal şunları içerir: * **Tür** — Hangi sağlayıcı (OpenAI, Anthropic, ...). * **Adres** — Sağlayıcının API adresi. * **Kimlik bilgisi** — O sağlayıcıya ait API anahtarı (sizden gizli, panelde tutulur). * **Modeller** — Bu kanalın sunduğu model adları. Aynı model birden fazla kanalda tanımlıysa, Qevron istek anında aralarında yük dengeler ve biri başarısız olursa diğerine geçer (bkz. [Nasıl Çalışır?](/concepts/how-it-works)). ## Desteklenen sağlayıcılar (38+) Qevron çok sayıda sağlayıcı türünü destekler. Bazıları: | Sağlayıcı | Sağlayıcı | Sağlayıcı | |---|---|---| | OpenAI | Azure OpenAI | Anthropic | | Google Gemini | Vertex AI | Deepseek | | Mistral | Groq | Cohere | | Ollama | OpenRouter | xAI | | Moonshot | Minimax | Zhipu | | Baidu | Ali (Qwen) | Tencent | | AWS Bedrock | Cloudflare | Novita | | Siliconflow | Jina | TEI (embed/rerank) | | llama.cpp | Stepfun | ve daha fazlası... | Her sağlayıcı türünün kendi yetenek kümesi vardır (bazıları yalnızca sohbet, bazıları embedding/rerank vb.). ## Sizin için ne değişir? Bir geliştirici olarak sağlayıcı ayrıntılarıyla **uğraşmazsınız**. Yalnızca bir model adı seçersiniz; o modelin hangi sağlayıcıda olduğu Qevron'un sorumluluğudur. Bu sayede: * Sağlayıcı değiştirmek = yalnızca model adını değiştirmek. * Bir sağlayıcı çökerse uygulamanız yedeğe geçer. * Kodunuz tek bir biçme (OpenAI) sadık kalır. ## Belirli bir sağlayıcıyı zorlamak Gelişmiş durumlarda belirli bir kanalı seçmek isterseniz `Qevron-Channel` başlığını kullanın (bkz. [Kimlik Doğrulama](/getting-started/authentication#belirli-bir-saglayiciyi-secme-opsiyonel)). --- --- url: 'https://docs.qevron.ai/capabilities/stt.md' --- # Sesten Metne (STT) Bir ses dosyası alır, içindeki konuşmayı metne çevirir. Whisper formatıyla %100 uyumlu — OpenAI Whisper kullanıyorsan tek satır değişikliğiyle Qevron'a geçebilirsin. ## Mevcut modeller | Model | Ne için? | Özellik | |---|---|---| | **`solab-stt`** *(önerilen)* | Türkçe + İngilizce karışık konuşma | Whisper-large-v3 türevi, faster-whisper | | `whisper-1` | OpenAI üzerinden | OpenAI anahtarı ekli channel'da | ## curl ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer sk-..." \ -F "model=solab-stt" \ -F "file=@/yol/ses.wav" \ -F "language=tr" ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") with open("kayit.wav", "rb") as f: resp = client.audio.transcriptions.create( model="solab-stt", file=f, language="tr", # önerilen — yanlış dile sapmayı engeller ) print(resp.text) ``` ::: tip Dil ipucu `language` parametresini her zaman ver. Otomatik dil tespiti küçük örneklerde yanılabilir; ses sadece bir kelime ya da çok kısa cümlelerse `tr` yerine `en`'e sapma riski artar. ::: ## Desteklenen formatlar `wav`, `mp3`, `m4a`, `ogg`, `flac`, `webm`, `mpga`. Mono 16 kHz tercih edilir; multi-channel girdiyi sunucu downmix eder. ## Whisper-özgü parametreler ```bash -F "prompt=Diyalogda geçen özel isimler: Köray, Arpanet, Qevron" -F "temperature=0" -F "response_format=verbose_json" # segment + timestamp döner ``` * **prompt** — başlangıç bağlamı; özel isimler / jargonlar burada verilirse Whisper daha doğru transkribe eder. * **temperature** — varsayılan 0; 1'e doğru yükselt sadece çok özel durumlarda. * **response\_format** — `text` (varsayılan), `json`, `verbose_json` (timestamp'lı segment'ler), `srt`, `vtt`. ## Akış (streaming) `"stream": true` ekle, parça parça delta'lar alırsın. Henüz tüm SDK'lar destekleyemiyor — Python `openai>=1.50` ile çalışır. (Bkz. [v2.0.0 streaming notu](/concepts/streaming).) ```python stream = client.audio.transcriptions.create( model="solab-stt", file=open("kayit.wav","rb"), stream=True ) for delta in stream: print(delta.text, end="", flush=True) ``` ## Sorun çözme * **Boş cevap** → `language` parametresini doğru ver, dosya formatı destekleniyor mu kontrol et. * **Yanlış dil** → `language=tr` ekle. * **Çok yavaş** → 30 sn üstü kayıtları parçalara böl. Whisper tek dosyada 30 sn'lik pencereler halinde çalışır. Devam: [Telefon ajanı (CalleKit)](/concepts/how-it-works) · [TTS — Metinden Sese](/capabilities/tts) --- --- url: 'https://docs.qevron.ai/guides/speech-to-text.md' --- # Sesten Metne (STT) Bir ses kaydını metne dökün (transkripsiyon). Toplantı kayıtları, sesli notlar veya altyazı üretimi için kullanışlıdır. ## Temel kullanım ```python import os from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") with open("kayit.wav", "rb") as f: resp = client.audio.transcriptions.create( model="solab-stt", file=f, language="tr", ) print(resp.text) ``` ## curl ile ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=solab-stt" \ -F "file=@kayit.wav" \ -F "language=tr" ``` ## Ayrıntılı çıktı (zaman damgaları) `response_format=verbose_json` ile dil, süre ve zaman damgalı parçalar (segments) alırsınız: ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=solab-stt" \ -F "file=@kayit.wav" \ -F "response_format=verbose_json" ``` ```json { "task": "transcribe", "language": "tr", "duration": 12.4, "text": "Merhaba, bu bir test kaydıdır...", "segments": [ { "start": 0.0, "end": 3.2, "text": "Merhaba, bu bir test kaydıdır" } ] } ``` ## İpuçları * **`language` belirtin**: Dili önceden vermek doğruluğu artırır (örn. `tr`, `en`). * **Çeviri**: Sesi İngilizceye çevirmek için [`/v1/audio/translations`](/api/audio#sesten-ingilizceye-ceviri) uç noktasını kullanın. * **Desteklenen formatlar**: wav, mp3, m4a vb. (modele bağlı). İlgili: [Audio API — STT](/api/audio#sesten-metne-stt). --- --- url: 'https://docs.qevron.ai/resources/faq.md' --- # Sıkça Sorulan Sorular ## Genel **Qevron tam olarak nedir?** Birçok yapay zeka sağlayıcısını tek bir OpenAI uyumlu API arkasında birleştiren bir *AI gateway*'dir. Tek anahtar, tek adres, tek format. Bkz. [Qevron nedir?](/getting-started/introduction) **OpenAI hesabım yok, yine de kullanabilir miyim?** Evet. Qevron'a yalnızca bir Qevron API anahtarıyla bağlanırsınız. Sağlayıcı anahtarları (OpenAI, Anthropic vb.) Qevron tarafında yönetilir; sizin bilmeniz gerekmez. ## Kimlik doğrulama **API anahtarımı nasıl alırım?** Qevron yönetim panelinden bir token oluşturun. Bkz. [Kimlik Doğrulama](/getting-started/authentication). **`401 Unauthorized` alıyorum, neden?** Anahtar eksik veya yanlış. `Authorization: Bearer sk-...` başlığını doğru gönderdiğinizden emin olun. SDK kullanıyorsanız `api_key` ve `base_url` ayarlarını kontrol edin. ## Modeller **Hangi modeller mevcut?** `GET /v1/models` ile anahtarınızın erişebildiği modelleri listeleyin. Bkz. [Models API](/api/models). **`404 model_not_found` alıyorum.** Model adı yanlış yazılmış olabilir veya grubunuzun o modele erişimi yoktur. `/v1/models` çıktısındaki adları kullanın. **OpenAI model adlarını (örn. `gpt-4o`) kullanabilir miyim?** Yalnızca o model kurulumunuzda bir kanala tanımlıysa. Kullanılabilir adları her zaman `/v1/models` ile doğrulayın. ## İstekler **Yanıtı nasıl akışla (streaming) alırım?** İsteğe `"stream": true` ekleyin. Bkz. [Akış](/concepts/streaming). **Görsel gönderince hata alıyorum.** Görsel yalnızca görsel destekleyen modellerde (örn. `spook-vision`) çalışır. `verinova` gibi metin modellerine görsel göndermeyin. Ayrıca büyük görseller `413` hatası verebilir; küçültüp gönderin. Bkz. [Görsel Anlama](/guides/vision). **`429 Too Many Requests` ne demek?** Hız limitini aştınız. `X-RateLimit-Reset-*` başlığındaki zamana kadar bekleyip yeniden deneyin. Bkz. [API Anahtarları ve Kota](/concepts/api-keys-and-quota). ## Faturalama **Ne kadar harcadığımı nasıl görürüm?** Her yanıttaki `usage` alanına veya [`/v1/dashboard/billing/usage`](/api/billing) uç noktasına bakın. ## Daha fazlası Yanıtını bulamadığınız bir soru mu var? [API Referansı](/api/overview) ve [Sözlük](/resources/glossary) sayfalarına göz atın. --- --- url: 'https://docs.qevron.ai/capabilities/chat.md' --- # Sohbet (LLM) Metin tabanlı diyalog. OpenAI'nin `chat/completions` formatını birebir konuşur; `messages` listesi gönderirsin, model rolüne göre yanıt verir. ## Mevcut modeller | Model | Ne için? | Özellik | |---|---|---| | **`verinova`** *(önerilen, hızlı)* | Telefon, IVR, kısa sohbet | gpt-oss-20b Q8, **reasoning kapalı** — yanıt anında gelir | | **`verinova-large`** | Rapor, analiz, dokümantasyon | Qwen3-30B-A3B-Instruct Q8, **reasoning açık** — adım adım düşünür, daha detaylı | | `gpt-4o` | OpenAI üzerinden | OpenAI anahtarı ekli channel'da | | `claude-3-5-sonnet` | Anthropic üzerinden | Anthropic anahtarı ekli channel'da | ::: tip Hangisini seçmeliyim? * **Konuşma akıcılığı kritikse** (telefon, anlık chat): `verinova` * **Cevabın kalitesi kritikse** (rapor, PRD, çok adımlı analiz): `verinova-large` ::: ## curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ {"role": "system", "content": "Sen kısa ve net yanıt veren bir asistansın."}, {"role": "user", "content": "1 + 1 kaç?"} ] }' ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI( api_key="sk-...", base_url="https://app.qevron.ai/v1", ) resp = client.chat.completions.create( model="verinova", messages=[ {"role": "system", "content": "Be concise."}, {"role": "user", "content": "Write me a limerick"}, ], ) print(resp.choices[0].message.content) ``` ## Akış (streaming) {#stream} `"stream": true` ekle; sunucu Server-Sent Events ile parça parça yanıt verir: ```python for chunk in client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "..."}], stream=True, ): print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ## reasoning\_effort (verinova-large) Qwen3 30B varsayılan olarak `...` blok'larıyla içsel düşüncesini gösterir. Eğer sadece final cevabı istiyorsan: ```json { "model": "verinova-large", "messages": [...], "chat_template_kwargs": {"reasoning_effort": "none"} } ``` ::: warning Telefon ajanı? `verinova-large`'i CalleKit'te kullanma — yanıt süresi çok artar. CalleKit `verinova`'ya bağlanır ve reasoning zaten kanal düzeyinde kapalı tutulur. ::: ## Sorun çözme * **"model not found"** → Tablo'daki yazımı bire bir kullan. Büyük-küçük harf önemli. * **"connection refused"** → İlgili channel düşmüş olabilir. **/capabilities** sayfasından bu yeteneğin durumunu kontrol et. * **Yanıt çok yavaş** → `verinova-large` doğası gereği `verinova`'dan ~3-5× yavaş. Önce streaming aç (`stream:true`), sonra gerekirse `max_tokens: 256-512` ile tavanı düşür. Devam: [RAG: Embedding + Rerank](/guides/rag-embeddings) · [İlk Sohbet Botu](/guides/first-chatbot) --- --- url: 'https://docs.qevron.ai/models/solab-stt.md' description: >- faster-whisper tabanlı, kendi GPU altyapımızda çalışan bir konuşma tanıma (STT) modelidir. Ses dosyalarını metne çevirir. İki kullanım biçimi vardır:… --- # solab-stt ## Bu model nedir? faster-whisper tabanlı, kendi GPU altyapımızda çalışan bir konuşma tanıma (STT) modelidir. Ses dosyalarını metne çevirir. İki kullanım biçimi vardır: dosya yükleyerek tek seferlik transkripsiyon, ya da gerçek zamanlı (canlı) akış için WebSocket. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Sesten Metne (STT) | | **Model türü** | Sesten metne (STT) (type=8) | | **Temel model** | faster-whisper | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/audio/transcriptions ``` **İkincil uç noktalar:** * `GET /v1/audio/stream (WebSocket, real-time)` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `solab-stt` | | `file` | file | ✓ | Ses dosyası (multipart) | | `language` | string | — | Dil kodu (ör. tr, en) | ## Yanıt şeması ```json { "text": "transcribed text ..." } ``` ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_KEY" \ -F model="solab-stt" \ -F file=@audio.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") with open("audio.wav", "rb") as f: r = client.audio.transcriptions.create(model="solab-stt", file=f) print(r.text) ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.003 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## Notlar ve özellikler * **Toplu (batch):** `POST /v1/audio/transcriptions` — multipart form ile ses dosyası yükleyin. * **Gerçek zamanlı:** `GET /v1/audio/stream` (WebSocket) — ses parçalarını gönderdikçe kısmi/nihai transkriptleri akış olarak alırsınız (telefon/canlı senaryolar için). * `language` parametresiyle dili sabitleyebilirsiniz (örn. `tr`, `en`); boş bırakılırsa otomatik algılanır. ## Sınırlar ve kısıtlar * WebSocket akışı, OpenAI SDK'sının standart bir özelliği değildir; ham WebSocket istemcisi kullanın. ## İlgili * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/solab-stt.md' description: >- A self-hosted speech-to-text (STT) model based on faster-whisper, running on our own GPU infrastructure. It transcribes audio to text. Two usage modes:… --- # solab-stt ## What is this model? A self-hosted speech-to-text (STT) model based on faster-whisper, running on our own GPU infrastructure. It transcribes audio to text. Two usage modes: one-shot transcription by uploading a file, or a WebSocket for real-time (live) streaming. ## Capability & type | | | |---|---| | **Capability** | Speech to Text (STT) | | **Model type** | Speech-to-text (STT) (type=8) | | **Base model** | faster-whisper | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/audio/transcriptions ``` **Secondary endpoints:** * `GET /v1/audio/stream (WebSocket, real-time)` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `solab-stt` | | `file` | file | ✓ | Audio file (multipart) | | `language` | string | — | Language code (e.g. tr, en) | ## Response schema ```json { "text": "transcribed text ..." } ``` ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_KEY" \ -F model="solab-stt" \ -F file=@audio.wav ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") with open("audio.wav", "rb") as f: r = client.audio.transcriptions.create(model="solab-stt", file=f) print(r.text) ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.003 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Notes & quirks * **Batch:** `POST /v1/audio/transcriptions` — upload an audio file via multipart form. * **Real-time:** `GET /v1/audio/stream` (WebSocket) — stream audio chunks and receive partial/final transcripts as they arrive (for telephony/live scenarios). * Pin the language with the `language` parameter (e.g. `tr`, `en`); leave it empty for auto-detection. ## Limits & constraints * WebSocket streaming is not a standard OpenAI SDK feature; use a raw WebSocket client. ## Related * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/resources/glossary.md' --- # Sözlük Qevron ve yapay zeka API'lerinde sık geçen terimler. **AI Gateway (Yapay Zeka Ağ Geçidi)** Birçok yapay zeka sağlayıcısını tek bir API arkasında birleştiren ara katman. Qevron bir AI gateway'dir. **API Anahtarı (Key)** İsteğin sizin adınıza yapıldığını kanıtlayan gizli metin (`sk-...`). Bkz. [Kimlik Doğrulama](/getting-started/authentication). **Base URL** API'nin temel adresi. Qevron için `https://app.qevron.ai/v1`. **Embedding** Metnin anlamını temsil eden sayı dizisi (vektör). Arama ve RAG'in temelidir. Bkz. [Embeddings](/api/embeddings). **Grup (Group)** Anahtarların erişim ve kota birimi. Hangi modellere erişilebileceğini ve limitleri belirler. **Kanal (Channel)** Bir modeli sağlayan üst kaynak: sağlayıcı + adres + kimlik bilgisi. Bkz. [Sağlayıcılar](/concepts/providers). **LLM (Büyük Dil Modeli)** Metin üreten yapay zeka modeli (örn. sohbet modelleri). **MCP (Model Context Protocol)** Modellerin dış araçlara standart biçimde erişmesini sağlayan protokol. Bkz. [MCP / SSE](/guides/mcp). **Moderasyon** Bir metnin zararlı/uygunsuz içerik barındırıp barındırmadığını sınıflandırma. Bkz. [Moderations](/api/moderations). **Prompt (İstem)** Modele verdiğiniz girdi metni / talimat. **Quota (Kota)** Bir grubun harcayabileceği toplam kullanım/bakiye. **RAG (Retrieval-Augmented Generation)** Modele kendi dokümanlarınızı bularak (retrieval) daha doğru yanıt ürettirme yöntemi. Bkz. [RAG rehberi](/guides/rag-embeddings). **Rerank (Yeniden Sıralama)** Bir doküman listesini bir sorguya göre alaka düzeyiyle sıralama. Bkz. [Rerank](/api/rerank). **SSE (Server-Sent Events)** Sunucudan istemciye sürekli, tek yönlü veri akışı. Akış (streaming) bunun üzerine kuruludur. **STT (Speech-to-Text)** Sesi metne çevirme (transkripsiyon). Bkz. [Audio](/api/audio). **Streaming (Akış)** Yanıtı tek seferde değil, parça parça (kelime kelime) alma. Bkz. [Akış](/concepts/streaming). **Token** Modelin işlediği metin parçası (yaklaşık bir hece/kelime). Kullanım ve fiyatlandırma token bazlıdır. **TTS (Text-to-Speech)** Metni sese çevirme. Bkz. [Audio](/api/audio). **Vision (Görsel Anlama)** Bir modelin görseli "görüp" hakkında yanıt verebilmesi. Bkz. [Görsel Anlama](/guides/vision). --- --- url: 'https://docs.qevron.ai/en/capabilities/stt.md' --- # Speech to Text (STT) Takes an audio file, returns the spoken content as text. 100% Whisper-compatible — if you're using OpenAI Whisper, you can switch to Qevron with a one-line `base_url` change. ## Available models | Model | Use for | Note | |---|---|---| | **`solab-stt`** *(recommended)* | Mixed Turkish + English speech | Whisper-large-v3 derivative, faster-whisper | | `whisper-1` | Via OpenAI | If an OpenAI-keyed channel exists | ## curl ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer sk-..." \ -F "model=solab-stt" \ -F "file=@/path/to/audio.wav" \ -F "language=tr" ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") with open("recording.wav", "rb") as f: resp = client.audio.transcriptions.create( model="solab-stt", file=f, language="en", # recommended — prevents drifting to the wrong language ) print(resp.text) ``` ::: tip Language hint Always pass `language`. Auto-detection can mis-classify on very short clips; a one-word file is enough to throw off auto-detect. ::: ## Supported formats `wav`, `mp3`, `m4a`, `ogg`, `flac`, `webm`, `mpga`. Mono 16 kHz preferred; multi-channel is downmixed server-side. ## Whisper-specific parameters ```bash -F "prompt=Names that appear: Koray, Arpanet, Qevron" -F "temperature=0" -F "response_format=verbose_json" # returns segments + timestamps ``` * **prompt** — initial context; specialised names / jargon here improve accuracy. * **temperature** — default 0; raise toward 1 only in very specific scenarios. * **response\_format** — `text` (default), `json`, `verbose_json` (timestamped segments), `srt`, `vtt`. ## Streaming `"stream": true` returns delta chunks. Python `openai>=1.50` supports it; not all SDKs do yet (see [streaming notes](/en/concepts/streaming)). ```python stream = client.audio.transcriptions.create( model="solab-stt", file=open("rec.wav","rb"), stream=True ) for delta in stream: print(delta.text, end="", flush=True) ``` ## Troubleshooting * **Empty response** → check `language` is correct and the file format is supported. * **Wrong language** → set `language=en` / `language=tr` explicitly. * **Too slow** → split clips longer than 30 s; Whisper works in 30-second windows internally. Next: [Telephony (CalleKit)](/en/concepts/how-it-works) · [TTS — text to speech](/en/capabilities/tts) --- --- url: 'https://docs.qevron.ai/en/guides/speech-to-text.md' --- # Speech to Text (STT) Transcribe an audio recording into text. Useful for meeting recordings, voice notes or subtitle generation. ## Basic usage ```python import os from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") with open("recording.wav", "rb") as f: resp = client.audio.transcriptions.create( model="solab-stt", file=f, language="en", ) print(resp.text) ``` ## With curl ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=solab-stt" \ -F "file=@recording.wav" \ -F "language=en" ``` ## Verbose output (timestamps) With `response_format=verbose_json` you get language, duration and timestamped segments: ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -F "model=solab-stt" \ -F "file=@recording.wav" \ -F "response_format=verbose_json" ``` ```json { "task": "transcribe", "language": "en", "duration": 12.4, "text": "Hello, this is a test recording...", "segments": [ { "start": 0.0, "end": 3.2, "text": "Hello, this is a test recording" } ] } ``` ## Tips * **Specify `language`**: giving the language upfront improves accuracy (e.g. `tr`, `en`). * **Translation**: to translate speech into English, use the [`/v1/audio/translations`](/en/api/audio#speech-to-english-translation) endpoint. * **Supported formats**: wav, mp3, m4a, etc. (model-dependent). Related: [Audio API — STT](/en/api/audio#speech-to-text-stt). --- --- url: 'https://docs.qevron.ai/models/spook-background.md' description: Spook Background — Arka Plan Kaldırma. --- # spook-background ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Arka Plan Kaldırma — [Yetenek sayfası](/capabilities/image-gen) | | **Model türü** | Görsel düzenleme (type=6) | | **Temel model** | background removal | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | — | ## Uç nokta ``` POST /v1/vision/background (preferred) | POST /api/channel/:id/custom_test (legacy) ``` **İkincil uç noktalar:** * `POST /v1/images/edits` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `spook-background` | | `image` | string | ✓ | base64 veya data URL görsel | ## Yanıt şeması ```json { "data": { "image": "" } } ``` ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/vision/background \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-background", "image": "data:image/jpeg;base64,<...>"}' ``` ## Fiyatlandırma Güncel fiyat için: `GET /v1/models/spook-background`. ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Yetenek sayfası: [Arka Plan Kaldırma](/capabilities/image-gen) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/spook-background.md' description: Spook Background — Background Removal. --- # spook-background ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Background Removal — [Capability page](/en/capabilities/image-gen) | | **Model type** | Image editing (type=6) | | **Base model** | background removal | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | — | ## Endpoint ``` POST /v1/vision/background (preferred) | POST /api/channel/:id/custom_test (legacy) ``` **Secondary endpoints:** * `POST /v1/images/edits` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `spook-background` | | `image` | string | ✓ | base64 or data-URL image | ## Response schema ```json { "data": { "image": "" } } ``` ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/vision/background \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-background", "image": "data:image/jpeg;base64,<...>"}' ``` ## Pricing Current price: `GET /v1/models/spook-background`. ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * Capability page: [Background Removal](/en/capabilities/image-gen) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/spook-detect.md' description: Spook Detect — Nesne Tespiti. --- # spook-detect ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Nesne Tespiti — [Yetenek sayfası](/capabilities/vision-vqa) | | **Model türü** | Dil modeli (LLM) (type=1) | | **Temel model** | object detection | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | — | ## Uç nokta ``` POST /v1/vision/detect (preferred) | POST /api/channel/:id/custom_test (legacy) ``` **İkincil uç noktalar:** * `POST /v1/chat/completions (with image_url)` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `spook-detect` | | `image` | string | ✓ | base64 veya data URL görsel | ## Yanıt şeması ```json { "data": { "image": "" } } ``` ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/vision/detect \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-detect", "image": "data:image/jpeg;base64,<...>"}' ``` ## Fiyatlandırma Güncel fiyat için: `GET /v1/models/spook-detect`. ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Yetenek sayfası: [Nesne Tespiti](/capabilities/vision-vqa) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/spook-detect.md' description: Spook Detect — Object Detection. --- # spook-detect ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Object Detection — [Capability page](/en/capabilities/vision-vqa) | | **Model type** | Language model (LLM) (type=1) | | **Base model** | object detection | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | — | ## Endpoint ``` POST /v1/vision/detect (preferred) | POST /api/channel/:id/custom_test (legacy) ``` **Secondary endpoints:** * `POST /v1/chat/completions (with image_url)` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `spook-detect` | | `image` | string | ✓ | base64 or data-URL image | ## Response schema ```json { "data": { "image": "" } } ``` ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/vision/detect \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-detect", "image": "data:image/jpeg;base64,<...>"}' ``` ## Pricing Current price: `GET /v1/models/spook-detect`. ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * Capability page: [Object Detection](/en/capabilities/vision-vqa) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/spook-generate.md' description: Spook Generate — Görsel Üretimi. --- # spook-generate ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Görsel Üretimi — [Yetenek sayfası](/capabilities/image-gen) | | **Model türü** | Görsel üretimi (type=5) | | **Temel model** | FLUX.1-dev (Q8 GGUF) | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | — | ## Uç nokta ``` POST /v1/images/generations ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `spook-generate` | | `prompt` | string | ✓ | Görsel açıklaması | | `size` | string | — | `1024x1024` | | `response_format` | string | — | `b64_json` | ## Yanıt şeması ```json { "created": 0, "data": [{"b64_json": ""}] } ``` ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-generate", "prompt": "a cat astronaut, oil painting", "size": "1024x1024", "response_format": "b64_json"}' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.images.generate(model="spook-generate", prompt="a cat astronaut, oil painting", size="1024x1024", response_format="b64_json") print(r.data[0].b64_json[:32], "...") ``` ## Fiyatlandırma Güncel fiyat için: `GET /v1/models/spook-generate`. ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Yetenek sayfası: [Görsel Üretimi](/capabilities/image-gen) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/spook-generate.md' description: Spook Generate — Image Generation. --- # spook-generate ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Image Generation — [Capability page](/en/capabilities/image-gen) | | **Model type** | Image generation (type=5) | | **Base model** | FLUX.1-dev (Q8 GGUF) | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | — | ## Endpoint ``` POST /v1/images/generations ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `spook-generate` | | `prompt` | string | ✓ | Image prompt | | `size` | string | — | `1024x1024` | | `response_format` | string | — | `b64_json` | ## Response schema ```json { "created": 0, "data": [{"b64_json": ""}] } ``` ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-generate", "prompt": "a cat astronaut, oil painting", "size": "1024x1024", "response_format": "b64_json"}' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.images.generate(model="spook-generate", prompt="a cat astronaut, oil painting", size="1024x1024", response_format="b64_json") print(r.data[0].b64_json[:32], "...") ``` ## Pricing Current price: `GET /v1/models/spook-generate`. ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * Capability page: [Image Generation](/en/capabilities/image-gen) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/spook-ocr.md' description: Spook OCR — Görselden Metin (OCR). --- # spook-ocr ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Görselden Metin (OCR) — [Yetenek sayfası](/capabilities/vision-vqa) | | **Model türü** | Dil modeli (LLM) (type=1) | | **Temel model** | GOT-OCR2.0 | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | — | ## Uç nokta ``` POST /v1/vision/ocr (preferred) | POST /api/channel/:id/custom_test (legacy) ``` **İkincil uç noktalar:** * `POST /v1/chat/completions (with image_url)` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `spook-ocr` | | `image` | string | ✓ | base64 veya data URL görsel | ## Yanıt şeması ```json { "data": { "image": "" } } ``` ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/vision/ocr \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-ocr", "image": "data:image/jpeg;base64,<...>"}' ``` ## Fiyatlandırma Güncel fiyat için: `GET /v1/models/spook-ocr`. ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Yetenek sayfası: [Görselden Metin (OCR)](/capabilities/vision-vqa) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/spook-ocr.md' description: Spook OCR — Optical Character Recognition. --- # spook-ocr ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Optical Character Recognition — [Capability page](/en/capabilities/vision-vqa) | | **Model type** | Language model (LLM) (type=1) | | **Base model** | GOT-OCR2.0 | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | — | ## Endpoint ``` POST /v1/vision/ocr (preferred) | POST /api/channel/:id/custom_test (legacy) ``` **Secondary endpoints:** * `POST /v1/chat/completions (with image_url)` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `spook-ocr` | | `image` | string | ✓ | base64 or data-URL image | ## Response schema ```json { "data": { "image": "" } } ``` ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/vision/ocr \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "spook-ocr", "image": "data:image/jpeg;base64,<...>"}' ``` ## Pricing Current price: `GET /v1/models/spook-ocr`. ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * Capability page: [Optical Character Recognition](/en/capabilities/vision-vqa) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/spook-vision.md' description: Spook Vision — Görsel Anlama (VQA). --- # spook-vision ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Görsel Anlama (VQA) — [Yetenek sayfası](/capabilities/vision-vqa) | | **Model türü** | Dil modeli (LLM) (type=1) | | **Temel model** | image captioning / VQA | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/chat/completions (with image_url content) ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `spook-vision` | | `messages` | array | ✓ | `image_url` içeren içerik bloğu | ## Yanıt şeması ```json { "id": "chatcmpl-...", "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} } ``` ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "spook-vision", "messages": [{"role": "user", "content": [{"type":"text","text":"Describe this image"},{"type":"image_url","image_url":{"url":"data:image/jpeg;base64,<...>"}}]}] }' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") resp = client.chat.completions.create( model="spook-vision", messages=[{"role": "user", "content": [{"type":"text","text":"Describe this image"},{"type":"image_url","image_url":{"url":"data:image/jpeg;base64,<...>"}}]}], ) print(resp.choices[0].message.content) ``` ### JavaScript ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_KEY, baseURL: "https://app.qevron.ai/v1" }); const resp = await client.chat.completions.create({ model: "spook-vision", messages: [{ role: "user", content: [{type:"text",text:"Describe this image"},{type:"image_url",image_url:{url:"data:image/jpeg;base64,<...>"}}] }], }); console.log(resp.choices[0].message.content); ``` ## Fiyatlandırma Güncel fiyat için: `GET /v1/models/spook-vision`. ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Yetenek sayfası: [Görsel Anlama (VQA)](/capabilities/vision-vqa) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/spook-vision.md' description: Spook Vision — Vision Question-Answering. --- # spook-vision ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Vision Question-Answering — [Capability page](/en/capabilities/vision-vqa) | | **Model type** | Language model (LLM) (type=1) | | **Base model** | image captioning / VQA | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/chat/completions (with image_url content) ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `spook-vision` | | `messages` | array | ✓ | content blocks incl. `image_url` | ## Response schema ```json { "id": "chatcmpl-...", "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} } ``` ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "spook-vision", "messages": [{"role": "user", "content": [{"type":"text","text":"Describe this image"},{"type":"image_url","image_url":{"url":"data:image/jpeg;base64,<...>"}}]}] }' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") resp = client.chat.completions.create( model="spook-vision", messages=[{"role": "user", "content": [{"type":"text","text":"Describe this image"},{"type":"image_url","image_url":{"url":"data:image/jpeg;base64,<...>"}}]}], ) print(resp.choices[0].message.content) ``` ### JavaScript ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_KEY, baseURL: "https://app.qevron.ai/v1" }); const resp = await client.chat.completions.create({ model: "spook-vision", messages: [{ role: "user", content: [{type:"text",text:"Describe this image"},{type:"image_url",image_url:{url:"data:image/jpeg;base64,<...>"}}] }], }); console.log(resp.choices[0].message.content); ``` ## Pricing Current price: `GET /v1/models/spook-vision`. ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * Capability page: [Vision Question-Answering](/en/capabilities/vision-vqa) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/en/concepts/streaming.md' --- # Streaming Instead of waiting for a long response all at once, you can receive it **piece by piece** (word by word). This gives the "typing" effect in chat UIs and improves perceived speed. ## How to enable it Add `"stream": true` to the request body: ::: code-group ```bash [curl] curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "stream": true, "messages": [{ "role": "user", "content": "Explain RAG in three bullet points." }] }' ``` ```python [Python] stream = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Explain RAG in three bullet points."}], stream=True, ) for chunk in stream: delta = chunk.choices[0].delta.content or "" print(delta, end="", flush=True) ``` ```javascript [JavaScript] const stream = await client.chat.completions.create({ model: "verinova", messages: [{ role: "user", content: "Explain RAG in three bullet points." }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0].delta.content ?? ""); } ``` ::: ## Response format (SSE) Streaming returns **Server-Sent Events** (SSE). With the `Content-Type: text/event-stream` header, each chunk arrives as a `data:` line: ``` data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant"}}]} data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"RAG"}}]} data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":", "}}]} data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]} data: [DONE] ``` * Text in each chunk is in `choices[0].delta.content`. * The final chunk has `finish_reason` set. * The stream ends with `data: [DONE]`. ## Getting token usage in a stream By default `usage` is not sent at the end of a stream. To include it: ```json { "model": "verinova", "stream": true, "stream_options": { "include_usage": true }, "messages": [ ... ] } ``` In that case a chunk containing only `usage` is sent just before the end. ## Which endpoints support streaming? * [Chat completions](/en/api/chat) — `stream: true` * [Audio: TTS](/en/api/audio) — audio chunks as SSE via `stream_format` * [Audio: STT](/en/api/audio) — transcription piece by piece * [Responses API](/en/api/responses) ::: warning Use an SDK Rather than parsing SSE by hand, use the official `openai` SDK; it resolves the chunks for you. ::: --- --- url: 'https://docs.qevron.ai/en/capabilities/tts.md' --- # Text to Speech (TTS) Takes a string, returns natural-sounding audio. OpenAI `audio/speech` format. ## Available models | Model | Quality | Latency | Use where | |---|---|---|---| | **`blab-stable`** *(recommended)* | High | Medium | Training video, product demo, podcast | | `blab-fast-tr-naz` | Mid | Low | Turkish telephony (Naz voice) | | `blab-fast-en-emma` | Mid | Low | English telephony (Emma voice) | | `blab-tts` | Low | Very low | Push notification, IVR menu | | `tts-1` | OpenAI side | — | If an OpenAI-keyed channel exists | ## curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "blab-stable", "input": "Hello world", "voice": "en"}' \ -o output.wav ``` ## Python (openai SDK) ```python from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") resp = client.audio.speech.create( model="blab-stable", input="Qevron serves your own models through one API.", voice="en", ) resp.stream_to_file("output.wav") ``` ## Which model when? * **`blab-stable`** — quality matters, no telephony constraints. ~600–900 ms latency, top-tier natural tone. * **`blab-fast-tr-naz` / `blab-fast-en-emma`** — real-time conversation (phone agent). ~80–150 ms, fixed voice character (Naz Turkish, Emma English). * **`blab-tts`** — instant announcements, IVR menu prompts. CPU-only, never waits for GPU. Modest quality, near-zero latency. ## voice parameter * `blab-tts`: language code (`tr` or `en`) * `blab-fast-*`: voice is fixed — parameter ignored * `blab-stable`: `tr` / `en` (default `tr`) * OpenAI `tts-1`: `alloy`, `echo`, `fable`, `onyx`, `nova`, `shimmer` ## Streaming ```python stream = client.audio.speech.create( model="blab-stable", input="A long passage of text...", voice="en", stream=True, ) with open("output.wav", "wb") as f: for chunk in stream.iter_bytes(): f.write(chunk) ``` ::: tip Legacy `stream_format` parameter Before v2.2.0 you had to pass OpenAI's original `stream_format: "sse"` explicitly. As of v2.2.0 qevron auto-bridges `stream: true` (the SDK shape) → `stream_format: "sse"`. Both work; an explicit `stream_format` still wins. ::: ## Troubleshooting * **Silent file** → did you set `Content-Type: application/json`? Send JSON, not form-data. * **Wrong voice** → `blab-fast-*` voices are fixed; switch model to switch voice. * **MP3 or WAV?** → WAV by default. Add `"response_format": "mp3"` for MP3. Next: [Telephony](/en/concepts/how-it-works) · [STT — speech to text](/en/capabilities/stt) --- --- url: 'https://docs.qevron.ai/en/guides/text-to-speech.md' --- # Text to Speech (TTS) Turn text into natural-sounding speech and save it as an audio file. ## Basic usage ```python import os from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") resp = client.audio.speech.create( model="blab-tts", voice="naz", input="Hello! This audio was generated through Qevron.", ) resp.stream_to_file("output.mp3") print("output.mp3 saved") ``` ## With curl ```bash curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "blab-tts", "voice": "naz", "input": "Hello! This audio was generated through Qevron.", "response_format": "mp3" }' --output output.mp3 ``` ## Voice and format options | Parameter | Values | Description | |---|---|---| | `voice` | model-dependent | Speaker voice | | `response_format` | `mp3`, `opus`, `aac`, `flac` | Output audio format | | `speed` | 0.25–4.0 | Speech speed | Some TTS models in this deployment: `blab-tts`, `blab-fast-tr-naz` (Turkish), `blab-fast-en-emma` (English). ## Tips * **Pick a language-appropriate model**: a model optimized for the target language sounds more natural. * **Split long text**: break very long text by sentence/paragraph and concatenate. * **Streaming**: for real-time playback you can get audio chunk by chunk via `stream_format` (see [Audio API](/en/api/audio)). Related: [Audio API — TTS](/en/api/audio#text-to-speech-tts). --- --- url: 'https://docs.qevron.ai/en/guides/using-with-langchain.md' --- # Using with LangChain Because Qevron is OpenAI-compatible, you can point LangChain's OpenAI components at Qevron by just changing `base_url`. ## Setup ```bash pip install langchain langchain-openai export QEVRON_API_KEY="sk-..." ``` ## Chat model ```python import os from langchain_openai import ChatOpenAI llm = ChatOpenAI( model="verinova", api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) print(llm.invoke("What is RAG, in one sentence?").content) ``` ## Embeddings ```python from langchain_openai import OpenAIEmbeddings embeddings = OpenAIEmbeddings( model="veriEmbedding", api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1", ) vec = embeddings.embed_query("Qevron is an AI gateway.") print(len(vec)) ``` ## Chain example ```python from langchain_core.prompts import ChatPromptTemplate prompt = ChatPromptTemplate.from_messages([ ("system", "You are an assistant that answers briefly."), ("user", "{question}"), ]) chain = prompt | llm print(chain.invoke({"question": "What is an embedding good for?"}).content) ``` ## Other frameworks The same idea works in any tool that accepts `base_url`/`api_base`: ```python # LlamaIndex from llama_index.llms.openai import OpenAI llm = OpenAI(model="verinova", api_base="https://app.qevron.ai/v1", api_key="sk-...") ``` ```javascript // Vercel AI SDK import { createOpenAI } from "@ai-sdk/openai"; const qevron = createOpenAI({ baseURL: "https://app.qevron.ai/v1", apiKey: process.env.QEVRON_API_KEY, }); ``` Related: [OpenAI Compatibility](/en/getting-started/openai-compatibility). --- --- url: 'https://docs.qevron.ai/models/veriEmbedding.md' description: VeriEmbedding — Embedding (Vektör). --- # veriEmbedding ## Bu model nedir? Qevron tarafından kendi GPU altyapımızda barındırılan bir modeldir. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Embedding (Vektör) — [Yetenek sayfası](/capabilities/embedding) | | **Model türü** | Gömme (embedding) (type=3) | | **Temel model** | BAAI/bge-m3 | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | — | ## Uç nokta ``` POST /v1/embeddings ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `veriEmbedding` | | `input` | string | string\[] | ✓ | Gömülecek metin(ler) | ## Yanıt şeması ```json { "object": "list", "data": [{"object": "embedding", "index": 0, "embedding": [0.01, -0.02, "..."]}], "model": "veriEmbedding", "usage": {"prompt_tokens": 0, "total_tokens": 0} } ``` ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "veriEmbedding", "input": ["first text", "second text"]}' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.embeddings.create(model="veriEmbedding", input=["first text", "second text"]) print(len(r.data[0].embedding)) ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.00002 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## İlgili * Yetenek sayfası: [Embedding (Vektör)](/capabilities/embedding) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/veriEmbedding.md' description: VeriEmbedding — Embedding. --- # veriEmbedding ## What is this model? A model hosted by Qevron on our own GPU infrastructure. ## Capability & type | | | |---|---| | **Capability** | Embedding — [Capability page](/en/capabilities/embedding) | | **Model type** | Embedding (type=3) | | **Base model** | BAAI/bge-m3 | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | — | ## Endpoint ``` POST /v1/embeddings ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `veriEmbedding` | | `input` | string | string\[] | ✓ | Text(s) to embed | ## Response schema ```json { "object": "list", "data": [{"object": "embedding", "index": 0, "embedding": [0.01, -0.02, "..."]}], "model": "veriEmbedding", "usage": {"prompt_tokens": 0, "total_tokens": 0} } ``` ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{"model": "veriEmbedding", "input": ["first text", "second text"]}' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") r = client.embeddings.create(model="veriEmbedding", input=["first text", "second text"]) print(len(r.data[0].embedding)) ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.00002 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Related * Capability page: [Embedding](/en/capabilities/embedding) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/en/models/verinova.md' description: VeriNova (retired alias) — Chat (LLM). --- # verinova ::: warning Retired model This model is retired; your request is automatically routed to: [`verinova-large`](/en/models/verinova-large). ::: ## Related * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/verinova.md' description: VeriNova (retired alias) — Sohbet (LLM). --- # verinova ::: warning Emekli model Bu model emekliye ayrıldı; isteğiniz otomatik olarak şu modele yönlendirilir: [`verinova-large`](/models/verinova-large). ::: ## İlgili * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/verinova-large.md' description: >- A high-capacity, self-hosted chat (LLM) model based on Qwen3-30B-A3B-Instruct (Q8), running on our own GPU infrastructure. Stronger than verinova-stable… --- # verinova-large ## What is this model? A high-capacity, self-hosted chat (LLM) model based on Qwen3-30B-A3B-Instruct (Q8), running on our own GPU infrastructure. Stronger than `verinova-stable` for harder tasks and longer context. Supports both chat (`/v1/chat/completions`) and classic completion (`/v1/completions`). ## Capability & type | | | |---|---| | **Capability** | Chat (LLM) — [Capability page](/en/capabilities/chat) | | **Model type** | Language model (LLM) (type=1) | | **Base model** | Qwen3-30B-A3B-Instruct-2507 (Q8) | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/chat/completions ``` **Secondary endpoints:** * `POST /v1/completions` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `verinova-large` | | `messages` | array | ✓ | OpenAI role/content message list | | `stream` | bool | — | `true` → SSE stream | | `max_tokens` | int | — | Max tokens to generate | | `temperature` | number | — | 0–2 | ## Response schema ```json { "id": "chatcmpl-...", "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} } ``` ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova-large", "messages": [{"role": "user", "content": "Hello, world"}] }' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") resp = client.chat.completions.create( model="verinova-large", messages=[{"role": "user", "content": "Hello, world"}], ) print(resp.choices[0].message.content) ``` ### JavaScript ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_KEY, baseURL: "https://app.qevron.ai/v1" }); const resp = await client.chat.completions.create({ model: "verinova-large", messages: [{ role: "user", content: "Hello, world" }], }); console.log(resp.choices[0].message.content); ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.0005 | $0.001 | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Notes & quirks * This is Qevron's default recommended chat model (`GET /v1/capabilities` → `LLM_CHAT`). * Requests for the retired alias `verinova` are routed to this model. ## Limits & constraints * Context window: 32K tokens (server default). ## Related * Capability page: [Chat (LLM)](/en/capabilities/chat) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/verinova-large.md' description: >- Qwen3-30B-A3B-Instruct (Q8) tabanlı, kendi GPU altyapımızda çalışan yüksek kapasiteli sohbet (LLM) modelidir. Daha zorlu görevler ve daha uzun bağlam için… --- # verinova-large ## Bu model nedir? Qwen3-30B-A3B-Instruct (Q8) tabanlı, kendi GPU altyapımızda çalışan yüksek kapasiteli sohbet (LLM) modelidir. Daha zorlu görevler ve daha uzun bağlam için `verinova-stable`'a göre daha güçlüdür. Sohbet (`/v1/chat/completions`) yanında klasik tamamlama (`/v1/completions`) da destekler. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Sohbet (LLM) — [Yetenek sayfası](/capabilities/chat) | | **Model türü** | Dil modeli (LLM) (type=1) | | **Temel model** | Qwen3-30B-A3B-Instruct-2507 (Q8) | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/chat/completions ``` **İkincil uç noktalar:** * `POST /v1/completions` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `verinova-large` | | `messages` | array | ✓ | OpenAI rol/içerik mesaj listesi | | `stream` | bool | — | `true` → SSE akışı | | `max_tokens` | int | — | Üretilecek azami token | | `temperature` | number | — | 0–2 | ## Yanıt şeması ```json { "id": "chatcmpl-...", "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} } ``` ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova-large", "messages": [{"role": "user", "content": "Hello, world"}] }' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") resp = client.chat.completions.create( model="verinova-large", messages=[{"role": "user", "content": "Hello, world"}], ) print(resp.choices[0].message.content) ``` ### JavaScript ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_KEY, baseURL: "https://app.qevron.ai/v1" }); const resp = await client.chat.completions.create({ model: "verinova-large", messages: [{ role: "user", content: "Hello, world" }], }); console.log(resp.choices[0].message.content); ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.0005 | $0.001 | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## Notlar ve özellikler * Bu, Qevron'un varsayılan önerilen sohbet modelidir (`GET /v1/capabilities` → `LLM_CHAT`). * `verinova` (emekli takma ad) istekleri bu modele yönlendirilir. ## Sınırlar ve kısıtlar * Bağlam penceresi: 32K token (sunucu varsayılanı). ## İlgili * Yetenek sayfası: [Sohbet (LLM)](/capabilities/chat) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/verinova-stable.md' description: >- A fast, self-hosted chat (LLM) model based on Gemma 4 12B, running on our own GPU infrastructure. Lighter than verinova-large; thinking mode is OFF by… --- # verinova-stable ## What is this model? A fast, self-hosted chat (LLM) model based on Gemma 4 12B, running on our own GPU infrastructure. Lighter than `verinova-large`; **thinking mode is OFF by default**, so replies come back immediately. A good general-purpose API default. ## Capability & type | | | |---|---| | **Capability** | Chat (LLM) — [Capability page](/en/capabilities/chat) | | **Model type** | Language model (LLM) (type=1) | | **Base model** | Gemma 4 12B Instruct (Q8) | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | ✓ supported | ## Endpoint ``` POST /v1/chat/completions ``` **Secondary endpoints:** * `POST /v1/completions` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `verinova-stable` | | `messages` | array | ✓ | OpenAI role/content message list | | `stream` | bool | — | `true` → SSE stream | | `max_tokens` | int | — | Max tokens to generate | | `temperature` | number | — | 0–2 | ## Response schema ```json { "id": "chatcmpl-...", "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} } ``` ## Streaming Add `"stream": true`; the server replies incrementally over Server-Sent Events. ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova-stable", "messages": [{"role": "user", "content": "Hello, world"}] }' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") resp = client.chat.completions.create( model="verinova-stable", messages=[{"role": "user", "content": "Hello, world"}], ) print(resp.choices[0].message.content) ``` ### JavaScript ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_KEY, baseURL: "https://app.qevron.ai/v1" }); const resp = await client.chat.completions.create({ model: "verinova-stable", messages: [{ role: "user", content: "Hello, world" }], }); console.log(resp.choices[0].message.content); ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.0005 | $0.001 | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Notes & quirks ::: tip Thinking mode — per request `verinova-stable` answers directly without reasoning by default (fast). To get step-by-step reasoning, enable it per request: ```json { "model": "verinova-stable", "messages": [{"role": "user", "content": "What is 17 * 23?"}], "chat_template_kwargs": {"enable_thinking": true} } ``` When enabled, the model emits its reasoning in a separate `reasoning_content` field before the visible answer — with a small `max_tokens` the visible `content` can come back empty, so budget enough tokens. ::: ## Limits & constraints * Context window: 16K tokens (server default). * The retired alias `verinova` routes to `verinova-large`, not to this model. ## Related * Capability page: [Chat (LLM)](/en/capabilities/chat) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/verinova-stable.md' description: >- Gemma 4 12B tabanlı, kendi GPU sunucumuzda çalışan hızlı bir sohbet (LLM) modelidir. verinova-large'a göre daha hafiftir; düşünme (thinking) modu… --- # verinova-stable ## Bu model nedir? Gemma 4 12B tabanlı, kendi GPU sunucumuzda çalışan hızlı bir sohbet (LLM) modelidir. `verinova-large`'a göre daha hafiftir; **düşünme (thinking) modu varsayılan olarak KAPALIDIR**, böylece yanıtlar anında döner. Genel amaçlı API kullanımı için uygundur. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Sohbet (LLM) — [Yetenek sayfası](/capabilities/chat) | | **Model türü** | Dil modeli (LLM) (type=1) | | **Temel model** | Gemma 4 12B Instruct (Q8) | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | ✓ destekleniyor | ## Uç nokta ``` POST /v1/chat/completions ``` **İkincil uç noktalar:** * `POST /v1/completions` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `verinova-stable` | | `messages` | array | ✓ | OpenAI rol/içerik mesaj listesi | | `stream` | bool | — | `true` → SSE akışı | | `max_tokens` | int | — | Üretilecek azami token | | `temperature` | number | — | 0–2 | ## Yanıt şeması ```json { "id": "chatcmpl-...", "object": "chat.completion", "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0} } ``` ## Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer $QEVRON_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "verinova-stable", "messages": [{"role": "user", "content": "Hello, world"}] }' ``` ### Python ```python from openai import OpenAI client = OpenAI(api_key="$QEVRON_KEY", base_url="https://app.qevron.ai/v1") resp = client.chat.completions.create( model="verinova-stable", messages=[{"role": "user", "content": "Hello, world"}], ) print(resp.choices[0].message.content) ``` ### JavaScript ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.QEVRON_KEY, baseURL: "https://app.qevron.ai/v1" }); const resp = await client.chat.completions.create({ model: "verinova-stable", messages: [{ role: "user", content: "Hello, world" }], }); console.log(resp.choices[0].message.content); ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.0005 | $0.001 | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## Notlar ve özellikler ::: tip Düşünme (thinking) modu — istek başına `verinova-stable` varsayılan olarak düşünmeden, doğrudan yanıt verir (hızlı). Adım adım muhakeme istiyorsanız istek başına açın: ```json { "model": "verinova-stable", "messages": [{"role": "user", "content": "17 * 23 kaçtır?"}], "chat_template_kwargs": {"enable_thinking": true} } ``` Açıkken model, görünür yanıttan önce muhakemesini ayrı bir `reasoning_content` alanında üretir — küçük bir `max_tokens` verirseniz görünür `content` boş gelebilir, bu yüzden yeterli bütçe ayırın. ::: ## Sınırlar ve kısıtlar * Bağlam penceresi: 16K token (sunucu varsayılanı). * `verinova` (emekli takma ad) bu modele değil, `verinova-large`'a yönlenir. ## İlgili * Yetenek sayfası: [Sohbet (LLM)](/capabilities/chat) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/models/verirerag.md' description: >- A self-hosted reranking model based on BAAI/bge-reranker-large. It takes a query and a list of documents and returns a relevance score per document,… --- # verirerag ## What is this model? A self-hosted reranking model based on BAAI/bge-reranker-large. It takes a query and a list of documents and returns a relevance score per document, surfacing the most relevant passages for RAG (retrieval-augmented generation). ## Capability & type | | | |---|---| | **Capability** | Rerank — [Capability page](/en/capabilities/embedding) | | **Model type** | Rerank (type=10) | | **Base model** | BAAI/bge-reranker-large | | **Provider** | `arpanet` (local / self-hosted) | | **Streaming** | — | ## Endpoint ``` POST /v1/rerank ``` Base URL: `https://app.qevron.ai/v1` ## Authentication Every request needs the `Authorization: Bearer ` header. ``` Authorization: Bearer ``` ## Request schema & parameters | Parameter | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | `verirerag` | | `query` | string | ✓ | The ranking query | | `documents` | string\[] | ✓ | Documents to rank | | `top_n` | int | — | Return top N | ## Response schema ```json { "results": [ {"index": 0, "relevance_score": 0.98, "document": {"text": "..."}}, {"index": 2, "relevance_score": 0.71, "document": {"text": "..."}} ] } ``` ## Code examples ### curl ```bash curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "What is the capital of France?", "documents": ["Paris is the capital of France.", "Berlin is in Germany.", "The Eiffel Tower is in Paris."], "top_n": 2 }' ``` ### Python ```python import requests r = requests.post("https://app.qevron.ai/v1/rerank", headers={"Authorization": "Bearer $QEVRON_KEY"}, json={"model": "verirerag", "query": "What is the capital of France?", "documents": ["Paris is the capital of France.", "Berlin is in Germany."], "top_n": 2}) print(r.json()) ``` ## Pricing | Input | Output | Unit | |---|---|---| | $0.00003 | — | 1K tokens | ## Rate limits RPM/TPM are governed by your group quota. Check your current quota with: `GET /v1/dashboard/billing/quota`. ## Notes & quirks * The public API endpoint is **OpenAI/Cohere-style**: send `query` + `documents` (an array of strings) in the body. * Results come back sorted by `relevance_score` descending; limit with `top_n`. ::: tip TEI compatibility On some internal TEI-based channels the fields are renamed to `texts` / `return_text` — Qevron does that conversion for you; on the **public endpoint use `documents`**. ::: ## Limits & constraints * The output is relevance scores for query–document pairs, not an embedding; for direct vector search use [veriEmbedding](/en/models/veriEmbedding). ## Related * Capability page: [Rerank](/en/capabilities/embedding) * All local models: [Local Models](/en/models/) --- --- url: 'https://docs.qevron.ai/models/verirerag.md' description: >- BAAI/bge-reranker-large tabanlı, kendi altyapımızda çalışan bir yeniden sıralama (rerank) modelidir. Bir sorgu ve bir belge listesi alır; her belge için… --- # verirerag ## Bu model nedir? BAAI/bge-reranker-large tabanlı, kendi altyapımızda çalışan bir yeniden sıralama (rerank) modelidir. Bir sorgu ve bir belge listesi alır; her belge için alaka skoru döndürerek RAG (retrieval-augmented generation) için en alakalı parçaları öne çıkarır. ## Yetenek ve tür | | | |---|---| | **Yetenek** | Yeniden Sıralama — [Yetenek sayfası](/capabilities/embedding) | | **Model türü** | Yeniden sıralama (rerank) (type=10) | | **Temel model** | BAAI/bge-reranker-large | | **Sağlayıcı** | `arpanet` (yerel / self-hosted) | | **Akış** | — | ## Uç nokta ``` POST /v1/rerank ``` Base URL: `https://app.qevron.ai/v1` ## Kimlik doğrulama Tüm istekler `Authorization: Bearer ` başlığı ister. ``` Authorization: Bearer ``` ## İstek şeması ve parametreler | Parametre | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | `verirerag` | | `query` | string | ✓ | Sıralama sorgusu | | `documents` | string\[] | ✓ | Sıralanacak belgeler | | `top_n` | int | — | Dönecek en iyi N | ## Yanıt şeması ```json { "results": [ {"index": 0, "relevance_score": 0.98, "document": {"text": "..."}}, {"index": 2, "relevance_score": 0.71, "document": {"text": "..."}} ] } ``` ## Kod örnekleri ### curl ```bash curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer $QEVRON_KEY" -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "What is the capital of France?", "documents": ["Paris is the capital of France.", "Berlin is in Germany.", "The Eiffel Tower is in Paris."], "top_n": 2 }' ``` ### Python ```python import requests r = requests.post("https://app.qevron.ai/v1/rerank", headers={"Authorization": "Bearer $QEVRON_KEY"}, json={"model": "verirerag", "query": "What is the capital of France?", "documents": ["Paris is the capital of France.", "Berlin is in Germany."], "top_n": 2}) print(r.json()) ``` ## Fiyatlandırma | Girdi | Çıktı | Birim | |---|---|---| | $0.00003 | — | 1K token | ## Hız limitleri RPM/TPM grubunuzun kotasına bağlıdır. Mevcut kotanızı görmek için: `GET /v1/dashboard/billing/quota`. ## Notlar ve özellikler * Genel API uç noktası **OpenAI/Cohere tarzıdır**: gövdede `query` + `documents` (string dizisi) gönderin. * Sonuçlar `relevance_score`'a göre azalan sırada döner; `top_n` ile sınırlayabilirsiniz. ::: tip TEI uyumluluğu Bazı dahili TEI tabanlı kanallarda alan adları `texts` / `return_text` olarak yeniden adlandırılır — bu dönüşüm Qevron tarafında otomatik yapılır; siz **public uç noktada `documents` kullanın**. ::: ## Sınırlar ve kısıtlar * Çıktı bir embedding değil, sorgu-belge çiftleri için skorlardır; doğrudan vektör araması için [veriEmbedding](/models/veriEmbedding) kullanın. ## İlgili * Yetenek sayfası: [Yeniden Sıralama](/capabilities/embedding) * Tüm yerel modeller: [Yerel Modeller](/models/) --- --- url: 'https://docs.qevron.ai/en/api/video.md' --- # Video Generation Because video generation takes a while, it works **asynchronously**: you start a job, poll its status, and download the video once it's ready. ## 1. Start a job ### Request parameters | Field | Type | Required | Description | |---|---|---|---| | `model` | string | ✓ | Video model | | `prompt` | string | ✓ | Video description | | `width` | integer | | Width (pixels) | | `height` | integer | | Height (pixels) | | `n_seconds` | integer | | Video length (seconds) | | `n_variants` | integer | | Number of variants to generate | ```bash curl https://app.qevron.ai/v1/video/generations/jobs \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "", "prompt": "A robot walking on the beach, cinematic", "width": 1280, "height": 720, "n_seconds": 5, "n_variants": 1 }' ``` ### Response ```json { "object": "video.generation.job", "id": "vidjob_abc123", "status": "queued", "created_at": 1716200000, "prompt": "A robot walking on the beach, cinematic", "model": "" } ``` `status` values: `queued`, `processing`, `running`, `succeeded`, `failed`. ## 2. Poll status ```bash curl https://app.qevron.ai/v1/video/generations/jobs/vidjob_abc123 \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` Poll at intervals until `status` is `succeeded`. When complete, the response includes a `generations` list. ## 3. Download the video ```bash curl https://app.qevron.ai/v1/video/generations/vidjob_abc123/content/video \ -H "Authorization: Bearer $QEVRON_API_KEY" \ --output video.mp4 ``` The response is binary video data. ::: tip This workflow mirrors OpenAI's video generation API: create → wait → download. ::: --- --- url: 'https://docs.qevron.ai/api/video.md' --- # Video Üretimi Video üretimi uzun sürdüğü için **asenkron** çalışır: bir iş (job) başlatırsınız, durumunu sorgularsınız, hazır olunca videoyu indirirsiniz. ## 1. İş başlatma ### İstek parametreleri | Alan | Tip | Zorunlu | Açıklama | |---|---|---|---| | `model` | string | ✓ | Video modeli | | `prompt` | string | ✓ | Video açıklaması | | `width` | integer | | Genişlik (piksel) | | `height` | integer | | Yükseklik (piksel) | | `n_seconds` | integer | | Video süresi (saniye) | | `n_variants` | integer | | Üretilecek varyant sayısı | ```bash curl https://app.qevron.ai/v1/video/generations/jobs \ -H "Authorization: Bearer $QEVRON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "", "prompt": "Sahilde yürüyen bir robot, sinematik", "width": 1280, "height": 720, "n_seconds": 5, "n_variants": 1 }' ``` ### Yanıt ```json { "object": "video.generation.job", "id": "vidjob_abc123", "status": "queued", "created_at": 1716200000, "prompt": "Sahilde yürüyen bir robot, sinematik", "model": "" } ``` `status` değerleri: `queued`, `processing`, `running`, `succeeded`, `failed`. ## 2. Durum sorgulama ```bash curl https://app.qevron.ai/v1/video/generations/jobs/vidjob_abc123 \ -H "Authorization: Bearer $QEVRON_API_KEY" ``` `status` `succeeded` olana kadar belirli aralıklarla sorgulayın (polling). Tamamlandığında yanıt `generations` listesi içerir. ## 3. Videoyu indirme ```bash curl https://app.qevron.ai/v1/video/generations/vidjob_abc123/content/video \ -H "Authorization: Bearer $QEVRON_API_KEY" \ --output video.mp4 ``` Yanıt ikili (binary) video verisidir. ::: tip Bu iş akışı OpenAI'nin video üretim API'si ile aynı şekilde tasarlanmıştır: oluştur → bekle → indir. ::: --- --- url: 'https://docs.qevron.ai/en/guides/vision.md' --- # Vision Vision-capable models (e.g. `spook-vision`, `spook-ocr`, `spook-detect`) can "see" an image and answer questions about it. You add the image inside the chat message as multi-part content. ## Ways to send the image There are two ways: 1. **Public URL** — The image is at a publicly reachable address. 2. **Base64 data URL** — Embed the image as `data:image/jpeg;base64,...` (for local files). ## Example (with base64) ```python import os, base64 from openai import OpenAI client = OpenAI(api_key=os.environ["QEVRON_API_KEY"], base_url="https://app.qevron.ai/v1") with open("photo.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = client.chat.completions.create( model="spook-vision", messages=[ { "role": "user", "content": [ {"type": "text", "text": "What do you see in this image?"}, {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64}"}}, ], } ], ) print(resp.choices[0].message.content) ``` ## Example (with URL) ```json { "model": "spook-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image." }, { "type": "image_url", "image_url": { "url": "https://example.com/photo.jpg" } } ] } ] } ``` ## Models for image tasks | Model | Task | |---|---| | `spook-vision` | Describe / Q\&A about an image | | `spook-ocr` | Extract text from an image (OCR) | | `spook-detect` | Detect objects in an image | ## Tips ::: tip Downscale the image Very large images are slow and may hit the request size limit (413 error). Before sending, downscale the image to a reasonable size (e.g. max 1280 px) and compress as JPEG. ::: * Don't attach an image for text-only questions; sending an image to a non-vision model (e.g. `verinova`) will error. * You can send multiple images in one message (add several `image_url` items to the content array). Related: [Chat API — Vision](/en/api/chat#vision). --- --- url: 'https://docs.qevron.ai/en/capabilities/vision-vqa.md' --- # Visual Q\&A (VQA) Give an image and a question — the model "reads" the image and answers. OpenAI vision format — the image is embedded as an `image_url` content block inside the chat completion. ## Available models | Model | Note | |---|---| | **`spook-vision`** *(recommended, local)* | Multimodal, fast, GPU-backed | | `gpt-4o` | Via OpenAI — top quality, higher cost | | `claude-3-5-sonnet` | Via Anthropic | ## curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-vision", "messages": [{ "role": "user", "content": [ {"type": "text", "text": "What is in this image?"}, {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}} ] }] }' ``` ## Python (openai SDK) ```python import base64 from openai import OpenAI client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1") with open("photo.jpg", "rb") as f: b64 = base64.b64encode(f.read()).decode() resp = client.chat.completions.create( model="spook-vision", messages=[{ "role": "user", "content": [ {"type": "text", "text": "How many people are in this photo and what are they doing?"}, {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64}"}}, ], }], ) print(resp.choices[0].message.content) ``` URL works too: ```python {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}} ``` ## Size limits * Maximum payload: **50 MB** (data URL + JSON, whole body). * Recommended: client-side downscale to 1280 px max width + JPEG quality 0.85 → ~150–300 KB. * Larger images may hit a 413 at the ingress (nginx/Caddy). ## Which model for vision? | Need | Model | |---|---| | "What's in this image?" — general description | `spook-vision` | | Detailed analysis / reasoning | `gpt-4o` (needs OpenAI key) | | Extracting text from image (OCR) | `spook-ocr` — dedicated endpoint, [OCR page](/en/capabilities/vision-ocr) | | Bounding boxes / object counts | `spook-detect` — dedicated endpoint, [Detect page](/en/capabilities/vision-detect) | ## Troubleshooting * **"413 Request Entity Too Large"** → image too big. Downscale + compress client-side. * **"image format not supported"** → use `data:image/png;base64,...` or `data:image/jpeg;base64,...` prefix. * **Wrong answer** → ask more specifically. "What's in the image?" is vague; "How many dogs?" is much more reliable. Next: [OCR](/en/capabilities/vision-ocr) · [Object detection](/en/capabilities/vision-detect) --- --- url: 'https://docs.qevron.ai/en/getting-started/introduction.md' --- # What is Qevron? Qevron is an **AI gateway** — a single front door to many AI models. Your application connects to one API, and Qevron routes each request to the right provider behind the scenes (OpenAI, Anthropic, Google Gemini, local models and 38+ providers). ## What does an AI gateway do? Suppose your app has a chat assistant, a search feature and an image generator. Normally each needs its own provider, API key, SDK and bill. A gateway removes that complexity: * **One API key** — A single `sk-...` key for all models. * **One address** — Everything under `https://app.qevron.ai/v1`. * **One format** — OpenAI's API shape. Nothing new to learn. * **One dashboard** — Usage, quota and cost in one place. ``` ┌────────────┐ one API ┌──────────┐ ┌─────────────────┐ │ Your │ ─────────────────▶ │ │ ───▶ │ OpenAI │ │ app │ Bearer sk-... │ Qevron │ ───▶ │ Anthropic │ │ │ ◀───────────────── │ gateway │ ───▶ │ Gemini │ └────────────┘ response │ │ ───▶ │ Local models │ └──────────┘ └─────────────────┘ ``` ## Who is it for? * **Beginners** — Make your first AI request with a single `curl`. No SDK required. * **Developers** — Just change the base URL in your existing OpenAI/Anthropic SDK; everything else stays the same. * **Teams** — Manage many providers in one place and hand out quota-limited keys to members. ## What can Qevron do? | Capability | Description | API | |---|---|---| | **Chat** | Text generation, tool calling, vision, streaming | [`/v1/chat/completions`](/en/api/chat) | | **Embeddings** | Turn text into vectors (search, RAG) | [`/v1/embeddings`](/en/api/embeddings) | | **Rerank** | Sort a document list by relevance | [`/v1/rerank`](/en/api/rerank) | | **Image generation** | Text-to-image, image editing | [`/v1/images/*`](/en/api/images) | | **Audio** | Text-to-speech (TTS), speech-to-text (STT) | [`/v1/audio/*`](/en/api/audio) | | **Video** | Asynchronous video generation | [`/v1/video/*`](/en/api/video) | | **Anthropic / Gemini** | These providers' native formats | [`/v1/messages`](/en/api/anthropic), [`/v1beta/...`](/en/api/gemini) | ## Why "OpenAI compatible"? OpenAI's API shape has become the de-facto standard. Because Qevron speaks it, almost every tool, library and SDK that works with OpenAI (Python `openai`, JavaScript `openai`, LangChain, LlamaIndex, etc.) also works with Qevron — all you change is the `base_url`. ::: tip Next step Want to try it now? Head to the [Quickstart](/en/getting-started/quickstart) and make your first request in 5 minutes. ::: --- --- url: 'https://docs.qevron.ai/capabilities/rerank.md' --- # Yeniden Sıralama (Rerank) Bir arama sorgusu ve aday belge listesi verir, hangi belgenin sorguyu en iyi cevapladığına dair daha sağlam bir sıralama alırsın. Embedding bazlı top-K seçiminden sonraki ikinci geçiş katmanı. ## Mevcut modeller | Model | Tür | |---|---| | **`verirerag`** *(önerilen)* | TEI (Text Embeddings Inference) cross-encoder, multilingual | | Cohere `rerank-multilingual-v3.0` | Cohere anahtarı ekli channel'da | ## Niye rerank? Embedding similarity hızlıdır (vektör çarpımı), ama "yakın komşu" her zaman "doğru cevap" değildir. Cross-encoder her (sorgu, belge) çiftine bakıp gerçekten alaka derecesini hesaplar. Yavaştır — bu yüzden önce embedding ile 50–100'e indirir, sonra rerank ile gerçek top-3'ü seçeriz. ``` [embedding ile 5000 belge → top 50] → [verirerag ile top 50 → top 5] ``` ## curl ```bash curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "qevron nedir", "documents": [ "Bugün hava güzel.", "Qevron bir AI gateway uygulamasıdır.", "Kanal yapısı OpenAI uyumludur.", "Türkçe ve İngilizce desteklenir." ] }' ``` ## Yanıt ```json { "results": [ {"index": 1, "relevance_score": 0.96, "document": {"text": "Qevron bir AI gateway uygulamasıdır."}}, {"index": 2, "relevance_score": 0.62, "document": {"text": "Kanal yapısı OpenAI uyumludur."}}, {"index": 3, "relevance_score": 0.18, "document": {"text": "Türkçe ve İngilizce desteklenir."}}, {"index": 0, "relevance_score": 0.02, "document": {"text": "Bugün hava güzel."}} ] } ``` `index` orijinal `documents` array'indeki konumudur — kendi belge metadata'na erişmek için bunu kullan. ## Python (raw requests — OpenAI SDK rerank desteklemiyor) ```python import requests resp = requests.post( "https://app.qevron.ai/v1/rerank", headers={"Authorization": "Bearer sk-..."}, json={ "model": "verirerag", "query": "qevron nedir", "documents": ["d1", "d2", "d3"], }, ) results = resp.json()["results"] # results sorted by relevance_score desc ``` ## RAG'da nereye girer? ```python # 1) embedding ile aday seç candidates = vector_db.search(embed(user_query), top_k=50) # 2) rerank ile gerçek alakayı bul reranked = rerank("verirerag", user_query, [c.text for c in candidates]) # 3) en alakalı 3'ünü LLM'e context olarak ver top_3 = [candidates[r["index"]] for r in reranked[:3]] ``` ## Sorun çözme * **Skor hep çok düşük (< 0.05)** → query muhtemelen documents'la hiç eşleşmiyor. Önce embedding sonuçlarına bak — aday seçimi yanlış olabilir. * **Yavaş** → 100+ doküman çok ağır. Önce embedding ile 50'ye indir. * **OpenAI SDK çalışmıyor** → Doğru. Rerank OpenAI standardında yok; raw `requests`/`httpx` kullan. Devam: [Embedding](/capabilities/embedding) · [RAG rehberi](/guides/rag-embeddings) --- --- url: 'https://docs.qevron.ai/models.md' description: Qevron yerel modellerinin tam listesi ve yetenek matrisi. --- # Yerel Modeller Aşağıdakiler Qevron tarafından kendi altyapımızda barındırılan (self-hosted) modellerdir. Hepsine `https://app.qevron.ai/v1` üzerinden OpenAI uyumlu API ile erişilir. | Model | Yetenek | Uç nokta | Fiyat (girdi/çıktı, 1K) | |---|---|---|---| | [`blab-fast-en-emma`](/models/blab-fast-en-emma) | Metinden Sese (TTS) | `POST /v1/audio/speech` | $0.001 | | [`blab-fast-tr-naz`](/models/blab-fast-tr-naz) | Metinden Sese (TTS) | `POST /v1/audio/speech` | $0.001 | | [`blab-stable`](/models/blab-stable) | Metinden Sese (TTS) | `POST /v1/audio/speech` | $0.001 | | [`blab-tts`](/models/blab-tts) | Metinden Sese (TTS) | `POST /v1/audio/speech` | $0.005 | | [`solab-stt`](/models/solab-stt) | Sesten Metne (STT) | `POST /v1/audio/transcriptions` | $0.003 | | [`spook-background`](/models/spook-background) | Arka Plan Kaldırma | `POST /v1/vision/background (preferred) | POST /api/channel/:id/custom_test (legacy)` | — | | [`spook-detect`](/models/spook-detect) | Nesne Tespiti | `POST /v1/vision/detect (preferred) | POST /api/channel/:id/custom_test (legacy)` | — | | [`spook-generate`](/models/spook-generate) | Görsel Üretimi | `POST /v1/images/generations` | — | | [`spook-ocr`](/models/spook-ocr) | Görselden Metin (OCR) | `POST /v1/vision/ocr (preferred) | POST /api/channel/:id/custom_test (legacy)` | — | | [`spook-vision`](/models/spook-vision) | Görsel Anlama (VQA) | `POST /v1/chat/completions (with image_url content)` | — | | [`veriEmbedding`](/models/veriEmbedding) | Embedding (Vektör) | `POST /v1/embeddings` | $0.00002 | | [`verinova-large`](/models/verinova-large) | Sohbet (LLM) | `POST /v1/chat/completions` | $0.0005 / $0.001 | | [`verinova-stable`](/models/verinova-stable) | Sohbet (LLM) | `POST /v1/chat/completions` | $0.0005 / $0.001 | | [`verirerag`](/models/verirerag) | Yeniden Sıralama | `POST /v1/rerank` | $0.00003 | > Harici sağlayıcı modelleri (OpenAI, Anthropic, Gemini, ...) için: [Harici sağlayıcılar](/models/external-providers). --- --- url: 'https://docs.qevron.ai/guides/local-models.md' --- # Yerel Modeller Kataloğu Qevron, kendi GPU sunucularımızda çalışan **kendi modellerimizi** üçüncü taraf API'ler (OpenAI / Anthropic / Gemini) ile **aynı arayüzden** sunar. Müşteri / istemci tarafında tek değişen şey: istek gövdesindeki `"model"` alanı. Bu sayfa, anlık olarak çalışan tüm yerel modelleri, hangi tip işi yaptığını ve **nasıl çağrılacağını** tek tabloda toparlar. ## Hızlı tablo | Model adı | Tip | Açıklama | Endpoint (qevron üzerinden) | |---|---|---|---| | `verinova` | chat | gpt-oss-20b Q8 — **reasoning kapalı**, telefonda hızlı yanıt | `POST /v1/chat/completions` | | `verinova-large` | chat | Qwen3-30B-A3B-Instruct (Q8 MoE) — **reasoning açık**, zengin/detaylı yanıt | `POST /v1/chat/completions` | | `veriEmbedding` | embedding | Çok dilli embedding (vLLM) | `POST /v1/embeddings` | | `verirerag` | rerank | TEI cross-encoder; arama sonuçlarını sıralar | `POST /v1/rerank` | | `solab-stt` | stt | Whisper TR/EN — sesten metne | `POST /v1/audio/transcriptions` | | `blab-tts` | tts | Piper TTS (CPU) — kısa metinlere uygun | `POST /v1/audio/speech` | | `blab-fast-tr-naz` | tts | Piper GPU — Türkçe Naz sesi | `POST /v1/audio/speech` | | `blab-fast-en-emma` | tts | Piper GPU — İngilizce Emma sesi | `POST /v1/audio/speech` | | `blab-stable` | tts | Supertonic v3 — yüksek kalite, doğal ton | `POST /v1/audio/speech` | | `spook-vision` | vision | Görsel anlama / VQA | `POST /v1/chat/completions` (image input) | | `spook-detect` | detect | Nesne tespiti — bbox listesi | `POST /api/channel/:id/custom_test` | | `spook-background` | image | Arka plan kaldırma / değiştirme | `POST /api/channel/:id/custom_test` | | `spook-ocr` | ocr | Görseldeki yazıyı çıkar | `POST /api/channel/:id/custom_test` | | `spook-generate` | image | Metinden görsel üretimi | `POST /v1/images/generations` | ::: tip Önemli **Hangi sunucuda, hangi portta çalıştığını bilmenize gerek yok.** Tüm istekler Qevron gateway üzerinden (`http://localhost:3001` içerden, `https://app.qevron.ai` dışarıdan) geçer. Qevron, model adına bakıp arkadaki uygun channel'a yönlendirir. Sunucular taşınınca, eklenince, çıkınca kod değişikliği gerekmez. ::: ## Bağlantı temelleri İki ortam, iki base URL: | Nereden? | Base URL | API anahtarı | |---|---|---| | Aynı makinedeki servisler (calleague-platform, callekit-agents, vb.) | `http://localhost:3001` | `QEVRON_API_KEY` (= qevron `ADMIN_KEY`) | | Dış / SaaS istemciler, tarayıcı SDK'ları | `https://app.qevron.ai` | Kullanıcının kendi `sk-...` anahtarı | Yetkilendirme her iki durumda da aynı başlıkla: ``` Authorization: Bearer ``` ### Tek bir model neden iki farklı kanalda olabilir? (verinova örneği) Bazen aynı modelin **iki ayarı** birden istenir. Örnek: * **`verinova`** → CalleKit telefon ajanı için hızlı, kısa cevap (reasoning kapalı). Bu kanal port **8903**'te çalışır — kanal #9. * **`verinova-large`** → Doküman / chatbot tarafı için detaylı, "düşünerek" cevap (reasoning açık). Bu farklı bir model (Qwen3 30B), kanal #143, port **8907**. Çağıran taraf hangi davranışı istiyorsa **model adını** ona göre verir. Aynı modelin iki kez kanal olarak eklenmesi gerekmez — bu **kafa karışıklığı** yaratır ve Qevron'un yük dağıtıcısı (distributor) ikisinden birini rastgele seçer, sonuçlar kararsız olur. ::: warning Yaygın hata "verinova" model adıyla **ikinci** bir kanal oluşturup base URL'yi `:8900` yazarsanız bağlantı reddedilir. Port 8900 `vllm` / `veriEmbedding` içindir — orada llama-server yok. **Verinova zaten kanal #9 olarak tanımlı**, ikincisini eklemenize gerek yok. ::: ## Chat — `verinova` / `verinova-large` ### curl ```bash curl https://app.qevron.ai/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verinova", "messages": [ {"role": "system", "content": "Kısa cevap ver."}, {"role": "user", "content": "1 + 1 kaç?"} ] }' ``` ### Python (openai SDK) ```python from openai import OpenAI client = OpenAI( api_key="sk-...", base_url="https://app.qevron.ai/v1", ) # Hızlı yanıt (telefon, kısa sohbet) fast = client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "Bana bir limerik yaz"}], ) # Detaylı / "düşünerek" yanıt (rapor, analiz) deep = client.chat.completions.create( model="verinova-large", messages=[{"role": "user", "content": "Bir SaaS ürününün PRD'sini tasarla"}], ) ``` ### Akış (streaming) `"stream": true` ekleyin; sunucu Server-Sent Events ile parça parça yanıt verir. SDK döngüsü: ```python for chunk in client.chat.completions.create( model="verinova", messages=[{"role": "user", "content": "..."}], stream=True, ): print(chunk.choices[0].delta.content or "", end="", flush=True) ``` ## Embedding — `veriEmbedding` ```bash curl https://app.qevron.ai/v1/embeddings \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "veriEmbedding", "input": ["merhaba dünya", "hello world"]}' ``` ```python emb = client.embeddings.create( model="veriEmbedding", input=["merhaba dünya", "hello world"], ) vectors = [item.embedding for item in emb.data] ``` ## Rerank — `verirerag` ```bash curl https://app.qevron.ai/v1/rerank \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "verirerag", "query": "qevron nedir", "documents": ["Qevron bir AI gateway'idir.", "Bugün hava güzel.", "Kanal yapısı OpenAI uyumludur."] }' ``` Yanıt, gönderdiğiniz `documents` dizisindeki indeksleri **alaka sırasına göre** döndürür (alan adı `results[].index` + `relevance_score`). ## STT (sesten metne) — `solab-stt` ```bash curl https://app.qevron.ai/v1/audio/transcriptions \ -H "Authorization: Bearer sk-..." \ -F "model=solab-stt" \ -F "file=@/yol/ses.wav" \ -F "language=tr" ``` ::: tip Dil ipucu `language` parametresi opsiyonel ama önerilen — Whisper'ın yanlış dile sapmasını engeller. Türkçe için `tr`, İngilizce için `en`. ::: ## TTS (metinden sese) — `blab-*` Aynı endpoint, üç farklı kalite/ses seçeneği: ```bash # Hızlı, CPU, kısa metinler (anlık duyuru) curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -d '{"model": "blab-tts", "input": "Merhaba", "voice": "tr"}' \ -o out.wav # GPU, Naz sesi (Türkçe) curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -d '{"model": "blab-fast-tr-naz", "input": "Tanıştığımıza memnun oldum"}' \ -o naz.wav # En kaliteli, doğal ton (uzun anlatım, ürün demosu) curl https://app.qevron.ai/v1/audio/speech \ -H "Authorization: Bearer sk-..." \ -d '{"model": "blab-stable", "input": "Qevron, kendi modellerinizi tek API ile sunar."}' \ -o stable.wav ``` Hangisini seçmeliyim? * **`blab-tts`** — Latans kritik, içerik kısa (bildirim, IVR menü). * **`blab-fast-*`** — Telefonda gerçek zamanlı konuşma; ses karakteri sabit (Naz/Emma). * **`blab-stable`** — Kalitenin önemli olduğu kayıtlar (eğitim videosu, ürün tanıtımı, podcast prototipi). ## Vision — `spook-vision` OpenAI'nin görsel girdi formatıyla çalışır. URL veya base64 data URL kabul eder. ```python resp = client.chat.completions.create( model="spook-vision", messages=[{ "role": "user", "content": [ {"type": "text", "text": "Bu görselde ne var?"}, {"type": "image_url", "image_url": {"url": "https://.../foto.jpg"}}, ], }], ) ``` ## Image generation — `spook-generate` ```bash curl https://app.qevron.ai/v1/images/generations \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{ "model": "spook-generate", "prompt": "İstanbul Boğazı, gün batımı, sinematik aydınlatma", "size": "1024x1024" }' ``` ## Yardımcı modeller — `spook-detect / -ocr / -background` Bu üçü saf OpenAI şemasına oturmadığı için, **admin "custom\_test" endpoint'i** üzerinden çağrılır: ```bash curl https://app.qevron.ai/api/channel/85/custom_test \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model": "spook-detect", "image": "data:image/jpeg;base64,..."}' ``` Channel ID'leri: spook-detect=85, spook-background=86, spook-ocr=87. (UI'da **Channels** sayfasından "Test" düğmesi ile interaktif denenebilir.) ## Calleague-platform tarafı Calleague projeleri Qevron'a iki ENV ile bağlanır: ```bash # .env QEVRON_URL=http://localhost:3001 # Aynı makinedeyseniz QEVRON_API_KEY= # qevron'un .env'indeki ADMIN_KEY ``` Pro / Plus akışlarda `[...path].ts` self-host handler'ı bu iki değeri okuyup OpenAI SDK'sini Qevron'a yönlendirir — kodda model adını değiştirmek yeterli. callekit-agents için: ```bash QEVRON_INTERNAL_URL=http://localhost:3001 QEVRON_API_KEY= ``` ## Sorun çözme ### "connection refused" %99 durumda **base URL yanlış porta gidiyor**. Doğru port qevron tarafında zaten tanımlı — kendi başınıza port belirlemeniz gerekmez. Qevron admin SPA'sında: 1. **/channel** sayfasına gidin 2. İlgili modeli arayın 3. "Test" düğmesine basın — 200 OK alıyorsa endpoint sağlam Hala hata varsa **/cluster/assignments** sayfasında ilgili runtime'ın **Actual** kolonuna bakın: * `active` → servis çalışıyor; sorun başka yerde (channel base\_url, ağ, vs.) * `inactive` / `failed` → servis kapalı; sağ taraftaki **Start** ile başlatın ### Yanıt çok yavaş * Önce **streaming**'i deniyor musunuz? (`"stream": true`) * `verinova-large` doğası gereği `verinova`'dan ~3-5 kat yavaştır (30B vs 20B + reasoning açık). * Uzun bağlamlarda token sayısını azaltın; `verinova` için `max_tokens: 256-512` mantıklı bir tavandır. ### "model not found" İstek gövdesindeki `"model"` değeri yukarıdaki tabloda olmalı. Tipik yanlışlar: `Verinova` (büyük harf), `verinova-large` yerine `verinova_large` (alt çizgi), eski isim `gpt-oss-20b`. Geçerli model listesi: ```bash curl https://app.qevron.ai/v1/models -H "Authorization: Bearer sk-..." ``` ## Daha fazlası * [API Genel Bakış](/api/overview) — tüm uç noktaların tam referansı * [Kimlik Doğrulama](/getting-started/authentication) — anahtar üretimi ve kota * [İlk Sohbet Botu](/guides/first-chatbot) — uçtan uca örnek * [RAG: Embedding + Rerank](/guides/rag-embeddings) — `veriEmbedding` + `verirerag` birlikte --- --- url: 'https://docs.qevron.ai/capabilities.md' --- # Yetenekler Qevron, AI dünyasının her temel "fiilini" tek API üzerinden sunar. Her bir yetenek için ne yaptığını, hangi modellerin kullanılabilir olduğunu, nasıl çağıracağını ve hangi durumda hangisini seçmen gerektiğini buradan göreceksin. ## Kategoriler ### Sohbet (Chat) * [Sohbet (LLM)](/capabilities/chat) — verinova / verinova-large / OpenAI / Anthropic * [Sohbet Akışı (Streaming)](/capabilities/chat#stream) — kelime kelime yanıt ### Ses (Voice) * [Sesten Metne (STT)](/capabilities/stt) — solab-stt / whisper * [Metinden Sese (TTS)](/capabilities/tts) — blab-stable / blab-fast / blab-tts ### Görsel Anlama (Vision) * [Görsel + Soru-Cevap (VQA)](/capabilities/vision-vqa) — spook-vision * [OCR — Görselden Metin](/capabilities/vision-ocr) — spook-ocr * [Nesne Tespiti](/capabilities/vision-detect) — spook-detect ### Görsel Üretim (Image) * [Görsel Üretimi (Text-to-Image)](/capabilities/image-gen) — spook-generate * [Arka Plan Kaldırma](/capabilities/background-removal) — spook-background ### Embedding & Arama * [Embedding (Vektör)](/capabilities/embedding) — veriEmbedding * [Yeniden Sıralama (Rerank)](/capabilities/rerank) — verirerag ## Hızlı bağlantı tablosu | Yetenek | Endpoint | Önerilen model | Akış (stream) | |---|---|---|---| | Sohbet | `POST /v1/chat/completions` | `verinova` | ✓ | | Detaylı sohbet (Qwen3 30B) | `POST /v1/chat/completions` | `verinova-large` | ✓ | | STT | `POST /v1/audio/transcriptions` | `solab-stt` | ✓ | | TTS | `POST /v1/audio/speech` | `blab-stable` | ✓ | | Embedding | `POST /v1/embeddings` | `veriEmbedding` | — | | Rerank | `POST /v1/rerank` | `verirerag` | — | | VQA | `POST /v1/chat/completions` (image input) | `spook-vision` | ✓ | | OCR | `POST /v1/vision/ocr` *(yeni)* | `spook-ocr` | — | | Nesne tespiti | `POST /v1/vision/detect` *(yeni)* | `spook-detect` | — | | Görsel üretimi | `POST /v1/images/generations` | `spook-generate` | — | | Arka plan | `POST /v1/vision/background` *(yeni)* | `spook-background` | — | ::: tip Admin UI'da canlı durum Hangi yeteneğin şu an aktif, hangi modelin önerildiğini görmek için **app.qevron.ai → Yetenekler** (`/capabilities`) sayfasına bak. Kart üzerindeki "Kopyala" düğmesi önerilen model adını panoya alır — direkt koduna yapıştır. ::: ## Çağrı temelleri İki ortam, iki base URL: | Nereden? | Base URL | API anahtarı | |---|---|---| | Aynı makine (calleague-platform, callekit-agents) | `http://localhost:3001` | `QEVRON_API_KEY` | | Dış istemci / SaaS / tarayıcı SDK'sı | `https://app.qevron.ai` | `sk-...` (senin anahtarın) | Her iki durumda da: ``` Authorization: Bearer ``` ## Sıradaki * [İlk Sohbet Botu](/guides/first-chatbot) — uçtan uca Python örneği * [RAG: Embedding + Rerank](/guides/rag-embeddings) — `veriEmbedding` + `verirerag` birlikte * [Yerel Modeller Kataloğu (Operatör referansı)](/guides/local-models) — model → channel → port haritası, hangi sunucuda neyin koştuğunu görmek için