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
| Parameter | Type | Description |
|---|---|---|
source | string | The ingestion source to run |
Valid Sources
| Source | Description |
|---|---|
openai-api | Poll OpenAI model listing API |
anthropic-api | Poll Anthropic model listing API |
google-api | Poll Google Gemini model listing API |
mistral-api | Poll Mistral model listing API |
cohere-api | Poll Cohere model listing API |
xai-api | Poll xAI model listing API |
huggingface | Sync open-source models from Hugging Face Hub |
deprecations-info | Fetch 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
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Invalid source name |
| 401 | unauthorized | Missing 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
| Field | Type | Description |
|---|---|---|
id | integer | Unique run identifier |
source | string | Data source identifier |
provider | object | null | Associated provider (null for cross-provider sources like huggingface) |
status | string | running, completed, or failed |
models_added | integer | Number of new models created |
models_updated | integer | Number of existing models updated |
error_message | string | null | Error details if status is failed |
started_at | string | ISO 8601 timestamp |
completed_at | string | null | ISO 8601 timestamp (null if still running) |
Errors
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |