# For LLMs

Give your coding agent the prompt below. It links to the API contract, examples and billing rules without needing access to your account.

## One prompt to implement it

Paste this into the coding agent working on your project. Keep your API key in a server-side secret. The prompt contains no credentials.

### Implementation prompt

```text
Implement the feature I requested in this repository using uRouter. First read:
https://urouter.net/assets/docs/llms.txt
https://urouter.net/assets/docs/llms-full.txt
https://urouter.net/assets/docs/openapi.json

Use https://urouter.net/gateway/v1 for OpenAI-style requests, or https://urouter.net/gateway/anthropic for the supported Messages interface. Follow uRouter's documented fields and current model capabilities. Do not assume full OpenAI or Anthropic parity. If my requested feature is unclear or unsupported, explain the gap before building it.

Keep UROUTER_API_KEY in a server-side environment secret. Never request it in chat, commit it, expose it in the browser or put it in a URL. Discover exact model IDs and supported options from the live catalog.

Implement streaming and function-call handling where relevant. For media, persist job IDs and idempotency keys, poll result_state, and download authenticated artifacts only when ready.

Handle billing accurately: Eligible calls on a personal API key use Plan usage first, then paid credit. Key limits apply to the entire request. required_credit is a conservative hold, not the final charge. Token estimates are not billing quotes. Account for outstanding holds, key limits, insufficient credit and uncertain outcomes. Keep USD values as decimal strings and use financial_state and settled_usd to report charges. Link account funding and key management to https://urouter.net/developer/billing and https://urouter.net/developer/api-keys. Do not invent balance, payment or deposit APIs for ordinary personal inference keys. If the task explicitly uses an enrolled reseller workspace, switch to the reseller companion prompt and https://urouter.net/assets/docs/resellers.md for its distinct management and managed-customer contracts.

Disable automatic generation retries, preserve x-request-id, and reuse the same idempotency key and identical payload for the same logical operation. Never start duplicate paid work to bypass outcome_unknown. Use the documented recovery endpoints.

Adapt the implementation to this project's stack, include meaningful failure-path checks, and list any remaining setup. Use mocked requests by default. Run paid requests only when I explicitly authorize them.
```

## Reseller integration mode

For explicitly enrolled reseller workspaces, use the companion prompt and scoped reference. Management keys and managed customer credentials have separate capabilities; personal inference setup remains unchanged.

### Copy implementation prompt

```text
Implement a server-side reseller integration using https://urouter.net/assets/docs/resellers.md and https://urouter.net/assets/docs/openapi.json. This is reseller mode; ordinary personal inference keys have no management authority. First verify enrollment at https://api.urouter.net/v1/reseller. Store the single rotatable management key only on the server. Bind your authenticated customer identity to its scoped external ID and subaccount; never accept an arbitrary caller-supplied subaccount ID. Create/retrieve the customer idempotently, provision its inference key and deposit instructions, observe confirmed credits by signed webhook or polling. Proxy the complete customer-safe catalog from /v1/reseller/catalog, including all billing dimensions and pagination; these are final customer prices. Wholesale plus markup is calculated once on the platform. Do not apply markup again. Keep /pricing/models, markup, wholesale, earnings and management credentials out of customer responses and caches. Use the customer's credential for /v1/models, /v1/account/*, /v1/quotes, supported text/tool-call/streamed inference, images, video and speech. Preserve streaming without buffering, cancellation, tool calls, content types, request IDs and idempotency keys. Honor quote expiry and X-Price-Quote for the identical payload. For text quotes, select chat_completions, responses, messages or completions in the protocol field. Keep the request body and any anthropic-version or anthropic-beta headers identical to the ones used for the quote. Recover accepted requests/jobs and proxy authorized relative file paths under your verified public origin without an upstream login. Preserve unknown financial outcomes; never automatically generate or pay again. Use /earnings and /balance for settled funded margin only. Payouts require a dashboard-approved destination, earnings:read to review terms, explicit withdrawals:write permission and enabled bounded authority; review the amount, fee and net, retain the same idempotency key and poll the accepted withdrawal. A timeout is not a failed payment. Use the customer-only branded documentation pack for your customers; it excludes management and wholesale fields. Use fixtures and synthetic money for implementation and verification; this prompt does not authorize any real deposit, provider spend or payout. Disabled features remain disabled. Operational enrollment, verified origins, fee policy and treasury configuration must be supplied, never invented.
```

## Machine-readable reference

The index links to a plain-text reference and an OpenAPI 3.1 specification. All three are public and can be fetched without signing in.

- Use llms.txt to find the relevant topic. Use the OpenAPI spec for exact fields and endpoints.
- The reference describes the supported API today. Treat model availability and current required credit as live catalog data.

## What the agent can build

An integration can discover models, generate text and media, recover owned requests, and handle reservations and billing errors.

- Personal API keys use Plan usage and paid credit and do not administer accounts or payouts. Explicitly enrolled reseller management keys and managed customer credentials use the separate contracts in the reseller reference.
- Do not invent payment addresses or APIs. Use the declared credential scope and actual deposit instructions; unsupported OpenAI and Anthropic features remain unsupported.
