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

# Dexto API

The Dexto API bundles three AI infrastructure surfaces behind one key: it creates chat completions against a catalog of LLM models, generates media from media models with recommendations and cost estimates, and runs isolated code sandboxes. Sandboxes can be created, started, paused, and deleted, and an agent can list, read, write, and delete their files and execute processes inside them. A billing summary reports usage across the models and sandboxes it runs.

## For AI agents

Create chat completions, generate media from media models, and run isolated code sandboxes with file and process access. Reports usage through a billing summary across 20 endpoints.

## Scope

Does not train or fine-tune models, host your application, or store long-term data. Use for running LLM and media model inference and ephemeral code sandboxes only.

## Capabilities

- Create chat completions against a catalog of LLM models
- Generate media from media models, with model recommendations and cost estimates before running
- Track media generation jobs by id and list past generations
- Create, start, pause, and delete isolated code sandboxes
- Read, write, list, and delete files inside a sandbox
- Execute a process inside a sandbox and capture its result
- Read a billing summary of usage across models and sandboxes

## Use cases

### Unified AI Backend for an Agent

An AI agent connected to Dexto through Jentic can reach language-model completions, media generation, and code execution from a single credential rather than wiring three providers. It can create a chat completion for reasoning, start a media generation for an asset, and spin up a sandbox to run code, all under one key with one billing summary to watch.

Example prompt: Create a chat completion to draft a script, then create a sandbox and execute the script as a process

### Cost-Aware Media Generation

Dexto lets a caller list media models, request a recommendation for a task, and create an estimate before starting a generation, so the cost is known up front. The generation then runs as a job that can be polled by id and listed afterward, which suits batch asset creation where spend needs to stay predictable.

Example prompt: Create a media estimate for a requested image, start the generation, and poll it by id until it completes

### Isolated Code Execution

Dexto's sandboxes give an agent a disposable environment to run code: create a sandbox, write files into it, execute a process, read the output, then pause or delete it. Because each sandbox is isolated and carries its own id, an agent can run untrusted or generated code without touching the host environment.

Example prompt: Create a sandbox, write a Python file, execute it as a process, read the result, then delete the sandbox

### Model Selection and Billing

Before and after running work, Dexto exposes the available LLM and media models and a billing summary of usage. An agent or operator can pick a model from the catalog, run inference or generation, and read the billing summary to track consumption across both inference and sandbox time.

Example prompt: List the available models, run a chat completion against one, and read the billing summary to confirm the usage recorded

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/chat/completions` | Create a chat completion |
| GET | `/v1/models` | List available LLM models |
| POST | `/v1/media/generations` | Start a media generation |
| GET | `/v1/media/generations/{generation_id}` | Get a media generation job by id |
| POST | `/v1/sandboxes` | Create a sandbox |
| POST | `/v1/sandboxes/{sandbox_id}/processes` | Execute a process inside a sandbox |
| POST | `/v1/sandboxes/{sandbox_id}/files/write` | Write a file inside a sandbox |
| GET | `/v1/billing/summary` | Get a billing summary of usage |

## Key resources

- **Models** — List available LLM and media models and read media model recommendations
- **Chat** — Create chat completions against a chosen model
- **Media** — Estimate, start, list, and get media generation jobs
- **Sandboxes** — Create, start, pause, delete sandboxes and run file and process operations inside them
- **Billing** — Read a billing summary of usage across models and sandboxes

## 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:** 28 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 7 / 100
  - Developer Experience & Jentic Compatibility: 69 / 100
  - AI-Readiness & Agent Experience: 40 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 75 / 100
- **View full report:** https://jentic.com/apis/dexto.ai/dexto/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 Dexto by hand means handling its bearer API-key auth and three separate surfaces: chat completions, media generation with its own model catalog and estimates, and code sandboxes with file and process operations. Through Jentic you install once, import Dexto from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Dexto groups its surface into inference (chat completions and media generation) and sandboxes, and each sandbox carries its id in the URL path (`/v1/sandboxes/{sandbox_id}/...`). A rule can let your agent create completions and media generations while sandbox deletion and process execution stay out of its reach, or pin sandbox access to one sandbox id. You choose the operations it may call, so arbitrary code execution is not included unless you add it.
- **Credential handling:** Your Dexto API 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 'create a chat completion' or 'run code in a sandbox', and Jentic returns the matching Dexto operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenRouter API** — Unified gateway to many LLM providers, versus Dexto's combined inference, media, and sandbox surfaces.
- **OpenAI API** — Chat completions and models from a single provider, versus Dexto's multi-model catalog with media and sandboxes.
- **Replicate API** — Runs a large catalog of hosted image, video, and audio models, complementing Dexto's media generation.
- **E2B API** — Dedicated cloud sandboxes for running AI-generated code, complementing Dexto's inference surface.

## FAQ

### Is there a Dexto MCP server?

You don't need an MCP server to give your agent Dexto. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the chat-completion, media-generation, and sandbox operations. Operations are discovered on demand, so no extra server's tool definitions sit in the agent's context.

### Can I limit what my agent is allowed to do with Dexto?

Yes. Write a rule that allows the chat-completion and media-generation operations but not sandbox process execution or deletion, so the agent can run inference while arbitrary code execution stays off, and every call it makes is logged.

### What authentication does the Dexto API use?

Per its OpenAPI spec, the Dexto API uses a bearer Dexto API key sent in the Authorization header for all operations. Through Jentic the key is stored encrypted by your own Jentic One instance and injected only at call time, so it never sits in the agent's prompt or logs.

### Can I run code in a sandbox with the Dexto API?

Yes. The create-sandbox operation provisions an isolated environment, and you can write files into it, execute a process, and read the output before pausing or deleting it. Each sandbox carries its own id in the path, so file and process operations are scoped to a specific sandbox.

### What are the rate limits for the Dexto API?

The OpenAPI spec does not specify request-rate limits; usage is instead tracked through the billing summary operation, which reports consumption across models and sandboxes. Check dexto.ai for current limits and pricing.

### How do I generate media with the Dexto API through Jentic?

Create a media estimate to preview the cost, start the generation, then poll it by generation id until it completes. In Jentic, search for 'generate media from a model', store your API key once, and the agent runs the sequence. To run it on your own infrastructure, install Jentic One from its GitHub repo.
