---
title: OpenAI Embeddings | RunAPI
description: RunAPI'nin OpenAI uyumlu Embeddings işlemi aracılığıyla bir istek gönderin.
url: https://runapi.ai/tr/docs/api/openai/embeddings.md
canonical: https://runapi.ai/tr/docs/api/openai/embeddings
locale: tr
---

> HTML sürümü: https://runapi.ai/tr/docs/api/openai/embeddings
> Ajanlar için site dizini: https://runapi.ai/llms.txt

# OpenAI Embeddings

## Genel Bakış

RunAPI'nin OpenAI uyumlu Embeddings işlemini, uyumlu bir model ve protokolün istek ile yanıt şekilleriyle kullanın.

### Hızlı başlangıç

1. Bir API anahtarı oluşturun ve RUNAPI_API_KEY olarak ayarlayın.
2. Uyumlu bir model seçin, ardından belgelenen yol parametrelerini ve JSON gövdesini gönderin.
3. Bu işlem için gösterilen JSON yanıtını veya sunucu tarafından gönderilen olayları okuyun ve protokol hatalarını işleyin.

## Uç Nokta

POST /v1/embeddings

Temel URL: https://runapi.ai

Sözleşme sürümü: v1

Tercih edilen kimlik doğrulama: Authorization: Bearer YOUR_API_TOKEN

## Kimlik doğrulama taşıyıcıları

RunAPI aşağıda listelenen her taşıyıcıyı kabul eder. Oluşturulan örnekler, protokolün tercih ettiği başlığı kullanır.

- `Authorization: Bearer YOUR_API_TOKEN` (Tercih edilen)
- `x-api-key: YOUR_API_TOKEN`
- `x-goog-api-key: YOUR_API_TOKEN`
- `?key=YOUR_API_TOKEN`

## Uyumlu modeller

Güncel fiyatlandırma, hız sınırları ve ticari kullanım ayrıntıları için bir model sayfası açın.

- [text-embedding-3-large](https://runapi.ai/tr/models/gpt)
- [text-embedding-3-small](https://runapi.ai/tr/models/gpt)
- [text-embedding-ada-002](https://runapi.ai/tr/models/gpt)

## İstek sözleşmesi

Yalnızca hem genel protokol hem de RunAPI destek kanıtı olan alanlar listelenmektedir. Ek JSON gövde alanları doğrudan iletilir.

### JSON gövdesi

Gerekli: `model`, `input`

```json
{
  "dimensions": {
    "description": "Bunu destekleyen modeller için istenen çıktı vektör boyutları.",
    "type": "integer"
  },
  "encoding_format": {
    "description": "Döndürülen gömme vektörlerinin biçimi.",
    "type": "string"
  },
  "input": {
    "description": "Gömülecek metin veya token dizileri.",
    "type": [
      "string",
      "array"
    ]
  },
  "model": {
    "description": "RunAPI gömme modeli tanımlayıcısı.",
    "type": "string"
  }
}
```

### İstek örneği

```json
{
  "input": "The quick brown fox.",
  "model": "text-embedding-3-small"
}
```

## Eş zamanlı yanıt

HTTP 200

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "data": {
      "type": "array"
    },
    "model": {
      "type": "string"
    },
    "object": {
      "const": "list",
      "type": "string"
    },
    "usage": {
      "additionalProperties": true,
      "properties": {
        "prompt_tokens": {
          "type": "integer"
        },
        "total_tokens": {
          "type": "integer"
        }
      },
      "required": [
        "prompt_tokens",
        "total_tokens"
      ],
      "type": "object"
    }
  },
  "required": [
    "object",
    "data",
    "model",
    "usage"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "data": [
    {
      "embedding": [
        0.0023,
        -0.0093,
        0.0151
      ],
      "index": 0,
      "object": "embedding"
    }
  ],
  "model": "text-embedding-3-small",
  "object": "list",
  "usage": {
    "prompt_tokens": 5,
    "total_tokens": 5
  }
}
```

## Protokol hatası: invalid_request

HTTP 400

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "error": {
    "code": null,
    "message": "input is required",
    "param": "input",
    "type": "invalid_request_error"
  }
}
```

## Kullanım

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "prompt_tokens": {
      "type": "integer"
    },
    "total_tokens": {
      "type": "integer"
    }
  },
  "required": [
    "prompt_tokens",
    "total_tokens"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "prompt_tokens": 5,
  "total_tokens": 5
}
```

## Oluşturulan Kod Örnekleri

Her cURL, JavaScript ve Python örneği, protokole özgü bir SDK gerektirmeden bu sözleşmedeki doğrulanmış isteği gönderir.

### curl

```curl
curl -X POST https://runapi.ai/v1/embeddings \
  -H Authorization:\ Bearer\ YOUR_API_TOKEN \
  -H Content-Type:\ application/json \
  -d \{\"model\":\"text-embedding-3-small\",\"input\":\"The\ quick\ brown\ fox.\"\}
```

### javascript

```javascript
const response = await fetch("https://runapi.ai/v1/embeddings", {
  method: "POST",
  headers: {
  "Authorization": "Bearer YOUR_API_TOKEN",
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "model": "text-embedding-3-small",
  "input": "The quick brown fox."
})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
```

### python

#### Yükle

```bash
pip install requests
```

```python
import requests

response = requests.post(
    "https://runapi.ai/v1/embeddings",
    headers={"Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json"},
    json={"model": "text-embedding-3-small", "input": "The quick brown fox."}
)
response.raise_for_status()
print(response.json())
```

## İlgili Kılavuzlar

- [Kimlik doğrulama](https://runapi.ai/tr/docs/guides/authentication.md)
- [Hızlı başlangıç](https://runapi.ai/tr/docs/guides/llm-api/quickstart.md)

---

## RunAPI hakkında daha fazlası

- [Ana sayfa](https://runapi.ai/tr/.md)
- [Model Kataloğu](https://runapi.ai/tr/models.md)
- [Fiyatlandırma](https://runapi.ai/tr/pricing.md)
- [Sağlayıcılar](https://runapi.ai/tr/models)
- [Dokümantasyon](https://runapi.ai/tr/docs/guides)
- [SDK'lar](https://runapi.ai/tr/sdk.md)
- [CLI](https://runapi.ai/tr/cli.md)
- [MCP Sunucusu](https://runapi.ai/tr/mcp.md)
- [Claude Code ve Cursor](https://runapi.ai/tr/claude-code-vs-cursor.md)
- [Cursor API kurulumu](https://runapi.ai/tr/cursor-api-setup.md)
- [RunAPI ve OpenRouter](https://runapi.ai/tr/openrouter-alternative.md)
- [Kurumsal](https://runapi.ai/tr/contact.md)
- [İletişim](https://runapi.ai/tr/contact.md)
- [Şartlar](https://runapi.ai/tr/terms.md)
- [Gizlilik](https://runapi.ai/tr/privacy.md)
- [Ajanlar için site dizini](https://runapi.ai/llms.txt)

İletişim: contact@runapi.ai

## Yapılandırılmış veriler

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "tr",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/tr",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/tr/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "tr",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/tr",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/tricon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "tr",
    "@type": "TechArticle",
    "headline": "OpenAI Embeddings",
    "description": "RunAPI'nin OpenAI uyumlu Embeddings işlemi aracılığıyla bir istek gönderin.",
    "url": "https://runapi.ai/tr/docs/api/openai/embeddings",
    "mainEntityOfPage": "https://runapi.ai/tr/docs/api/openai/embeddings"
  }
]
```
