Make your first call
Send one request to an endpoint and confirm the reply, the charge and the receipt.
Before you start
- An API key in
DOTAGENT_API_KEY(Create API key). - A balance that covers the call (Funding).
Pick an endpoint
- ScreenService › API
- ActionCopy model name
- Resultpad/JPX
Copy the model namepad/JPX is ready for any client
Example dataThe gateway lists every live endpoint and raw model at a public route; endpoints come first with owned_by: "endpoint".
Reading the gateway URL and model list from the backend.
Send the request
- ScreenYour code
- ActionOne request
- ResultCall appears in the log
Your request finishesIt appears in the public log with its receipt
Example dataUse the OpenAI or the Anthropic shape. Both reach the same endpoint and bill the same way.
pip install openaiReading the gateway URL and model list from the backend.
Check the result
- ScreenResponse
- Actionx-ec-* headers
- ResultReceipt id
Open the receiptMoney and tokens, never content
Example dataA successful call returns the standard body plus these headers. Non-streaming responses carry the exact charge; streams carry it in the final ec event.
| Header | Example | Meaning |
|---|---|---|
x-ec-receipt | r_01JA8Q3F1… | Receipt id |
x-ec-funding | balance | What paid: allowance, balance or test |
x-ec-model | anthropic/claude-sonnet-5.5 | Model that answered |
x-ec-route | primary | primary, fallback-1 or fallback-2 |
x-ec-version | 7 | Endpoint version (endpoint calls only) |
x-ec-cost-micro | 41205 | Provider cost in micro-USD |
x-ec-fee-micro | 2061 | Platform fee |
x-ec-markup-micro | 6181 | Endpoint markup |