Modell:
Sampling temperature. Lower is more deterministic.
USD-Schätzung $0.0105-$0.021: Das größte Aufladepaket rechnet mit $1 = 2.000 Credits; das Starterpaket mit $1 = 1.000 Credits.
Verlauf
Lokal in diesem Browser gespeichert
0 läuft · 0 abgeschlossen
Input
≈ $0.0019-$0.0037
Output
≈ $0.01-$0.02
Cache Read
≈ $0.0013-$0.0025
Kontext
Max. Output
Authentifizierung
Jede Anfrage muss im Authorization Header ein Bearer Token enthalten. Erstelle deinen API Key in der Konsole.
Authorization: Bearer YOUR_API_KEYhttps://apiany.ai/v1/chat/completionsRequest-Parameter
| Parameter | Typ | Erforderlich | Hinweise |
|---|---|---|---|
model | String | Erforderlich | Die Modellkennung für den Aufruf; verwende die ID dieses Modells. |
messages | Array | Erforderlich | Nachrichtenverlauf im OpenAI-Chatformat (role + content). |
stream | Boolean | Optional | Wenn true, wird die Antwort als SSE-Stream zurückgegeben. |
Request-Beispiel
curl "https://apiany.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{
"role": "user",
"content": "Summarize the following text in three concise bullet points:"
}
],
"temperature": 0.7,
"max_tokens": 1024
}'Response-Beispiel
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "claude-sonnet-5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 18,
"total_tokens": 30
}
}