Crowdee
API-Referenz

Verification Contexts API

Erstellen und verwalten Sie wiederverwendbare benannte Kontextmengen, die Verifikations-Runs kontextuelle Angaben bereitstellen.

Verification Contexts sind benannte Schlüssel-Wert-Speicher, die einem Projekt zugeordnet sind. Sie stellen behauptete Metadaten — Quell-URL, Veröffentlichungsdatum, Identität des Sprechers, geografischen Standort und Ähnliches — für Pipeline-Runs bereit. Pipelines nutzen diesen Kontext, um zu bewerten, ob der Inhalt der Datei mit den angegebenen Angaben übereinstimmt.

Das Speichern eines Kontexts vermeidet das wiederholte Eingeben derselben Werte für mehrere Runs. Jeder Run speichert eine Momentaufnahme der zum Ausführungszeitpunkt verwendeten Kontextdaten, sodass das Aktualisieren eines Kontexts vergangene Ergebnisse nicht rückwirkend beeinflusst.

Endpunkt-Übersicht

MethodePfadBeschreibung
POST/v2/projects/{projectId}/verification-contextsKontext erstellen
GET/v2/projects/{projectId}/verification-contextsProjektkontexte auflisten
GET/v2/verification-contextsAlle Kontexte auf Organisationsebene auflisten
GET/v2/projects/{projectId}/verification-contexts/{contextId}Kontext abrufen
PUT/v2/projects/{projectId}/verification-contexts/{contextId}Kontext aktualisieren
DELETE/v2/projects/{projectId}/verification-contexts/{contextId}Kontext löschen

Kontext erstellen

POST /v2/projects/{projectId}/verification-contexts

Anfrage-Body

FeldTypErforderlichBeschreibung
namestringJaLesbare Bezeichnung für den Kontext
descriptionstringNeinOptionaler Hinweis zum Zweck des Kontexts
dataobjectJaSchlüssel-Wert-Paare mit kontextuellen Angaben

Die Schlüssel in data müssen mit den requiredContextKeys übereinstimmen, die von der beabsichtigten Pipeline deklariert werden. Die genauen Schlüsselnamen entnehmen Sie dem Pipeline-Katalog.

curl -X POST https://api.crowdee.ai/v2/projects/proj_abc123/verification-contexts \
  -H "X-API-Key: crw_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Reuters Article — Oct 28 Protest",
    "description": "Claimed provenance for the photo bundle from the Berlin protest coverage",
    "data": {
      "claimed_source_url": "https://www.reuters.com/world/europe/berlin-protest-2024-10-28",
      "claimed_publication_date": "2024-10-28",
      "claimed_author": "Reuters Editorial Staff",
      "claimed_location": "Berlin, Germany",
      "claimed_event": "Berlin climate protest"
    }
  }'

Antwort

{
  "id": "ctx_abc123",
  "projectId": "proj_abc123",
  "name": "Reuters Article — Oct 28 Protest",
  "description": "Claimed provenance for the photo bundle from the Berlin protest coverage",
  "data": {
    "claimed_source_url": "https://www.reuters.com/world/europe/berlin-protest-2024-10-28",
    "claimed_publication_date": "2024-10-28",
    "claimed_author": "Reuters Editorial Staff",
    "claimed_location": "Berlin, Germany",
    "claimed_event": "Berlin climate protest"
  },
  "createdAt": "2024-11-15T10:05:00Z",
  "updatedAt": "2024-11-15T10:05:00Z"
}

Kontext in einem Run verwenden

Sie können einem Verifikations-Run auf zwei Arten Kontext bereitstellen:

Referenzieren Sie einen gespeicherten Kontext anhand seiner ID. Dies ist der empfohlene Ansatz, wenn derselbe Kontext für mehrere Runs wiederverwendet wird.

curl -X POST https://api.crowdee.ai/v2/projects/proj_abc123/verification-runs \
  -H "X-API-Key: crw_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pipeline_id": "verify-image-deep",
    "file_ids": ["file_xyz789"],
    "context_id": "ctx_abc123"
  }'
const run = await crowdee.verificationRuns.create("proj_abc123", {
  pipeline_id: "verify-image-deep",
  file_ids: ["file_xyz789"],
  context_id: "ctx_abc123",
});

Übergeben Sie Kontextdaten direkt in der Run-Anfrage. Die Werte werden ausschließlich für diesen Run verwendet und nicht als wiederverwendbarer Kontext gespeichert.

curl -X POST https://api.crowdee.ai/v2/projects/proj_abc123/verification-runs \
  -H "X-API-Key: crw_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pipeline_id": "verify-news-article",
    "file_ids": ["file_xyz789"],
    "context": {
      "claimed_source_url": "https://example.com/breaking-story",
      "claimed_publication_date": "2024-11-15"
    }
  }'
const run = await crowdee.verificationRuns.create("proj_abc123", {
  pipeline_id: "verify-news-article",
  file_ids: ["file_xyz789"],
  context: {
    claimed_source_url: "https://example.com/breaking-story",
    claimed_publication_date: "2024-11-15",
  },
});

Kontexte auflisten

GET /v2/projects/{projectId}/verification-contexts

curl "https://api.crowdee.ai/v2/projects/proj_abc123/verification-contexts?limit=50" \
  -H "X-API-Key: crw_YOUR_API_KEY"

Um alle Kontexte über sämtliche Projekte Ihrer Organisation hinweg einzusehen, verwenden Sie den Endpunkt auf Organisationsebene:

curl https://api.crowdee.ai/v2/verification-contexts \
  -H "X-API-Key: crw_YOUR_API_KEY"

Kontext abrufen

GET /v2/projects/{projectId}/verification-contexts/{contextId}

curl https://api.crowdee.ai/v2/projects/proj_abc123/verification-contexts/ctx_abc123 \
  -H "X-API-Key: crw_YOUR_API_KEY"

Kontext aktualisieren

PUT /v2/projects/{projectId}/verification-contexts/{contextId}

Senden Sie ein partielles data-Objekt — nur die von Ihnen angegebenen Schlüssel werden aktualisiert. Um einen Schlüssel zu entfernen, setzen Sie seinen Wert auf null.

Das Aktualisieren eines Kontexts hat keinen Einfluss auf bereits abgeschlossene Runs. Jeder Run speichert eine Momentaufnahme der Kontextdaten zum Ausführungszeitpunkt, sodass historische Ergebnisse korrekt und nachvollziehbar bleiben.

curl -X PUT https://api.crowdee.ai/v2/projects/proj_abc123/verification-contexts/ctx_abc123 \
  -H "X-API-Key: crw_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Reuters Article — Oct 28 Protest (corrected)",
    "data": {
      "claimed_author": "Hans Müller",
      "claimed_event": "Berlin climate and housing protest"
    }
  }'

Kontext löschen

DELETE /v2/projects/{projectId}/verification-contexts/{contextId}

Das Löschen eines Kontexts hat keinen Einfluss auf den bestehenden Run-Verlauf. Abgeschlossene Runs, die auf diesen Kontext verwiesen haben, behalten ihre Momentaufnahme der Daten.

curl -X DELETE \
  https://api.crowdee.ai/v2/projects/proj_abc123/verification-contexts/ctx_abc123 \
  -H "X-API-Key: crw_YOUR_API_KEY"

Gibt bei Erfolg 204 No Content zurück.

Wie hilfreich ist diese Seite?

© 2026 Crowdee GmbH. Alle Rechte vorbehalten.

On this page