Modell abrufen (Anthropic-Format)
Ruft ein einzelnes Modell im Anthropic-Modellformat ab. Liefert 404, wenn das Modell nicht existiert oder der API-Key keinen Zugriff darauf hat.
GET
https://api.deutschlandgpt.de/anthropic/v1/models/{id}Beispielaufruf
curl https://api.deutschlandgpt.de/anthropic/v1/models/{id} \
-X GET \
-H "Authorization: Bearer $DGPT_API_KEY"curl https://api.deutschlandgpt.de/anthropic/v1/models/{id} \
-X GET \
-H "Authorization: Bearer $DGPT_API_KEY"import os, requests
response = requests.get(
"https://api.deutschlandgpt.de/anthropic/v1/models/{id}",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())import os, requests
response = requests.get(
"https://api.deutschlandgpt.de/anthropic/v1/models/{id}",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())const response = await fetch('https://api.deutschlandgpt.de/anthropic/v1/models/{id}', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());const response = await fetch('https://api.deutschlandgpt.de/anthropic/v1/models/{id}', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());Parameter
idstringerforderlichDer Registry-Modellname.
Antwort
200application/json
{
"type": "model",
"id": "claude-4.5-sonnet",
"display_name": "string",
"created_at": "2025-01-01T00:00:00Z"
}{
"type": "model",
"id": "claude-4.5-sonnet",
"display_name": "string",
"created_at": "2025-01-01T00:00:00Z"
}Das Modell.
typestringerforderlichidstringerforderlichRegistry-Modellname — als model an /anthropic/v1/messages übergeben.
display_namestringerforderlichcreated_atstring<date-time>erforderlichStatuscodes
200
Das Modell.
AnthropicModel401
Fehlender oder ungültiger API-Key.
AnthropicError404
Modell nicht gefunden, oder der API-Key hat keinen Zugriff darauf.
AnthropicErrorWar diese Seite hilfreich?