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

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

# Anthropic Messages

## Genel Bakış

Uyumlu bir model ve protokolün istek ile yanıt yapılarıyla RunAPI'nin Anthropic uyumlu Messages işlemini 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/messages

Temel URL: https://runapi.ai

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

Tercih edilen kimlik doğrulama: x-api-key: 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`
- `x-api-key: YOUR_API_TOKEN` (Tercih edilen)
- `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.

- [claude-fable-5-1](https://runapi.ai/tr/models/claude)
- [claude-fable-5](https://runapi.ai/tr/models/claude)
- [claude-sonnet-5](https://runapi.ai/tr/models/claude)
- [claude-opus-5](https://runapi.ai/tr/models/claude)
- [claude-opus-4-8](https://runapi.ai/tr/models/claude)
- [claude-opus-4-7](https://runapi.ai/tr/models/claude)
- [claude-opus-4-6](https://runapi.ai/tr/models/claude)
- [claude-sonnet-4-6](https://runapi.ai/tr/models/claude)
- [claude-opus-4-5-20251101](https://runapi.ai/tr/models/claude)
- [claude-sonnet-4-5-20250929](https://runapi.ai/tr/models/claude)
- [claude-haiku-4-5-20251001](https://runapi.ai/tr/models/claude)
- [claude-opus-4-1-20250805](https://runapi.ai/tr/models/claude)
- [gpt-5.5](https://runapi.ai/tr/models/gpt)
- [gpt-5.5-pro](https://runapi.ai/tr/models/gpt)
- [gpt-5.4](https://runapi.ai/tr/models/gpt)
- [gpt-5.4-mini](https://runapi.ai/tr/models/gpt)
- [gpt-5.4-nano](https://runapi.ai/tr/models/gpt)
- [gpt-5.4-pro](https://runapi.ai/tr/models/gpt)
- [gpt-5.3-codex](https://runapi.ai/tr/models/gpt)
- [gpt-5.3-codex-spark](https://runapi.ai/tr/models/gpt)
- [gpt-5.2](https://runapi.ai/tr/models/gpt)
- [gpt-5.6-luna](https://runapi.ai/tr/models/gpt)
- [gpt-5.6-sol](https://runapi.ai/tr/models/gpt)
- [gpt-5.6-terra](https://runapi.ai/tr/models/gpt)
- [gpt-6-astra](https://runapi.ai/tr/models/gpt)
- [gemini-3.6-flash](https://runapi.ai/tr/models/gemini)
- [gemini-3.5-flash](https://runapi.ai/tr/models/gemini)
- [gemini-3.1-pro-preview](https://runapi.ai/tr/models/gemini)
- [gemini-3-flash-preview](https://runapi.ai/tr/models/gemini)
- [gemini-2.5-pro](https://runapi.ai/tr/models/gemini)
- [gemini-2.5-flash](https://runapi.ai/tr/models/gemini)
- [deepseek-v4-flash-vision-exp](https://runapi.ai/tr/models/deepseek)
- [deepseek-v4-pro](https://runapi.ai/tr/models/deepseek)
- [deepseek-v4-flash](https://runapi.ai/tr/models/deepseek)
- [glm-5.2](https://runapi.ai/tr/models/glm)
- [glm-5.1](https://runapi.ai/tr/models/glm)
- [glm-5-turbo](https://runapi.ai/tr/models/glm)
- [glm-5](https://runapi.ai/tr/models/glm)
- [glm-4.7](https://runapi.ai/tr/models/glm)
- [glm-4.6](https://runapi.ai/tr/models/glm)
- [glm-4.5](https://runapi.ai/tr/models/glm)
- [glm-4.5-air](https://runapi.ai/tr/models/glm)
- [kimi-k3](https://runapi.ai/tr/models/kimi)
- [kimi-k2.7-code](https://runapi.ai/tr/models/kimi)
- [kimi-k2.6](https://runapi.ai/tr/models/kimi)
- [kimi-k2.5](https://runapi.ai/tr/models/kimi)
- [MiniMax-M3](https://runapi.ai/tr/models/minimax)
- [MiniMax-M2.7](https://runapi.ai/tr/models/minimax)
- [MiniMax-M2.7-highspeed](https://runapi.ai/tr/models/minimax)
- [MiniMax-M2.5](https://runapi.ai/tr/models/minimax)
- [MiniMax-M2.5-highspeed](https://runapi.ai/tr/models/minimax)
- [MiniMax-M2.1](https://runapi.ai/tr/models/minimax)
- [MiniMax-M2](https://runapi.ai/tr/models/minimax)
- [mimo-v2.5-pro](https://runapi.ai/tr/models/mimo)
- [mimo-v2.5](https://runapi.ai/tr/models/mimo)
- [grok-4.20-0309-non-reasoning](https://runapi.ai/tr/models/grok)
- [grok-4.5](https://runapi.ai/tr/models/grok)
- [grok-4.3](https://runapi.ai/tr/models/grok)

## İ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`, `max_tokens`, `messages`

```json
{
  "max_tokens": {
    "description": "Durdurmadan önce oluşturulacak maksimum belirteç sayısı.",
    "type": "integer"
  },
  "messages": {
    "description": "Anthropic Messages biçiminde konuşma sıraları.",
    "items": {
      "additionalProperties": true,
      "properties": {
        "content": {
          "type": [
            "string",
            "array"
          ]
        },
        "role": {
          "type": "string"
        }
      },
      "required": [
        "role",
        "content"
      ],
      "type": "object"
    },
    "type": "array"
  },
  "model": {
    "description": "Uyumlu model kataloğu tarafından döndürülen RunAPI model tanımlayıcısı.",
    "type": "string"
  },
  "stream": {
    "default": false,
    "description": "Yazılı Messages olaylarını sunucu tarafından gönderilen olaylar olarak döndür.",
    "type": "boolean"
  },
  "system": {
    "description": "Konuşma mesajlarından ayrı olarak sağlanan sistem talimatları.",
    "type": [
      "string",
      "array"
    ]
  },
  "temperature": {
    "description": "Örnekleme sıcaklığı; model desteği değişiklik gösterebilir.",
    "type": "number"
  },
  "tools": {
    "description": "Modelin çağırabileceği araçlar.",
    "type": "array"
  },
  "top_p": {
    "description": "Çekirdek örnekleme olasılığı; model desteği farklılık gösterebilir.",
    "type": "number"
  }
}
```

### İstek örneği

```json
{
  "max_tokens": 64,
  "messages": [
    {
      "content": "Summarize one practical improvement for an API deployment.",
      "role": "user"
    }
  ],
  "model": "claude-sonnet-4-6"
}
```

## Eş zamanlı yanıt

HTTP 200

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "content": {
      "type": "array"
    },
    "id": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "role": {
      "const": "assistant",
      "type": "string"
    },
    "stop_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "const": "message",
      "type": "string"
    },
    "usage": {
      "additionalProperties": true,
      "properties": {
        "input_tokens": {
          "type": "integer"
        },
        "output_tokens": {
          "type": "integer"
        }
      },
      "required": [
        "input_tokens",
        "output_tokens"
      ],
      "type": "object"
    }
  },
  "required": [
    "id",
    "type",
    "role",
    "content",
    "model",
    "stop_reason",
    "usage"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "content": [
    {
      "text": "Hello! How can I help today?",
      "type": "text"
    }
  ],
  "id": "msg_example",
  "model": "claude-sonnet-4-6",
  "role": "assistant",
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "type": "message",
  "usage": {
    "input_tokens": 12,
    "output_tokens": 8
  }
}
```

## SSE olayı: message_start

Medya türü: `text/event-stream`

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "message": {
      "type": "object"
    },
    "type": {
      "const": "message_start",
      "type": "string"
    }
  },
  "required": [
    "type",
    "message"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "message": {
    "content": [],
    "id": "msg_example",
    "model": "claude-sonnet-4-6",
    "role": "assistant",
    "stop_reason": null,
    "stop_sequence": null,
    "type": "message",
    "usage": {
      "input_tokens": 12,
      "output_tokens": 1
    }
  },
  "type": "message_start"
}
```

## SSE olayı: content_block_delta

Medya türü: `text/event-stream`

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "delta": {
      "type": "object"
    },
    "index": {
      "type": "integer"
    },
    "type": {
      "const": "content_block_delta",
      "type": "string"
    }
  },
  "required": [
    "type",
    "index",
    "delta"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "delta": {
    "text": "Hello",
    "type": "text_delta"
  },
  "index": 0,
  "type": "content_block_delta"
}
```

## SSE olayı: message_delta

Medya türü: `text/event-stream`

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "delta": {
      "type": "object"
    },
    "type": {
      "const": "message_delta",
      "type": "string"
    },
    "usage": {
      "additionalProperties": true,
      "properties": {
        "output_tokens": {
          "type": "integer"
        }
      },
      "required": [
        "output_tokens"
      ],
      "type": "object"
    }
  },
  "required": [
    "type",
    "delta",
    "usage"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "delta": {
    "stop_reason": "end_turn",
    "stop_sequence": null
  },
  "type": "message_delta",
  "usage": {
    "output_tokens": 8
  }
}
```

## SSE olayı: message_stop

Medya türü: `text/event-stream`

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "type": {
      "const": "message_stop",
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "type": "message_stop"
}
```

## Protokol hatası: invalid_request

HTTP 400

### Şema

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "message"
      ],
      "type": "object"
    },
    "request_id": {
      "type": "string"
    },
    "type": {
      "const": "error",
      "type": "string"
    }
  },
  "required": [
    "type",
    "error"
  ],
  "type": "object"
}
```

### Örnek

```json
{
  "error": {
    "message": "max_tokens is required",
    "type": "invalid_request_error"
  },
  "request_id": "req_example",
  "type": "error"
}
```

## Kullanım

### Şema

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

### Örnek

```json
{
  "input_tokens": 12,
  "output_tokens": 8
}
```

## 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/messages \
  -H x-api-key:\ YOUR_API_TOKEN \
  -H Content-Type:\ application/json \
  -d \{\"model\":\"claude-sonnet-4-6\",\"max_tokens\":64,\"messages\":\[\{\"role\":\"user\",\"content\":\"Summarize\ one\ practical\ improvement\ for\ an\ API\ deployment.\"\}\]\}
```

### javascript

```javascript
const response = await fetch("https://runapi.ai/v1/messages", {
  method: "POST",
  headers: {
  "x-api-key": "YOUR_API_TOKEN",
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "model": "claude-sonnet-4-6",
  "max_tokens": 64,
  "messages": [
    {
      "role": "user",
      "content": "Summarize one practical improvement for an API deployment."
    }
  ]
})
});
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/messages",
    headers={"x-api-key": "YOUR_API_TOKEN", "Content-Type": "application/json"},
    json={"model": "claude-sonnet-4-6", "max_tokens": 64, "messages": [{"role": "user", "content": "Summarize one practical improvement for an API deployment."}]}
)
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": "Anthropic Messages",
    "description": "RunAPI'nin Anthropic uyumlu Messages işlemi aracılığıyla bir istek gönderin.",
    "url": "https://runapi.ai/tr/docs/api/anthropic/messages",
    "mainEntityOfPage": "https://runapi.ai/tr/docs/api/anthropic/messages"
  }
]
```
