Building with Nex-T1: Developer Integration Guide
Complete technical guide to integrating Nex-T1 into your dApp or trading system. API documentation, code examples, and best practices for production deployment.

Nex-T1 isn't just a standalone application—it's a platform you can build on. Whether you're developing a DeFi dashboard, automated trading system, or custom crypto tool, the Nex-T1 API gives you programmatic access to all the intelligence and execution capabilities of our AI agent.
This guide walks through everything developers need to integrate Nex-T1 into their applications, from authentication to advanced features.
API Overview and Authentication
The Nex-T1 API is RESTful and supports both HTTP requests and WebSocket connections for real-time streaming. All endpoints require authentication via API keys. You can generate API keys from your dashboard under Settings > Developers.
API keys have configurable permissions, letting you restrict access to read-only operations, specific chains, spending limits, or IP address ranges. Production applications should use separate keys with minimal required permissions.
Base URL: https://api.nex-t1.ai/v1. Authentication: Include your API key in the Authorization header as 'Bearer YOUR_API_KEY'. Rate limits apply based on your plan tier.
Core API Endpoints
Chat Completion (POST /chat/completions): The primary endpoint for conversing with Nex-T1. Supports all models (T0, T1, MAX, Coder) and returns structured responses including text, tool calls, and reasoning traces.
Request structure includes model selection, messages array with conversation history, optional tool choices, and streaming preference. The API maintains conversation context across requests using message history.
Portfolio Data (GET /portfolio): Retrieve aggregated portfolio data across all connected wallets and chains. Returns current holdings, valuations, profit/loss, and historical performance.
Market Data (GET /market): Access real-time and historical market data from multiple providers. Supports token prices, OHLCV charts, liquidity metrics, and volume analysis.
Transaction Execution (POST /transactions): Execute on-chain operations including swaps, transfers, contract interactions, and approvals. Supports transaction simulation before execution.
Streaming Responses
For real-time applications, use streaming endpoints. Nex-T1 streams responses in server-sent event format, allowing your app to display partial results as they generate. This dramatically improves perceived performance for complex queries.
Enable streaming by setting stream: true in requests. The response includes multiple event types: text deltas for generated content, thinking updates showing reasoning process, tool calls for executed operations, and completion events signaling finished responses.
Tool Calling and Execution
Nex-T1's power comes from its 26+ integrated tools covering wallet operations, market intelligence, DeFi protocols, and smart contract interaction. When you ask Nex-T1 to perform an action, it automatically selects and calls appropriate tools.
As a developer, you can specify which tools are available for specific requests, implement human-in-the-loop approval flows, monitor tool execution in real-time, and override tool parameters programmatically.
Example: Restricting tools to read-only operations ensures Nex-T1 can't execute transactions without explicit approval—useful for financial applications requiring compliance controls.
Wallet Integration Patterns
Most applications need to connect user wallets to Nex-T1. Two primary integration patterns exist: In-App Wallets using Thirdweb integration, or External Wallets via WalletConnect or direct RPC connection.
In-app wallets provide seamless UX but require secure key management. External wallet connections give users full custody but require wallet browser extensions or mobile apps.
For production applications, we recommend supporting both patterns, letting users choose their preferred custody model.
Error Handling and Retry Logic
Network errors happen. Rate limits hit. Transactions fail. Production integrations need robust error handling. The Nex-T1 API returns structured errors with codes, messages, and retry guidance.
Common error scenarios include rate limit exceeded (429), authentication failed (401), insufficient balance (400), transaction reverted (400), and service temporarily unavailable (503).
Implement exponential backoff for retriable errors. For transaction failures, check if the error is permanent before retrying. Network errors typically warrant retry, but insufficient balance errors do not.
Caching and Performance Optimization
Minimize API calls by caching responses appropriately. Portfolio data changes on every block, but token metadata and market cap data changes infrequently. Cache static data aggressively, cache market data for seconds, and never cache wallet balances longer than one block.
Use WebSocket connections for real-time data rather than polling. A single WebSocket provides updates as they occur, reducing load and latency compared to repeated HTTP requests.
Security Best Practices
API key security is critical. Store keys in environment variables, never commit them to version control, rotate keys periodically, use separate keys for development and production, and implement IP allowlisting for production keys.
For frontend applications, never expose API keys client-side. Instead, proxy requests through your backend, implement user authentication, and enforce per-user rate limits.
Transaction signatures should happen client-side with user wallets. The API facilitates transaction building but users maintain custody of signing keys.
Testing and Development
Test integrations thoroughly before production deployment. Nex-T1 provides a sandbox environment with testnet support, simulated transactions, and rate limit exemptions. Use testnets like Goerli, Sepolia, and Solana Devnet for integration testing.
Mock data endpoints return consistent test responses for repeatable testing. Transaction simulation endpoints validate transactions before broadcast, preventing costly errors.
Example: Building a Trading Dashboard
Let's walk through a common integration: building a dashboard that displays portfolio data and executes trades via Nex-T1. The architecture includes a React frontend, Node.js backend proxy, Nex-T1 API client, and user wallet integration.
Users authenticate with your application, connect their wallet, and your backend securely calls Nex-T1 to fetch portfolio data and market intelligence. When users want to trade, your frontend collects parameters, your backend calls Nex-T1 to prepare the transaction, and users sign with their wallet. Your backend submits the signed transaction via Nex-T1, which handles gas optimization and routing.
This pattern keeps API keys secure while giving users control over transaction signing.
Advanced Features
Automated Strategies: Set up recurring tasks that run on schedules or triggers. Nex-T1 can monitor conditions and execute actions automatically. Custom Tool Integration: Extend Nex-T1 with your own tools and data sources via webhooks. Multi-User Management: Manage separate Nex-T1 instances for each user with isolated wallets and settings. Analytics and Monitoring: Track usage, performance, and costs across your integration.
Support and Resources
Full API documentation is available at https://api.nex-t1.ai/docs with interactive examples and detailed endpoint references. SDK libraries for TypeScript, Python, and Go simplify integration. Our developer Discord provides community support and direct access to the Nexis engineering team.
For enterprise customers, we offer dedicated integration support, custom SLAs, and priority feature development. Ready to build? Generate your API key and start integrating today.