canonical: https://jentic.com/apis/modelrunner.ai/modelrunner

# ModelRunner Requests API

The ModelRunner Requests API queues inference jobs against hosted models, wrappers, or your own Serverless GPU deployments, addressed by owner and model name such as bytedance/sdxl-lightning-4step. Each job returns a request id with status, response, and cancel URLs, and moves through IN_QUEUE, IN_PROGRESS, and a terminal COMPLETED, FAILED, or CANCELLED state. You can poll a job's status, fetch its final output with inference and delay times, cancel it, list your account's requests filtered by endpoint, deployment, status, or metadata tags, and follow every transition on a server-sent event stream. Owner controls publish a request publicly or purge its stored payloads and output media.

## For AI agents

Queue image-generation and other inference jobs on ModelRunner models or your Serverless GPU deployments, poll status, fetch outputs, cancel jobs, and list past requests. Authenticated with a Key token in the Authorization header.

## Scope

Does not train or fine-tune models, create or scale Serverless GPU deployments, or manage billing. Use for submitting, tracking, and retrieving inference requests only.

## Capabilities

- Queue an inference job on a model by ownerName and modelName with a prompt, size, steps, and seed
- Poll a request's status from IN_QUEUE to COMPLETED, FAILED, or CANCELLED
- Fetch a completed request's output with inferenceTime and delayTime
- Cancel a queued or running request, stopping the job on a Serverless GPU deployment
- List past requests filtered by modelEndpoint, deploymentId, status, or metadata tags
- Follow every account request's status transitions on a server-sent event stream
- Purge a finished request's stored payloads and output media from the CDN

## Use cases

### Agent Image Generation Through Jentic

An AI agent that needs an illustration or product mock-up queues a job on a ModelRunner image model with a prompt and size, polls the status URL until it completes, and returns the output. Through Jentic the agent finds the create-request operation by intent and calls it with ownerName and modelName in the path, using the stored Key token without seeing it.

Example prompt: Create a request on bytedance/sdxl-lightning-4step with prompt 'a red bicycle on a beach at sunset', width 1024, height 1024, and num_outputs 2, then poll its status until COMPLETED and fetch the result

### Batch Jobs on a Serverless GPU Deployment

Teams running their own model on a ModelRunner Serverless GPU deployment submit batches of jobs, then list requests by deploymentId and metadata tag to collect results. The list response carries billingStatus, which is the field to read when telling a successful job from a failed one.

Example prompt: List requests with deploymentId set to the deployment's UUID and status COMPLETED, page 1 with limit 50, and return each request id with its billingStatus

### Live Job Monitoring and Cleanup

Operations dashboards subscribe to the request stream for a snapshot of in-flight jobs followed by an update event per status change, cancel stuck jobs, and purge stored payloads for terminal, already-charged requests to meet data-retention rules.

Example prompt: Cancel request 'abc123def456ghi789jkl' on bytedance/sdxl-lightning-4step, then delete the stored payloads of a completed request by its requestId

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/{ownerName}/{modelName}` | Create a request |
| GET | `/{ownerName}/{modelName}/requests/{requestId}/status` | Get request status |
| GET | `/{ownerName}/{modelName}/requests/{requestId}` | Get request result |
| PUT | `/{ownerName}/{modelName}/requests/{requestId}/cancel` | Cancel a request |
| GET | `/requests` | List requests |
| GET | `/requests/stream` | Stream request updates |

## Key resources

- **Requests** — Queued inference jobs with status, output, timings, logs, and billing status
- **Models and Deployments** — Endpoints addressed by ownerName and modelName, including your Serverless GPU deployments
- **Request Stream** — Server-sent events for every status transition on the account

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 48 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 23 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 76 / 100
- **View full report:** https://jentic.com/apis/modelrunner.ai/modelrunner/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring ModelRunner by hand means sending the key with its Key prefix in the Authorization header, building owner and model paths, and writing the loop that polls status until a job is terminal. Through Jentic you install once, import ModelRunner from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** ModelRunner puts the ownerName and modelName in the URL path (/{ownerName}/{modelName}/...), so a rule can pin your agent to one model or deployment and the operations you pick. You choose the operations it may call, so irreversible ones like payload deletion or making a request public are not included unless you add them.
- **Credential handling:** Your ModelRunner key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate an image from a prompt' or 'check inference job status', and Jentic returns the matching ModelRunner operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Replicate** — Run open-source models in the cloud through a prediction API
- **fal** — Fast generative media inference with a queue API
- **Hugging Face Hub** — Model and dataset hub metadata

## FAQ

### What authentication does the ModelRunner Requests API use?

Per its OpenAPI spec, the ModelRunner Requests API uses an API key sent in the `Authorization` header in the form `Key <your key>`, declared globally for every operation. Through Jentic the key is stored once, encrypted, by your own Jentic One instance and injected at call time, so it never enters the agent's prompt or logs.

### How do I tell if a ModelRunner request succeeded?

Poll the status operation until status is COMPLETED, FAILED, or CANCELLED, then fetch the result. When listing or reading requests through the account-level operations, the spec says to read billingStatus rather than status to tell success from failure.

### Can I limit what my agent is allowed to do with the ModelRunner API?

Yes. For example, write a rule that allows the create, status, and result operations only under `/bytedance/sdxl-lightning-4step`, so the agent can generate images with that one model and read its own results while payload deletion and visibility changes stay out of reach, and every call it makes is logged.

### What are the rate limits for the ModelRunner Requests API?

The OpenAPI spec does not specify rate limits. Check the ModelRunner documentation at https://modelrunner.ai/docs for current limits before submitting large batches of jobs.

### How do I generate an image with ModelRunner through Jentic?

Search Jentic for the intent 'generate an image from a prompt', which returns the ModelRunner create-request operation with its input schema; the agent posts the prompt to the model path, polls the returned status_url until COMPLETED, and reads the output from the result. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a ModelRunner MCP server?

You don't need an MCP server to give your agent the ModelRunner API. Jentic connects it directly from the API Directory: import it, store your key once, and your agent calls the create, status, result, and cancel operations. Operations are discovered on demand, so no extra tool definitions are loaded into the agent's context.
