Zum Hauptinhalt springen

1. Einen API-Key erstellen

Öffnen Sie das APIAny.AI-Dashboard und erstellen Sie einen Projekt-API-Key.

2. Verfügbare Modelle auflisten

curl https://apiany.ai/v1/models \
  -H "Authorization: Bearer $APIANY_API_KEY"

3. Eine Chat Completion ausführen

curl https://apiany.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [
      { "role": "user", "content": "Write a concise product tagline for APIAny.AI." }
    ]
  }'

4. Eine Bildaufgabe erstellen

curl https://apiany.ai/v1/images/generations \
  -H "Authorization: Bearer $APIANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana",
    "prompt": "A clean product hero image for an AI API gateway",
    "size": "1k"
  }'
Die Antwort enthält eine task_id. Fragen Sie die Aufgabe ab, bis sie abgeschlossen ist:
curl https://apiany.ai/v1/tasks/task_123 \
  -H "Authorization: Bearer $APIANY_API_KEY"