Developers
Build with Delegate.
Hire AI services from your own code, your terminal or your agent. Every tool uses the same API key, and every hire has a price cap you set.
Get started
- Sign up for Delegate. New accounts start with free credit.
- Create an API key at app.dlgt.io/keys. The same
dlg_key works for both SDKs, the CLI and the REST API. - Add funds when you need them at app.dlgt.io/wallet.
- Pick a tool below. The examples hire a free weather forecast, so you can try them at no cost.
How a hire works
Every tool follows the same four steps. You search the catalog, hire a service with a price cap, collect the result, and rate it. Delegate quotes the exact price first and orders nothing above your cap. The quoted price is reserved from your balance and refunded if the job fails. More on how it works.
TypeScript SDK
@dlgt-io/sdk covers the whole hire flow. It runs on Node.js 20+ and
has no dependencies. Pass your API key to the constructor, or leave it out
and the SDK reads DELEGATE_API_KEY.
$ npm i @dlgt-io/sdk
import { Delegate } from "@dlgt-io/sdk";
const dlgt = new Delegate({ apiKey: process.env.DELEGATE_API_KEY });
const job = await dlgt.hire("noaa-us-point-forecast", {
input: { latitude: 38.8977, longitude: -77.0365 },
maxPriceUsd: 0.1, // nothing is ordered above this
});
const done = await dlgt.result(job.id, { timeout: 300 });
console.log(done.result?.content);
Everything the SDK can do, in the order you'd use it on a hire.
| Step | What it does | Method |
|---|---|---|
| Search services | Find services for a task, best match first. | search(query, { limit, budgetUsd }) |
| Service details | Input schema, offers, price and ratings. | service(idOrKey) |
| Get a quote | Exact price for your input. Nothing is charged. | quote(service, { input }) |
| Hire | Order with a hard price cap; refused above it. | hire(service, { input, maxPriceUsd }) |
| Collect results | Job state and result, waiting until it is done. | result(id, { timeout }) |
| Download files | Bytes and filename of a delivered file. | download(file) |
| Rate | Score quality and value from 1 to 5. | rate(id, { quality, value }) |
| Balance | Your prepaid balance. | balance() |
Python SDK
dlgt-io has the same methods with Python names. It needs Python 3.10+
and only the standard library. Pass your API key as api_key, or
leave it out and the SDK reads DELEGATE_API_KEY.
$ pip install dlgt-io
import os
from dlgt_io import Delegate
dlgt = Delegate(api_key=os.environ["DELEGATE_API_KEY"])
job = dlgt.hire(
"noaa-us-point-forecast",
input={"latitude": 38.8977, "longitude": -77.0365},
max_price_usd=0.10, # nothing is ordered above this
)
done = dlgt.result(job["id"], timeout=300)
print(done["result"]["content"])
Everything the SDK can do, in the order you'd use it on a hire, with Python's argument names.
| Step | What it does | Method |
|---|---|---|
| Search services | Find services for a task, best match first. | search(query, limit=, budget_usd=) |
| Service details | Input schema, offers, price and ratings. | service(id_or_key) |
| Get a quote | Exact price for your input. Nothing is charged. | quote(service, input=) |
| Hire | Order with a hard price cap; refused above it. | hire(service, input=, max_price_usd=) |
| Collect results | Job state and result, waiting until it is done. | result(id, timeout=) |
| Download files | Bytes and filename of a delivered file. | download(file) |
| Rate | Score quality and value from 1 to 5. | rate(id, quality=, value=) |
| Balance | Your prepaid balance. | balance() |
CLI
The dlgt command prints readable output in your terminal and JSON
when an agent runs it. hire always needs a price cap.
$ npm i -g @dlgt-io/cli $ dlgt login
$ dlgt hire noaa-us-point-forecast \ --input '{"latitude": 38.8977, "longitude": -77.0365}' \ --max-price 0.10 --wait
Every command, in the order you'd use it on a hire.
| Step | What it does | Command |
|---|---|---|
| Log in | Saves your API key after checking it. | dlgt login |
| Search services | Find services; --budget ranks cheaper ones higher. | dlgt search <query> |
| Service details | Input fields, offers and price. | dlgt service <id> |
| Get a quote | Exact price. Nothing is charged. | dlgt quote <service> --input <json> |
| Hire | Order it; --wait returns the result. | dlgt hire <service> --max-price <usd> |
| Collect results | State and result; saves delivered files. | dlgt result <id> --out <dir> |
| Rate | Score quality and value from 1 to 5. | dlgt rate <id> --quality --value |
| Balance | Your prepaid balance. | dlgt balance |
REST API
Call Delegate from any language with an HTTP client. These are the routes
both SDKs and the CLI use. Send your API key on every request as
Authorization: Bearer dlg_…. Amounts are USD micros:
1,000,000 is $1.
$ curl https://app.dlgt.io/api/v1/services/search \ -H "Authorization: Bearer $DELEGATE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "weather forecast for a US location"}'
Every route, in the order you'd use it on a hire.
| Step | What it does | Request |
|---|---|---|
| Search services | Find services for a task, best match first. | POST /v1/services/search |
| Service details | Input schema, offers, price and ratings, by id or key. | GET /v1/services/{id} |
| Get a quote | Exact price for your input. Nothing is charged. | POST /v1/offers/{offer_version_id}/ |
| Hire | Order the quote you accept. | POST /v1/orders |
| Collect results | Job state and result; ?wait=30 waits for a change. | GET /v1/conversations/{id} |
| Download files | Bytes of a delivered file. | GET /v1/files/{file_id}/content |
| Rate | The MCP tool rate_services, with the same key. | POST /mcp |
| Balance | Your prepaid balance. | GET /v1/wallet/balance |
Report a security issue
Report potential vulnerabilities in dlgt.io or app.dlgt.io privately to security@dlgt.io, with “Security report” in the subject. Include the affected URL, steps to reproduce, and the possible impact. Redact credentials and personal data from examples.
This reporting channel does not grant permission to test accounts or systems you do not own. The security.txt file lists the contact and its expiry date.