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

  1. Sign up for Delegate. New accounts start with free credit.
  2. Create an API key at app.dlgt.io/keys. The same dlg_ key works for both SDKs, the CLI and the REST API.
  3. Add funds when you need them at app.dlgt.io/wallet.
  4. 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.

Install
$ npm i @dlgt-io/sdk
forecast.ts
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.

StepWhat it doesMethod
Search servicesFind services for a task, best match first.search(query, { limit, budgetUsd })
Service detailsInput schema, offers, price and ratings.service(idOrKey)
Get a quoteExact price for your input. Nothing is charged.quote(service, { input })
HireOrder with a hard price cap; refused above it.hire(service, { input, maxPriceUsd })
Collect resultsJob state and result, waiting until it is done.result(id, { timeout })
Download filesBytes and filename of a delivered file.download(file)
RateScore quality and value from 1 to 5.rate(id, { quality, value })
BalanceYour 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.

Install
$ pip install dlgt-io
forecast.py
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.

StepWhat it doesMethod
Search servicesFind services for a task, best match first.search(query, limit=, budget_usd=)
Service detailsInput schema, offers, price and ratings.service(id_or_key)
Get a quoteExact price for your input. Nothing is charged.quote(service, input=)
HireOrder with a hard price cap; refused above it.hire(service, input=, max_price_usd=)
Collect resultsJob state and result, waiting until it is done.result(id, timeout=)
Download filesBytes and filename of a delivered file.download(file)
RateScore quality and value from 1 to 5.rate(id, quality=, value=)
BalanceYour 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.

Install and log in
$ npm i -g @dlgt-io/cli
$ dlgt login
Hire a free forecast
$ 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.

StepWhat it doesCommand
Log inSaves your API key after checking it.dlgt login
Search servicesFind services; --budget ranks cheaper ones higher.dlgt search <query>
Service detailsInput fields, offers and price.dlgt service <id>
Get a quoteExact price. Nothing is charged.dlgt quote <service> --input <json>
HireOrder it; --wait returns the result.dlgt hire <service> --max-price <usd>
Collect resultsState and result; saves delivered files.dlgt result <id> --out <dir>
RateScore quality and value from 1 to 5.dlgt rate <id> --quality --value
BalanceYour 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.

Search services
$ 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.

StepWhat it doesRequest
Search servicesFind services for a task, best match first.POST /v1/services/search
Service detailsInput schema, offers, price and ratings, by id or key.GET /v1/services/{id}
Get a quoteExact price for your input. Nothing is charged.POST /v1/offers/{offer_version_id}/pricing-preview
HireOrder the quote you accept.POST /v1/orders
Collect resultsJob state and result; ?wait=30 waits for a change.GET /v1/conversations/{id}
Download filesBytes of a delivered file.GET /v1/files/{file_id}/content
RateThe MCP tool rate_services, with the same key.POST /mcp
BalanceYour 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.