> For the complete documentation index, see [llms.txt](https://docs.rigoblock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rigoblock.com/models.md).

# Models

## The QuoteResponse object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"QuoteResponse":{"type":"object","description":"Best swap quote across 150+ liquidity sources (0x default) or Uniswap V2/V3/V4","properties":{"sellToken":{"type":"string","description":"Address of the token being sold"},"buyToken":{"type":"string","description":"Address of the token being bought"},"sellAmount":{"type":"string","description":"Sell amount in token base units (wei)"},"buyAmount":{"type":"string","description":"Buy amount in token base units"},"price":{"type":"string","description":"Exchange rate (buy per sell)"},"source":{"type":"string","description":"DEX source routing the quote"},"chain":{"type":"string","description":"Chain the quote is valid on"},"calldata":{"type":"string","description":"Encoded calldata for on-chain execution"},"to":{"type":"string","description":"Contract address to send the swap transaction to"},"value":{"type":"string","description":"ETH value to attach (for native token swaps)"},"gasEstimate":{"type":"string","description":"Estimated gas units for the transaction"}}}}}}
```

## The ChatRequest object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ChatRequest":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","description":"Conversation history in OpenAI message format","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}}}},"vaultAddress":{"type":"string","description":"RigoBlock vault (smart pool) address for vault-scoped operations"},"contextDocs":{"type":"array","description":"Optional request-scoped context snippets (for example markdown excerpts) injected into the model prompt for this request.","items":{"type":"string"}},"chain":{"type":"string","description":"Target chain context","default":"base","enum":["base","arbitrum","ethereum","optimism","polygon","bsc","unichain"]}}}}}}
```

## The ChatResponse object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ChatResponse":{"type":"object","properties":{"message":{"type":"string","description":"AI-generated response text"},"reasoning":{"type":"string","description":"Reasoning trace from the model, when available."},"modelsUsed":{"type":"array","description":"Ordered list of model identifiers that contributed to this output.","items":{"type":"string"}},"finalModel":{"type":"string","description":"Model that authored the final natural-language output (or 'tooling' when output is tool-native)."},"action":{"type":"object","description":"Executable on-chain action, if applicable","properties":{"type":{"type":"string","enum":["swap","position","analysis"],"description":"Action type"},"to":{"type":"string","description":"Contract address"},"calldata":{"type":"string","description":"Encoded transaction calldata"},"value":{"type":"string","description":"ETH value to attach"},"gasEstimate":{"type":"string","description":"Estimated gas"}}}}}}}}
```

## The X402PaymentRequired object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"X402PaymentRequired":{"type":"object","description":"Standard x402 payment challenge","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"maxAmountRequired":{"type":"string"},"resource":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"},"payTo":{"type":"string","description":"USDC recipient address on Base"},"maxTimeoutSeconds":{"type":"integer"},"asset":{"type":"string","description":"USDC contract address on Base"},"extra":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}}}}}}}}}}}
```

## The ToolDefinition object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ToolDefinition":{"type":"object","description":"OpenAI-compatible function schema for a single DeFi tool","required":["name","description","category","parameters","requiresOperatorAuth","readOnly"],"properties":{"name":{"type":"string","description":"Canonical tool name used in POST /api/tools?toolName={name}"},"description":{"type":"string","description":"What the tool does and when to use it"},"category":{"type":"string","description":"Functional group","enum":["Spot Trading","Vault Info","GMX Perpetuals","Uniswap v4 LP","Cross-Chain","GRG Staking","Vault Management","Delegation","TWAP Orders","NAV Sync","Operator Settings","Oracle","Strategy","Other"]},"parameters":{"type":"object","description":"JSON Schema for the tool's arguments object"},"requiresOperatorAuth":{"type":"boolean","description":"If true, the tool can only be invoked when the request includes a valid operator signature"},"readOnly":{"type":"boolean","description":"If true, the tool only reads data and never produces transaction calldata"}}}}}}
```

## The ToolCatalogResponse object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ToolCatalogResponse":{"type":"object","required":["description","usage","price","toolCount","tools"],"properties":{"description":{"type":"string"},"usage":{"type":"string"},"price":{"type":"string"},"toolCount":{"type":"integer","description":"Total number of tools in the catalog"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolDefinition"}}}},"ToolDefinition":{"type":"object","description":"OpenAI-compatible function schema for a single DeFi tool","required":["name","description","category","parameters","requiresOperatorAuth","readOnly"],"properties":{"name":{"type":"string","description":"Canonical tool name used in POST /api/tools?toolName={name}"},"description":{"type":"string","description":"What the tool does and when to use it"},"category":{"type":"string","description":"Functional group","enum":["Spot Trading","Vault Info","GMX Perpetuals","Uniswap v4 LP","Cross-Chain","GRG Staking","Vault Management","Delegation","TWAP Orders","NAV Sync","Operator Settings","Oracle","Strategy","Other"]},"parameters":{"type":"object","description":"JSON Schema for the tool's arguments object"},"requiresOperatorAuth":{"type":"boolean","description":"If true, the tool can only be invoked when the request includes a valid operator signature"},"readOnly":{"type":"boolean","description":"If true, the tool only reads data and never produces transaction calldata"}}}}}}
```

## The OracleEnrichment object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"OracleEnrichment":{"type":"object","description":"On-chain oracle spot-price metadata appended to DEX API responses","properties":{"priceFeedExists":{"type":"boolean","description":"Whether both tokens have an active BackgeoOracle price feed"},"deltaBps":{"type":"integer","description":"Divergence between DEX expected output and oracle spot price, in basis points. Positive = DEX gives less than oracle. Negative = DEX gives more."},"oracleAmount":{"type":"string","description":"Expected output amount from oracle spot price, in base units (wei/smallest token unit)"}}}}}}
```

## The OperatorSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"OperatorSettingsRequest":{"type":"object","required":["vaultAddress","chainId","operatorAddress","authSignature","authTimestamp"],"properties":{"vaultAddress":{"type":"string","description":"Vault contract address"},"chainId":{"type":"integer","description":"Chain ID where the vault exists"},"operatorAddress":{"type":"string","description":"Vault owner address"},"authSignature":{"type":"string","description":"EIP-191 signature of the auth message"},"authTimestamp":{"type":"integer","description":"Timestamp included in the signed auth message"},"slippage":{"type":"string","description":"Slippage value (e.g. '0.5%', '50bps', or '0.5')"},"tolerance":{"type":"string","description":"Swap Shield tolerance percentage (e.g. '30%')"},"threshold":{"type":"string","description":"NAV Shield threshold percentage (e.g. '15%')"},"reset":{"type":"boolean","description":"When true, reset the setting to its default value"}}}}}}
```

## The ExecModeRequest object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ExecModeRequest":{"type":"object","required":["vaultAddress","chainId","operatorAddress","authSignature","authTimestamp","mode"],"properties":{"vaultAddress":{"type":"string","description":"Vault contract address"},"chainId":{"type":"integer","description":"Chain ID where the vault exists"},"operatorAddress":{"type":"string","description":"Vault owner address"},"authSignature":{"type":"string","description":"EIP-191 signature of the auth message"},"authTimestamp":{"type":"integer","description":"Timestamp included in the signed auth message"},"mode":{"type":"string","enum":["autonomous","confirm"],"description":"Autonomous executes trades immediately; confirm requires an explicit approval"}}}}}}
```

## The ExecModeResponse object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ExecModeResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"mode":{"type":"string","enum":["autonomous","confirm"]}}}}}}
```

## The SettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"SettingsResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Rigoblock","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}
```
