--- title: ML Intern API emoji: 🛰️ colorFrom: yellow colorTo: gray sdk: docker app_port: 7860 pinned: false license: apache-2.0 short_description: OpenAI-compatible API for the ML Intern agent --- # ML Intern API OpenAI Responses-API-compatible HTTP API for [ML Intern](https://huggingface.co/spaces/smolagents/ml-intern): send a task with your Hugging Face token as a Bearer header, the agent researches/codes/launches HF Jobs under **your** namespace, and streams results + artifacts (trackio dashboards, jobs, models) over resumable SSE. Interactive API documentation is served separately at https://huggingface-ml-intern-api-docs.static.hf.space so docs-only changes do not restart this backend Space. Endpoints live under `/v1` — start at `POST /v1/responses`. The docs include verified public-endpoint examples, starting with short research/model-selection tasks and extending to longer artifact-producing runs. Source: https://github.com/huggingface/ml-intern (see `docs/API.md`). Optional Space secrets: - `MONGODB_URI` (+ `MONGODB_DB`) — durable event replay, reconnects, and restart recovery. Without it, response tracking is in-memory only. - `HF_TOKEN` — server-side fallbacks such as session trace uploads.