---
title: "Sponsor a transaction (relayer pays the gas)"
method: POST
path: "/api/7702/sponsor"
tags: ["sponsored-transactions"]
---

# Sponsor a transaction (relayer pays the gas)

`POST /api/7702/sponsor`

## Request

- Base URL: `https://api.anygas.xyz/svc`
- URL: `https://api.anygas.xyz/svc/api/7702/sponsor`
- Auth: none declared

Submits your authorization as a type-4 transaction with the relayer paying gas. Public sponsorship is PREPAID in USDC over x402: calling without payment returns HTTP 402 plus an accepts[] invoice and the full plan, so pricing is always free to check. Send {"dry":true} for a preview that never broadcasts. Set x-idempotency-key so a timeout retry cannot pay twice.

## Request body

- object
  - `chainId` integer, required
  - `authorization` object, required
  - `to` string
  - `data` string
  - `dry` boolean: price it without broadcasting

## Response `200`

Broadcast result or dry plan

- object

## Other responses

- `402`: Payment required - x402 invoice plus the full plan
- `429`: Typed error - branch on errorCode, never on the message text
- `503`: Typed error - branch on errorCode, never on the message text

---

[API](https://skmtc.dev/anygas/apis/robyn-anygas-api.md) · [All operations](https://skmtc.dev/anygas/apis/robyn-anygas-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anygas/apis/robyn-anygas-api/revisions/9b7498be8304?raw)
