Skip to main content

Admin Endpoints

Admin endpoints require an API key passed via the Authorization: Bearer header. These endpoints are used to manage data ingestion and monitor the health of the ingestion pipeline.

caution

Admin endpoints are restricted to authorized administrators. Contact the Model Graph team for API key access.

Trigger an ingestion run

POST /api/v1/admin/ingest/{source}

Manually triggers an ingestion run for a specific data source. This is useful for forcing an immediate refresh outside the normal daily schedule.

Path Parameters

ParameterTypeDescription
sourcestringThe ingestion source to run

Valid Sources

SourceDescription
openai-apiPoll OpenAI model listing API
anthropic-apiPoll Anthropic model listing API
google-apiPoll Google Gemini model listing API
mistral-apiPoll Mistral model listing API
cohere-apiPoll Cohere model listing API
xai-apiPoll xAI model listing API
huggingfaceSync open-source models from Hugging Face Hub
deprecations-infoFetch deprecation data from deprecations.info

Example

curl -X POST \
-H "Authorization: Bearer YOUR_ADMIN_API_KEY" \
https://api.modelgraph.ai/api/v1/admin/ingest/openai-api

Response

{
"ingestion_run": {
"id": 142,
"source": "openai-api",
"status": "running",
"started_at": "2025-11-15T14:30:00Z"
}
}

Errors

StatusCodeDescription
400bad_requestInvalid source name
401unauthorizedMissing or invalid API key

List ingestion runs

GET /api/v1/admin/ingestion-runs

Returns recent ingestion runs with their status, model counts, and any errors. Useful for monitoring the health of the data pipeline.

Example

curl -H "Authorization: Bearer YOUR_ADMIN_API_KEY" \
https://api.modelgraph.ai/api/v1/admin/ingestion-runs

Response

{
"ingestion_runs": [
{
"id": 142,
"source": "openai-api",
"provider": {
"slug": "openai",
"name": "OpenAI"
},
"status": "completed",
"models_added": 2,
"models_updated": 5,
"error_message": null,
"started_at": "2025-11-15T02:00:00Z",
"completed_at": "2025-11-15T02:00:12Z"
},
{
"id": 141,
"source": "anthropic-api",
"provider": {
"slug": "anthropic",
"name": "Anthropic"
},
"status": "completed",
"models_added": 0,
"models_updated": 3,
"error_message": null,
"started_at": "2025-11-15T02:00:00Z",
"completed_at": "2025-11-15T02:00:08Z"
},
{
"id": 140,
"source": "huggingface",
"provider": null,
"status": "failed",
"models_added": 0,
"models_updated": 0,
"error_message": "HTTP 503: Hugging Face API temporarily unavailable",
"started_at": "2025-11-14T02:00:00Z",
"completed_at": "2025-11-14T02:00:45Z"
}
]
}

Response Fields

FieldTypeDescription
idintegerUnique run identifier
sourcestringData source identifier
providerobject | nullAssociated provider (null for cross-provider sources like huggingface)
statusstringrunning, completed, or failed
models_addedintegerNumber of new models created
models_updatedintegerNumber of existing models updated
error_messagestring | nullError details if status is failed
started_atstringISO 8601 timestamp
completed_atstring | nullISO 8601 timestamp (null if still running)

Errors

StatusCodeDescription
401unauthorizedMissing or invalid API key