## SDKs and OpenAPI

The whole API is described as OpenAPI 3.1 at [`/openapi.json`](https://api.dexra.dev/openapi.json), generated from the same catalog as the server, with each tool's parameters, credits and price. Feed it to any OpenAPI generator, or use the small clients in the repository's `sdk/` folder. They have no dependencies, raise errors that say why a call needs a payment, and verify webhooks.

**TypeScript**

```ts
import { Dexra, verifyWebhook } from '@dexra/client'

  const dexra = new Dexra({ apiKey: process.env.DEXRA_API_KEY })
  const check = await dexra.tokenDeepCheck({ mint: 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263' })
  console.log(check.verdict, check.summary)
```

**Python**

```python
import os
  from dexra import Dexra, verify_webhook

  dexra = Dexra(api_key=os.environ["DEXRA_API_KEY"])
  check = dexra.token_deep_check(mint="DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263")
  print(check["verdict"], check["summary"])
```

Install with `npm install @dexra/client` or `pip install dexra`. Agent frameworks get ready-made plugins: each Dexra check becomes an action the agent can choose, with the key read from `DEXRA_API_KEY`.

**Solana Agent Kit**

```ts
// npm install @dexra/plugin-solana-agent-kit zod
import { SolanaAgentKit, createVercelAITools } from 'solana-agent-kit'
import DexraPlugin from '@dexra/plugin-solana-agent-kit'

const agent = new SolanaAgentKit(wallet, rpcUrl, {}).use(DexraPlugin)
const tools = createVercelAITools(agent, agent.actions) // DEXRA_TOKEN_DEEP_CHECK, DEXRA_SWAP_PREFLIGHT, …
```

**ElizaOS**

```ts
// npm install @dexra/plugin-elizaos
export const character = {
  name: 'Trader',
  plugins: ['@dexra/plugin-elizaos'],
  settings: { secrets: { DEXRA_API_KEY: process.env.DEXRA_API_KEY } },
}
// Actions: DEXRA_TOKEN_CHECK, DEXRA_WALLET_CHECK, DEXRA_SWAP_PREFLIGHT, …
```

Source: https://dexra.dev/docs/sdks
