# Introduction
Source: https://docs.fortytwo.network/apis/api-reference-intro
[Get API Access ](https://tally.so/r/mYNDW5)
The Fortytwo API provides an access to the [Swarm Inference ](https://fortytwo.network/swarminference).
## Endpoints
[Get Models](/apis/get-models) — List available language models. [Read more](/docs/api-models).
[Chat Completions](/apis/chat-completions) — Generate chat completions (supports streaming). [Read more](/docs/api-chat-completions).
## Authentication
All requests to the Fortytwo API require authentication using an **API key**.
While in Preview, apply for the API access via the [Fortytwo: API Access Form ](https://tally.so/r/mYNDW5).
**Keep your API key secure!** Your API key should be treated like a password. Never share it publicly or commit it to version control systems.
## Documentation
Read on the API usage in the [API Documentation](/docs/api-authentication) or refer to the '[Quick Start](/docs/api-usage)' to try it out easily.
# Chat Completions
Source: https://docs.fortytwo.network/apis/chat-completions
fortytwo_openapi.json POST /v1/chat/completions
Generates text responses using the Swarm Inference of the Fortytwo network. [Read more](/docs/api-chat-completions).
# Get Models
Source: https://docs.fortytwo.network/apis/get-models
fortytwo_openapi.json GET /v1/models
Returns all the available Swarm Inference models in the Fortytwo network. [Read more](/docs/api-models).
# Changelog
Source: https://docs.fortytwo.network/changelog
### Fixed
* Autonat v2 never determining NAT status: calling `add_external_address()` in the identify handler marked the observed address as confirmed before identify could emit `NewExternalAddrCandidate`, causing the swarm to suppress the candidate event. Autonat v2 client never received candidates to test, leaving NAT status unknown and triggering infinite node restarts.
### Fixed
* Gossipsub mesh shrinkage has been fixed to adapt to traffic rates. Positive per-topic weights are now applied.
* Non-globally routable addresses are now filtered before emitting `NewExternalAddrOfPeer` events. This prevents loopback and private addresses from entering the peerstore and being dialed by Gossipsub and other protocols.
### Changed
* Increased the limit for pending incoming connections from 64 to 256.
### Added
* `ConnectionLimits` behaviour to bound per-peer (default 2) and pending incoming (default 64) connections, preventing unbounded connection accumulation from misbehaving peers.
* New `NetworkLimitsConfig` with env-configurable fields: `FT_YAMUX_MAX_STREAMS`, `FT_MAX_ESTABLISHED_PER_PEER`, `FT_MAX_PENDING_INCOMING`.
### Changed
* Upgraded AutoNAT from v1 to v2 for wire compatibility with bootstrap nodes (v2 server).
### Fixed
* DCUtR failure logs now include attempt count (e.g. `attempt 1/3`) so operators can distinguish transient first-attempt failures from actual problems at max retries.
* Fixed yamux substream asymmetry: relay client transport now uses the same yamux config as direct transport instead of the 256-stream default.
* Lowered default `yamux_max_streams` from 1024 to 256 (sufficient for `mesh_n_high=2`).
*General stability improvements.*
### Fixed
* Only confirmed external addresses are now advertised to peers.
* Preventing non-routable addresses from entering the DHT at swarm construction time.
### Added
* Status bar showing current system load,
* Status bar also shows an overlay for active downloads.
* Per-model performance stats: Win Rate, Inference Participation Rate, and Tokens per Hour with detailed on-hover tooltips.
* Reward Summary now shows rewards confirmed on the blockchain, as well as pending and lost rounds which are tracked locally by the App.
### Changed
* Improved model storage and cleanup to better protect manually selected models.
* Smarter auto-model cleanup to reduce disk usage without breaking active setups.
* Rewards and rounds are now updated reliably, even when the node is paused or stopped.
* Improved "Start after download" and "Enable when ready" behaviors (the latter is now enabled by default).
* Updated colors and text styles for both dark and light themes.
### Fixed
* Fixed an issue where a model briefly appeared as "failed" after canceling a download.
* Improved handling of a stuck capsule — it is now terminated on node startup.
### Added
* Relay circuit addresses are now propagated to connected peers via the Identify protocol, improving address discovery for nodes behind NATs.
* Experimental infrastructure for direct peer-to-peer connectivity (DCUtR). Protocol nodes now listen on relay circuit addresses, laying the groundwork for NAT traversal via relay-assisted hole-punching. This feature is enabled by default but should be considered experimental — we will share production results in a future release.
### Improved
* Relay connectivity is now always-on rather than requiring explicit activation.
* Streamlined internal event handling for relay connections.
* Tuned consensus message parameters to improve network stability.
### Fixed
* Resolved an issue where Docker bridge IPs and other private network addresses could propagate to the DHT, causing `WrongPeerId` errors when peers attempted to dial.
* Private and non-routable addresses are now filtered at multiple stages: peer store, Kademlia, and address advertisement.
* Updated core networking dependencies for improved protocol compatibility.
### Added
* Rate limiting for relay reservations and circuits. Relays now enforce per-peer and per-IP token-bucket rate limits to prevent resource exhaustion from misbehaving or compromised peers.
* Denial metrics. Relay operators can now see accepted/denied reservation and circuit counts (with denial reasons) in Grafana dashboards.
### Changed
* Lowered relay resource caps to safer defaults: 128 max reservations (was 1024), 16 max circuits (was 32), with tighter per-peer limits.
### Added
* Wired up dial backoff to record connection failures and prevent rapid reconnection attempts.
### Security
* Capped Brotli decompressed output to 4 MiB to prevent decompression bomb OOM attacks.
### Fixed
* Fixed autonat healthcheck.
*The initial release of Fortytwo P2P Relay.*
Refer to the '[Fortytwo P2P Relay Quick Start guide](/docs/relay-quick-start)' to learn how to run the Relay Node via the Docker setup.
### Added
Added new featured model:
* **GLM-4.7-Flash Q4**: Long-context reasoning at high efficiency, with steady logic, math, and coding across large inputs.
*REPO = unsloth/GLM-4.7-Flash-GGUF*
*MODEL NAME = GLM-4.7-Flash-Q4\_K\_M.gguf*
### Changed
* New model takes place of an older one on position #8: **Qwen3-30B-A3B-Thinking-2507 Q4** -> **GLM-4.7-Flash Q4**
### Removed
Removed an older featured model:
* **Qwen3-30B-A3B-Thinking-2507 Q4**
*REPO = unsloth/Qwen3-30B-A3B-Thinking-2507-GGUF*
*MODEL NAME = Qwen3-30B-A3B-Thinking-2507-Q4\_K\_M.gguf*
### Added
Added new featured model:
* **GLM-4.7-Flash Q4**: Long-context reasoning at high efficiency, with steady logic, math, and coding across large inputs.
*REPO = unsloth/GLM-4.7-Flash-GGUF*
*MODEL NAME = GLM-4.7-Flash-Q4\_K\_M.gguf*
### Changed
* For CLI, new model takes place of an older one on position #8: **Qwen3-30B-A3B-Thinking-2507 Q4** -> **GLM-4.7-Flash Q4**
### Removed
Removed an older featured model:
* **Qwen3-30B-A3B-Thinking-2507 Q4**
*REPO = unsloth/Qwen3-30B-A3B-Thinking-2507-GGUF*
*MODEL NAME = Qwen3-30B-A3B-Thinking-2507-Q4\_K\_M.gguf*
### Added
* Added support for **GLM-4.7-Flash**.
### Fixed
* Changed the model file name path: GLM-4.7-Q4\_K\_M-00001-of-00005.gguf -> Q4\_K\_M/GLM-4.7-Q4\_K\_M-00001-of-00005.gguf
### Changed
* Changed the outdated model file name: LGAI-EXAONE\_EXAONE-4.0-32B-Q4\_K\_M.gguf -> EXAONE-4.0-32B-Q4\_K\_M.gguf
### Fixed
* Changed the model file name path: GLM-4.7-Q4\_K\_M-00001-of-00005.gguf -> Q4\_K\_M/GLM-4.7-Q4\_K\_M-00001-of-00005.gguf
### Changed
* Changed the outdated model file name: LGAI-EXAONE\_EXAONE-4.0-32B-Q4\_K\_M.gguf -> EXAONE-4.0-32B-Q4\_K\_M.gguf
### Added
* New Wallet page with a clear balance summary.
* Reward estimation is now available: you can preview your upcoming rewards using this feature.
* Blockchain events are now tracked more reliably, ensuring rewards are reflected correctly, even if they arrive later
### Changed
* Redesigned top toolbar with quick Wallet access.
* Updated the "Slow" tag logic: it is now calculated based on total system memory rather than currently available memory.
### Fixed
* Unused models are now handled more safely, reducing the risk of removing anything you might still need.
* Opening notifications no longer resets your timeline — your full history remains visible and uninterrupted.
* Fixed an issue where the Settings page didn’t show a notification when switching between Auto and Manual modes.
### Added
Added new featured models:
* **Kimi-K2-Thinking**: Efficient Mixture of Experts reasoning; balanced accuracy, coherence, and efficiency across general and technical tasks.
*REPO = unsloth/Kimi-K2-Thinking-GGUF*
*MODEL NAME = Q4\_K\_M/Kimi-K2-Thinking-Q4\_K\_M-000XX-of-00013.gguf*
* **MiniMax-M2.1**: Versatile generalist with standout coding, creative and complex reasoning skills.
*REPO = unsloth/GLM-4.7-GGUF*
*MODEL NAME = GLM-4.7-Q4\_K\_M-0000X-of-00005.gguf*
* **Rnj-1 8B**: Long-context reasoning abilities for science and technical questions; strong capabilities in code and maths.
*REPO = bartowski/EssentialAI\_rnj-1-instruct-GGUF*
*MODEL NAME = EssentialAI\_rnj-1-instruct-Q4\_K\_M.gguf*
* **Nanbeige4-3B-Thinking-2511**: Thoughtful step-by-step solver; excels at competition math, graduate science, and function calling.
*REPO = bartowski/Nanbeige\_Nanbeige4-3B-Thinking-2511-GGUF*
*MODEL NAME = Nanbeige\_Nanbeige4-3B-Thinking-2511-Q4\_K\_M.gguf*
### Changed
* **Kimi-K2-Thinking** added to #3 position.
* **MiniMax-M2.1** added to #4 position.
* Models in EXTREME TIER, HEAVY TIER, and LIGHT TIER get +2 in numeration (e.g. 3 -> 5) up to #20 **Rnj-1-8B**.
* **Rnj-1-8B** added to position #20 and all models after it have shifted by +1 in numeration, becoming +3 in total relatively to the past version order (e.g. 18 -> 21, 19 -> 22) up to #25 **Nanbeige4-3B-Thinking-2511**.
* **Nanbeige4-3B-Thinking-2511** added to position #25 and all models after it have shifted by +1 in numeration, becoming +4 in total relatively to the past version order (e.g. 22 -> 26, 23 -> 27).
### Fixed
* **Gemma-3 4B Q4** -> **Gemma-3 12B Q4**. The old name was incorrect and pointed to the 12B repository.
### Added
* **Kimi-K2-Thinking**: Efficient Mixture of Experts reasoning; balanced accuracy, coherence, and efficiency across general and technical tasks.
*REPO = unsloth/Kimi-K2-Thinking-GGUF*
*MODEL NAME = Q4\_K\_M/Kimi-K2-Thinking-Q4\_K\_M-000XX-of-00013.gguf*
* **MiniMax-M2.1**: Versatile generalist with standout coding, creative and complex reasoning skills.
*REPO = unsloth/GLM-4.7-GGUF*
*MODEL NAME = GLM-4.7-Q4\_K\_M-0000X-of-00005.gguf*
* **Rnj-1 8B**: Long-context reasoning abilities for science and technical questions; strong capabilities in code and maths.
*REPO = bartowski/EssentialAI\_rnj-1-instruct-GGUF*
*MODEL NAME = EssentialAI\_rnj-1-instruct-Q4\_K\_M.gguf*
* **Nanbeige4-3B-Thinking-2511**: Thoughtful step-by-step solver; excels at competition math, graduate science, and function calling.
*REPO = bartowski/Nanbeige\_Nanbeige4-3B-Thinking-2511-GGUF*
*MODEL NAME = Nanbeige\_Nanbeige4-3B-Thinking-2511-Q4\_K\_M.gguf*
### Changed
Model numbers for Fortytwo P2P CLI were updated:
* **Kimi-K2-Thinking** added to #3 position.
* **MiniMax-M2.1** added to #4 position.
* Models in EXTREME TIER, HEAVY TIER, and LIGHT TIER get +2 in numeration (e.g. 3 -> 5) till #20 **Rnj-1-8B**.
* **Rnj-1 8B** added to position #20 and all models after it have shifted by +1 in numeration, becoming +3 in total relatively to the past version order (e.g. 18 -> 21, 19 -> 22) till #25 **Nanbeige4-3B-Thinking-2511**.
* **Nanbeige4-3B-Thinking-2511** added to position #25 and all models after it have shifted by +1 in numeration, becoming +4 in total relatively to the past version order (e.g. 22 -> 26, 23 -> 27).
### Added
* Added support for **Rnj-1 8B**, **GLM-4.7**, **Kimi-K2-Thinking**.
### Added
* Cache for reward and wallet values so the latest available data is shown on startup and after disconnects.
### Changed
* **Improved model tags**: recommended models in manual mode are now calculated based on available system resources rather than total resources.
* **Optimized RMB menu on system tray icon**:
* Removed Color Scheme selection. It can now be defined in Settings from within the app.
* Replaced Parameters with Settings, which opens the app directly to the Settings menu.
### Fixed
* Visualization mode issues that occurred after disconnecting.
### Fixed
* Fixed round's leaderboard table.
### Changed
* (Windows) Resolved script execution warnings.
*The initial release of Fortytwo P2P Container.*
Refer to the '[Fortytwo P2P Container Quick Start guide](/docs/quick-start)' to learn how to run the Inference Node via the Docker setup.
### Changed
* The contract address used to fetch the FOR token balance.
### Fixed
* Resolved an issue preventing the p2p-known-peers file from being saved on certain systems.
### Fixed
* Bug fixes.
### Added
* Additional technical logs.
### Changed
* Updated smart contract addresses.
* Optimized p2p network.
### Fixed
* Fixed bandwidth metrics.
* Improved network load balancing.
*Introducing a major update with node operation visualization. We’ve added a timeline that shows the node’s recent round performance history and placed an emphasis on visualizing the round phases right above the timeline. Now, when your node participates in a round, you can see what it does: when it enters the round, generates a response, or evaluates responses from other participants. This is the same information you get from the Fortytwo P2P CLI logs, but presented in a clean UI with animations*
### Added
* **Timeline view:** Node performance timeline visualization.
* **Round status bar:** Animation of the current round status above the timeline.
* **KV Cache “Apply” button:** After changing cache settings, click the Apply button—no need to restart the node manually.
* **Transparent download status on startup:** The startup screen now shows download progress when an update is required.
### Changed
* Improved network disconnection detection for more reliable and accurate handling.
### Changed
* A new Hugging Face API handle has been adopted for searching in the model manager.
### Changed
* Updated server endpoints.
### Changed
* Updated server endpoints.
### Added
* Settings page containing all options previously available only in system tray.
* KV Cache configuration (Auto / Min / Medium / Max / Custom) both through the Settings page and system tray.
* Improved model management controls: clearing model performance data and auto-removal behavior.
### Added
* Added environment-based configuration support.
* Added support for multi-GPU cache size calculation.
### Changed
* Updated server endpoints.
### Added
* Added model list versioning. Current version is now visible on the About page.
### Changed
* Locally stored encrypted private key file is now renamed and hidden.
* Reduced frequency of some notifications. VPN alerts should no longer appear too often.
### Fixed
* Corrected model size conversion (GiB → GB) for Hugging Face models.
* Hidden unnecessary update messages (checking for updates, no updates) during normal runtime.
* Restart button now functions correctly.
### Changed
* Updated server endpoints.
### Changed
* Updated server endpoints.
### Changed
* Updated server endpoints.
### Changed
* Updated server endpoints.
### Added
* Added new featured model: **VibeThinker 1.5B**: Efficient reasoning performance with math and coding problems; suitable for nodes with tight memory.
*REPO = mradermacher/VibeThinker-1.5B-GGUF*
*MODEL NAME = VibeThinker-1.5B.Q4\_K\_M.gguf*
### Added
* Added new featured model: **VibeThinker 1.5B**: Efficient reasoning performance with math and coding problems; suitable for nodes with tight memory.
### Changed
* (Windows) Extended cleanup when updating the capsule.
### Fixed
* Fixed issues that caused the Capsule to stop without an exit code on Windows systems with Nvidia RTX 40xx and 50xx series.
### Fixed
* Fixed an issue that caused a loss of some requests in the network.
### Fixed
* Fixed an issue that caused a `Model produced no output` error to be displayed incorrectly.
### Fixed
* Network traffic and stability optimization.
*Improved readability, Windows layout fix.*
### Added
* General readability improvements, style unification and extra spacings added.
* (Windows) SETTINGS symbol added instead of a symbol that caused visualization issues.
* Settings now have a header when activated.
* Auto-Select mode now has a header when activated.
### Changed
* "You chose" text has been changed to "Model selected" in the model selection option.
*Better logs readability.*
### Changed
* "New request found" log entries are now summarized to not overload the CLI log.
### Added
* Added a new field to the Bug Report form, `Specify public wallet address`. Filling out this field can substantially speed up resolving an issue.
### Fixed
* Architecture for Linux version now correctly shows x64 instead of ARM64.
* Fixed an issue with activation code functionality during authorization.
* Fixed an issue where “Insufficient MON” notification was displayed when a user had sufficient MON in their wallet.
*Better logs readability.*
### Changed
* Improved logs readability by reducing the number of excessive log entries and removing unnecessary details.
*Strand-Rust-Coder-14B-v1 is now available in the CLI App. Our first Fortytwo-native model built with the community; state-of-the-art for Rust code generation.*
You can find more details on the [model's Hugging Face page ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF).
### Added
* **Strand-Rust-Coder-14B-v1** is available under 21st position in the model selection list.
### Fixed
* Fixed custom model import from Hugging Face for Windows.
### Added
* Added new rust model **Fortytwo\_Strand-Rust-Coder-14B-v1**: Built by Fortytwo: Rust specialist that outputs idiomatic, compile-ready code and handles fixes/refactors; state-of-the-art on Rust benchmarks.
*REPO = Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF*
*MODEL NAME = Fortytwo\_Strand-Rust-Coder-14B-v1-Q4\_K\_M.gguf*
### Changed
* (Fortytwo P2P CLI) Strand-Rust-Coder-14B-v1 now takes position number **21** instead of **Tessa-Rust-T1-7B**.
### Removed
* **Tessa-Rust-T1-7B**
*bartowski/Tesslate\_Tessa-Rust-T1-7B-GGUF*
*Tesslate\_Tessa-Rust-T1-7B-Q4\_K\_M.gguf*
*Added support of features from the ⎔ Capsule 0.2.3 release.*
### Added
* **KV Cache** can now be manually defined.
* The option can be found under Settings category in the model selection menu.
* The option must be defined each time the script is restarted.
* Default option on start-up has `mode` set to `auto`, allocating as much available resources as possible for caching.
* Added support for **local GGUF model import** under Import Custom option in the model selection menu list.
### Changed
* **Settings** menu option added to the model selection list as a **\[0]** option.
* **Import Custom** now provides options: **\[1] Hugging Face Import** or **\[2] Local GGUF Model Import**.
*Strand-Rust-Coder-14B-v1 is now available in the App. Our first Fortytwo-native model built with the community; state-of-the-art for Rust code generation.*
You can find more details on the [model's Hugging Face page ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF).
### Added
* macOS version is now signed and supports auto-updates.
* New app update checking flow: startup update screen has been redesigned; the app now also downloads updates for protocol/capsule during the initial update.
* New model card view — you can now set the model to immediately enable upon download completion.
* Improved model manager performance — model list is now cached in the storage folder and updates automatically; models and updates should now be accessible in most countries without a VPN.
* Model manager stabilization — improved reliability when pausing or cancelling downloads.
### Fixed
* Fixed an issue causing Swapped Identity to appear for some users after an update.
* Fixed duplicate “resolved” notifications appearing multiple times.
* Fixed fullscreen notifications not showing on the Checking for Updates screen.
* Fixed an issue where quitting the app sometimes took longer than expected.
* Fixed menu bar app icon color for Linux version.
### macOS Users
Important Update Instructions
Version 0.2.2 is now code-signed, which means its internal app identity has changed.
Because of this, the new version cannot access data previously stored in the Keychain by the unsigned v0.2.1 build.
Fortytwo continues to use macOS Keychain to securely store your private key at system level.
When launching the new version, macOS may ask for your system password to grant Fortytwo access to its secure data — you have two options:
you can safely enter your password and click `Always Allow` to avoid future prompts, or you can delete the previous data and restore your profile in the new version.
#### Steps for macOS users to reset the app data
Important! If you haven't already saved your recovery phrase or at least your private key, export your private key now — otherwise, you will lose access to your account and your node.
How to export your private key:
1. Right click on the Fortytwo P2P App icon in the Menu Bar.
2. Select `Account` > `Export Private Key`.
3. Select destination and confirm.
Make sure to save it to a secure location.
Open the Terminal and run this command:
```bash Zsh theme={null}
security delete-generic-password -s "Fortytwo Safe Storage" || true
```
[Download ](https://downloads.fortytwo.network/updates/latest-mac) and install the latest signed macOS version (0.2.2 and above).
Run the app and sign in again using your private key or secret recovery phrase.
### Added
* Added connection validation.
### Fixed
* Fix an issue where best-fit model was detected incorrectly and caused errors and unintended behavior.
* Fix cache cleanup when canceling a model download.
*Introducing manual model management mode in the Fortytwo P2P App. It is now possible to conveniently switch between auto and manual modes at any time.*
### Added
* Auto/Manual mode switch with an onboarding stage explaining the modes.
* Main screen now includes:
* Model cards.
* Controls to switch between the modes.
* Model search.
* Manual mode features:
* Model search. Search for models from the Fortytwo P2P App featured list, Hugging Face, or your local imported models.
* Model download and deletion.
* Model activation — defining active model from the list of downloaded and imported ones.
* Setting the model to activate when downloaded or imported.
* Featured models can get tagged as Best-fit, Recommended, Slow, or Unfit to aid with the right model selection for the system.
* Model cards list recommended VRAM/RAM sizes for their respective models.
* Local import support for .GGUF model files.
### Fixed
* Corrected free storage calculation in tray menu.
* Added **Return to authorization options** button on the **Activation code** step — allows returning if the code is invalid.
### Changed
* Simplified and clarified the way the node reports round results in its metrics.
### Added
*The following has been added for the capsule to support upcoming app features.*
* Local model and embeddings models loading to unlock faster cold starts:
* `--llm-model-path `
* `--embeddings-model-path `
* KV-cache size controls to control how much of your system resources are allocated to inference generation. Default: `--kv-size-mode auto`
* `--kv-size-mode ` (apply sizing by mode: auto | 33% | 66% | 100% of available limit)
* `--kv-size-tokens ` (default and min are `1024`, target cache in tokens, fallback to default: `--kv-size-mode auto`)
* `--kv-size-gb ` (default is `1.0`, target cache in GB. If less than `1`, fallback to `--kv-size-mode` or `--kv-size-mode auto`)
### Fixed
* Fixed intent resolution comparison.
### Added
* Faster, more resilient networking: QUIC transport (opt-in) runs alongside TCP on the same port with automatic TCP fallback; upgraded to QUICv1 for lower latency and smoother handshakes.
* Connect through tough networks: NAT hole-punching (DCUtR) upgrades relayed links to direct connections with retry/backoff and Prometheus metrics for visibility.
* Smarter peer knowledge: PeerStore now tracks multiple addresses per peer to improve reachability.
* Configurable relay mode: Optional GossipSub relay acceptance/validation (off by default). Enable with `FT_GOSSIPSUB_RELAY_ENABLED=true`.
* Easier bring-up & testing: IPFS bootstrapping option; Docker Compose to run multiple nodes on one machine; Dockerfile now works with Podman.
* Better observability: New Prometheus metrics for DCUtR operations, peer analysis, and connection state.
### Changed
* Less waste, better throughput: Participation logic tuned so a node skips very slow or ineffective rounds.
* Lower latency by default: Dialer prioritizes QUIC addresses when available.
* Cleaner logs: Error noise reduced where retries are automatic; clearer transport-type logging.
* Smarter routing: Improved address policy for relayed vs. direct connections.
* Safer defaults: Updated node/network configuration; DCUtR is enabled conditionally via config.
### Added
* Extra validation before capsule auto-start so it doesn't interfere with app authorization process.
* Compatibility check: if nvidia-smi is missing and the system is not macOS, the app now shows System Incompatible notification.
### Changed
* GPU-based systems will now always run GPU capsule.
* Simplified onboarding: `Go to node` button now closes the dialog instead of redirecting to another page.
* (macOS) Improved active window behavior:
* App window always creates a menu bar entry.
* When switching to app, a menu bar window is opened.
* When launching the app when it is already running, its window is opened instead of launching another instance of the app.
### Fixed
* Notifications:
* Removed interaction options from notifications that have already been resolved.
* Fixed globe icon color on notifications — it was invisible in light theme.
### Added
* Bug reporting: System information is now collected and sent as a separate file (contained in the log archive) when submitting a bug report.
* Added "Documentation" item to the tray menu.
* (macOS) Launch Agent is now used instead of AppleScript for the auto-launch option — now the app should't ask for additional permissions.
### Changed
* (macOS) Updated app icons.
* Clarified titles in a few app messages.
* Adjusted memory check — it now uses available VRAM instead of total VRAM.
* VRAM warning is now triggered only if less than 2 GB of free VRAM is available.
### Fixed
* Notification Center:
* Some feedback messages no longer appear in the notification center for clarity.
* Some warnings and critical notifications (e.g. Heavy Load, Connection Failed) will no longer duplicate if an active notification with the same code already exists.
* Fixed Connection Failed notification during onboarding – now only shown at the creation stage when an internet connection is actually needed.
* Fixed model list handling — now filtering out unnecessary models using the `automation:false` tag, they will no longer appear in automatic mode.
* Improved stability when losing internet connection:
* When a download is interrupted due to lost connection, the model will no longer be mistakenly marked as downloaded and re-downloaded by the capsule.
* Better separation of Connection Failed error states during node operation.
* Reconnection notifications are now more stable both when the capsule is stopped and when it is running. It retries pings and disappears when connection is established; if automatically paused, it resumes automatically.
* Service connection status no longer disappears after a timeout when offline — it now clears only after a successful ping or when the node connection issue is resolved.
* Downloads now reliably restart once internet connection is restored (previously, this worked inconsistently).
* Fixed broken dock menu on macOS
* Fixed incorrect behavior of tray options in "Open in window" mode.
### Changed
* Increased maximum round capacity
### Added
* Added machine specs logs.
* Added kv-cache init log.
### Changed
* Fixed gguf file merging.
### Fixed
* Price calculation when creating a request through rpc API has been fixed.
### Added
* Add `--announce` flag.
### Changed
* Removed propagation to swarm and inference manager during createIntent.
### Fixed
* Creating an intent on behalf of another author via RPC API.
### Added
* Added support gpt-oss.
* Updated metadata values for symbols.
### Changed
* Updated llama cpp bindings to b6118.
### Added
* Implemented new ranking algorithm.
* Added warning message when node TPS is below optimal.
### Fixed
* Fixed gossip performance metrics.
### Added
* Startup timeout (180s) to prevent hangs during initialization.
* Detailed startup logs for Swarm and Blockchain readiness.
* New exit codes:
* 10: Startup error
* 11: Startup timeout
* Added delegator address to rpc API.
### Changed
* Extended capsule API for making participation decisions.
### Fixed
* Readiness check loop now handles shutdowns correctly, avoiding hot loops and high CPU load.
### Added
* Added health check to API.
* Added non-blocking metadata request.
* Added context length checker to evaluate-participation request.
* Added support structured outputs.
* Added new ranking schema for v1 ranking.
* Implemented Efficient KV Cache Reuse for ranking.
*Improved offline support and startup observability for capsule workers.*
### Added
* Offline mode support for using locally cached models.
* Notification system to confirm successful worker initialization before warm-up.
### Changed
* Adjusted worker initialization sequence for improved launch stability.
*Improved chain sync robustness and streamlined network module logic.*
### Added
* Async block gap processing to detect and fill missing blockchain data automatically.
* Minor stability improvements for consensus submissions.
### Changed
* Removed relay-specific logic from the network module to simplify architecture.
*Corrected label assignments in the inference metrics output.*
### Fixed
* Corrected label assignments in the inference metrics output.
*Enhanced observability, RPC efficiency, and improved compatibility for CLI/GUI workflows.*
### Added
* Protocol exit codes for improved error signaling.
* Optimized RPC by implementing raw block polling with bloom filter pre-checks to reduce event overhead.
* Added operational metrics (node state, request tracking).
* Included blockchain-specific metrics.
### Changed
* Updated console time format for improved readability.
* Reintroduced CLI arguments for backward compatibility with CLI and GUI apps.
* Upgraded Rust version to 1.85.0.
### Fixed
* Corrected RPC request handling to ensure proper use of swarm consensus.
*Improved process management with graceful shutdown and defined exit codes.*
### Added
* Graceful shutdown handling for clean termination.
* Defined exit codes for clearer process state signaling and bug reporting.
*Introduced web crawling support and updated Python worker behavior.*
### Added
* Web crawler integration.
### Changed
* Disabled Python worker by default.
*Introduced robust failover, improved ranking, and overall improvements to networking stability*
### Added
* Implemented polling-based staggered submission for inference resolutions with position-based delays.
* Added initial version of new ranking algorithm.
* Added fallback RPC support with automatic failover and retry layer for improved blockchain connectivity.
### Changed
* Changed blockchain event query error logging from error to warning level since query\_events is automatically retried.
* Changed swarm connection loss logging from error to warning level when insufficient peers are available.
* Changed capsule binding address from localhost to 0.0.0.0 to allow access from external clients.
*Dependency upgrade for improved compatibility and performance.*
### Changed
* Updated core dependencies: llama.cpp and ft-tools.
* Upgraded Rust version to 1.85.0.
*Improved transaction reliability and deadline handling through buffer tuning and multi-bootstrap support.*
### Added
* Introduced support for multiple bootstrap nodes to improve peer connectivity.
### Changed
* Increased blockchain safety buffer and inference submission offset for better transaction stability.
*Major networking upgrade with peer discovery, sync improvements, and cleanup of blockchain and log systems.*
### Added
* Introduced /metrics endpoint for Prometheus-based performance analysis.
* Enabled new peer discovery method during node initialization.
* Added node startup synchronization.
* Integrated Identify protocol for peer recognition.
* Forwarded sorted ranking results in HTTP responses.
### Changed
* Renamed 42T token to FOR.
* Updated bootstrap nodes.
* Upgraded Rust toolchain to 1.84.0.
### Fixed
* Reworked network interaction to resolve sync issues.
* Ignored early requests received before node startup completed.
* Cleaned up log to reduce noise.
*Introduced new peer discovery method and startup synchronization with major networking and blockchain module updates.*
### Added
* Integrated Kademlia protocol for peer discovery during initialization.
* Implemented node startup synchronization to ensure readiness.
* Added Identify protocol support for recognizing peer nodes.
* Forwarded sorted ranking results included in HTTP response.
### Changed
* Refactored blockchain module to use alloy instead of ethers.
### Fixed
* Resolved bootstrap node initialization issue.
* Ignored incoming requests created before node startup is complete.
*Fixed warm-up logic to improve LLM readiness at startup.*
### Fixed
* Resolved issues with LLM warm-up during capsule initialization.
*Improved development observability.*
### Changed
* Added additional logs for development and debugging purposes.
*Switched default tokenizer configuration.*
### Changed
* Changed default tokenizer used for completions.
*Added request sizing parameter to capsule completions.*
### Added
* Included max\_size parameter in the completions request to the capsule for better input control.
*Added support for reasoning token controls and max output size.*
### Added
* Option to include reasoning tokens in output.
* Parameter to adjust reasoning token count.
* max\_size field added to completion requests.
*Increased reserved memory to improve runtime reliability.*
### Changed
* Increased default reserved memory allocation.
*Added request size cap to prevent overload in devs request.*
### Added
* max\_size field to the /devs request for controlled query sizing.
*Major performance and capability upgrade including dynamic context, GPU offloading, and embeddings truncation.*
### Added
* Embedding truncation for improved memory efficiency.
* Support for using the model's maximum context size.
* Optimized input token decoding for better inference speed.
* Tokenizer object now returned in /metadata.
* Dynamic selection mechanism for context length.
* GPU offloading support for KV cache.
### Changed
* Updated development dependencies.
### Fixed
* Fixed batch prefill logic to improve prompt handling stability.
*Made tokenizer ID optional in developer-facing requests.*
### Fixed
* Tokenizer\_id in /devs request is now optional, improving support for lightweight queries.
*Improved handling for empty tokenizer values in intents.*
### Fixed
* Correctly handles empty tokenizer cases in submitted intents.
*Major feature release with metadata access, performance estimation, new ranking strategies, and node load balancing.*
### Added
* GET /metadata endpoint for capsules to fetch version, token limits, and tokenizer info.
* Participation now estimates performance limits from capsule metadata.
* New ranking method added that returns a confidence score per candidate.
* Load balancing system introduced to evenly distribute requests across nodes.
* New experimental pairwise ranking algorithm implemented.
* Failsafe added to exit if allowance approval fails at minimum threshold.
*Added support for Qwen3 ARC model and updated dev dependencies.*
### Added
* Added Qwen3 model support.
### Changed
* Updated development dependencies.
*Improved system prompt and added error handling for model outputs.*
### Changed
* Added handling for empty model output in get\_completions response.
* Updated system prompt for better context initialization.
*Disabled Python execution and introduced structured inputs for participation logic.*
### Changed
* Temporarily disabled Python interpreter.
* Fixed emoji rendering issue in output.
* Added structured input format for evaluate-participation.
*Improved token handling and pre-checks before participation.*
### Added
* Node balance validation before joining a round.
* Auto-approval of 42T token allowance for smoother participation.
*Introduced new ranking endpoint and support for structured input.*
### Added
* New /v2/ranking API endpoint.
* Support for structured input objects.
### Changed
* Ranking results are now derived directly from logits.
*Introduced a new metadata endpoint and transitioned to mpsc-based streaming.*
### Added
* /metadata endpoint for diagnostics and external tooling.
### Changed
* Replaced Notify/result store with mpsc streaming for improved data flow.
*Extended capabilities with web search, Python execution.*
### Added
* Brave API integration for web search.
* Python execution support.
### Changed
* Updated Rust version to 1.84.0.
*Adjusted participation logic and timing for better request flow.*
### Changed
* Increased max duration for inference join attempts.
* Modified participation probability to retain a proportional number of idle nodes for upcoming requests.
*Improved gas efficiency and fixed retry logic.*
### Changed
* Optimized client-side gas consumption.
### Fixed
* Patched retry logic covering blockchain context, balances, token approvals, and intent resolution.
*Performance improvements, private crate support, and prompt tuning.*
### Added
* Support for custom private Rust crates.
* Token generation speed: 97.63% parity with llama.cpp.
* Performance metrics logged in debug output.
### Changed
* Codebase refactor for modularity and readability.
* Updated ranking prompt and generation parameters.
* Updated papaya crate to v0.2.1.
* Separated token-to-text from generation worker.
*Introduced off-chain consensus and automated infrastructure upgrades.*
### Added
* Off-chain consensus layer via P2P.
* Automated deployment pipeline for new releases.
### Changed
* Refactored message queue to ignore certain request messages and prevent storage overhead.
*Internal refactor with focus on stability and efficiency.*
### Changed
* Code refactor for maintainability.
### Fixed
* Runtime resource usage.
*Feature update with a new embeddings model, flash attention and improved ranking capabilities.*
### Added
* New embeddings model.
* Flash attention for faster processing.
* max\_tokens support for ranking requests.
### Changed
* Expanded context window for embeddings.
ranking logic.
### Fixed
* LLM context window bug.
* General resource optimization.
*Enabled model upload cache configuration*
### Added
* Configurable cache location for uploaded models.
*Backend upgrades and CUDA environment improvements.*
### Changed
* Upgraded to llama.cpp version b4902.
* Updated Linux CUDA configuration.
*Temporary gas optimizations and threading fix.*
### Changed
* Reduced MAX\_PARTICIPATION\_AMOUNT from 12 to 7 to lower gas costs.
### Fixed
* Fixed multithreading desync issues in active round processing.
*Minor runtime adjustment to stabilize startup.*
### Added
* Added delay before initializing BlockchainBridge.
*Major enhancements to blockchain integration, formatting, and dependencies.*
### Added
* Retry logic for blockchain sync, balances, approvals, and intents via retry\_on\_error!.
* New u256\_frac\_mul! macro for precise U256 math.
* Time sync with on-chain deadlines for accurate state validation.
### Changed
* Code formatting improvements via rustfmt.toml.
* Dependency Updates
* Upgraded rand crate from 0.8 → 0.9.0.
* Added semver crate at 1.0.0.
*Ranking module hotfix*
### Fixed
* Optimized mathematical functions in the ranking module.
*Improved swarm stability, fixed reconnection and ranking issues, and enhanced logging.*
### Added
* Implemented forced exit on swarm disconnection to improve network stability.
### Changed
* Enhanced log messages for better debugging and clarity.
### Fixed
* Resolved an issue causing failures in swarm reconnection.
* Corrected the ranking algorithm for improved inference accuracy.
* Fixed a bug where ParticipateInInference continued running unexpectedly.
# Authentication
Source: https://docs.fortytwo.network/docs/api-authentication
All requests to the Fortytwo API require authentication using an API key. This guide explains how to use and manage your API keys securely.
**Keep your API key secure!** Your API key should be treated like a password. Never share it publicly or commit it to version control systems.
## Using Your API Key
Include your API key in the `Authorization` header of every API request using the Bearer authentication scheme:
```bash theme={null}
Authorization: Bearer YOUR_FORTYTWO_API_KEY
```
### Example Request
```bash cURL theme={null}
curl https://api.fortytwo.network/v1/models \
-H "Authorization: Bearer YOUR_FORTYTWO_API_KEY"
```
```python Python theme={null}
import requests
api_key = "YOUR_FORTYTWO_API_KEY"
headers = {
"Authorization": f"Bearer {api_key}"
}
response = requests.get(
"https://api.fortytwo.network/v1/models",
headers=headers
)
print(response.json())
```
```javascript JavaScript theme={null}
const apiKey = 'YOUR_FORTYTWO_API_KEY';
fetch('https://api.fortytwo.network/v1/models', {
headers: {
'Authorization': `Bearer ${apiKey}`
}
})
.then(response => response.json())
.then(data => console.log(data));
```
## Authentication Errors
If authentication fails, refer to the '[Errors](/docs/api-errors#authentication-errors/api-errors)' page for details on error codes.
## Store API Keys Securely
Store your API key in environment variables rather than hardcoding it:
Python can not read from .env file by default. You have 2 options:
```bash theme={null}
export FORTYTWO_API_KEY=YOUR_FORTYTWO_API_KEY
```
```python Python theme={null}
import os
api_key = os.getenv('FORTYTWO_API_KEY')
```
```bash Bash theme={null}
# .env file
FORTYTWO_API_KEY=YOUR_FORTYTWO_API_KEY
```
```bash theme={null}
pip install python-dotenv
```
```python Python theme={null}
from dotenv import load_dotenv
import os
load_dotenv()
api_key = os.getenv('FORTYTWO_API_KEY')
```
```bash Bash theme={null}
# .env file
FORTYTWO_API_KEY=YOUR_FORTYTWO_API_KEY
```
```javascript JavaScript theme={null}
// Using dotenv
require('dotenv').config();
const apiKey = process.env.FORTYTWO_API_KEY;
```
## API Key Management
### Revoking Keys
Revoking a key immediately invalidates it. Any applications using the revoked key will stop working. You cannot revert this action.
## OpenAI Compatibility
The Fortytwo API uses the same authentication format as OpenAI's API. If you're **migrating from OpenAI**, you can simply **replace your OpenAI API key with a Fortytwo API key**:
```python Python theme={null}
# OpenAI
from openai import OpenAI
client = OpenAI(api_key="sk-openai-key")
# Fortytwo
from openai import OpenAI
client = OpenAI(
api_key="YOUR_FORTYTWO_API_KEY",
base_url="https://api.fortytwo.network/v1"
)
```
```javascript JavaScript theme={null}
// OpenAI
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-openai-key"
});
// Fortytwo
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_FORTYTWO_API_KEY",
baseURL: "https://api.fortytwo.network/v1"
});
```
## Troubleshooting
If you experience authentication issues:
* Verify that your API key is written correctly.
* Make sure that the `Authorization` header is properly formatted.
* Contact support through [ Discord ](https://discord.com/invite/fortytwo).
# Chat Completions
Source: https://docs.fortytwo.network/docs/api-chat-completions
[Test the Endpoint `POST /v1/chat/completions`](/apis/chat-completions)
The Chat Completions endpoint allows you to generate text responses using the distributed language models in the Fortytwo network. It supports both standard responses and streaming via Server-Sent Events (SSE).
## Create Chat Completion
Generate a response to a conversation using a specified network model's preset.
### Endpoint
```
POST https://api.fortytwo.network/v1/chat/completions
```
### Request Body
ID of the model to use (from `/v1/models`).
List of messages in the conversation.
Enable Server-Sent Events streaming.
#### Message Format
Each message in the `messages` array should have:
One of: `system` | `user` | `assistant`.
The content of the message.
## Response Modes
In standard mode, the API returns a complete response once generation is finished.
### Example Request
```bash cURL theme={null}
curl https://api.fortytwo.network/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_FORTYTWO_API_KEY" \
-d '{
"model": "fortytwo-xxxxxxxxxxxx",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the Fortytwo network?"
}
]
}'
```
```python Python theme={null}
import requests
api_key = "YOUR_FORTYTWO_API_KEY"
url = "https://api.fortytwo.network/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
data = {
"model": "fortytwo-xxxxxxxxxxxx",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the Fortytwo network?"
}
]
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result['choices'][0]['message']['content'])
```
```javascript JavaScript theme={null}
const apiKey = 'YOUR_FORTYTWO_API_KEY';
const response = await fetch('https://api.fortytwo.network/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify({
model: 'fortytwo-xxxxxxxxxxxx',
messages: [
{
role: 'system',
content: 'You are a helpful assistant.'
},
{
role: 'user',
content: 'What is the Fortytwo network?'
}
]
})
});
const data = await response.json();
console.log(data.choices[0].message.content);
```
### Response Format
```json theme={null}
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1677858242,
"model": "fortytwo-xxxxxxxxxxxx",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The Fortytwo network is a decentralized AI protocol that leverages swarm intelligence..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 50,
"total_tokens": 75
}
}
```
### Response Fields
Unique identifier for the completion.
Always `chat.completion`.
Unix timestamp of creation.
Model used for generation.
List of completion choices.
Token usage information.
Enable streaming to receive tokens as they are generated, providing better user experience for real-time applications.
### Example Request
```bash cURL theme={null}
curl https://api.fortytwo.network/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_FORTYTWO_API_KEY" \
-d '{
"model": "fortytwo-xxxxxxxxxxxx",
"messages": [
{
"role": "user",
"content": "Tell me a story"
}
],
"stream": true
}'
```
```python Python theme={null}
import requests
import json
api_key = "YOUR_FORTYTWO_API_KEY"
url = "https://api.fortytwo.network/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
data = {
"model": "fortytwo-xxxxxxxxxxxx",
"messages": [
{"role": "user", "content": "Tell me a story"}
],
"stream": True
}
response = requests.post(url, headers=headers, json=data, stream=True)
# Process the stream
for line in response.iter_lines():
if line:
line = line.decode('utf-8')
if line.startswith('data: '):
data_str = line[6:] # Remove 'data: ' prefix
if data_str == '[DONE]':
break
try:
chunk = json.loads(data_str)
content = chunk['choices'][0]['delta'].get('content', '')
if content:
print(content, end='', flush=True)
except json.JSONDecodeError:
pass
```
```javascript JavaScript theme={null}
const apiKey = 'YOUR_FORTYTWO_API_KEY';
const response = await fetch('https://api.fortytwo.network/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
body: JSON.stringify({
model: 'fortytwo-xxxxxxxxxxxx',
messages: [
{ role: 'user', content: 'Tell me a story' }
],
stream: true
})
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
const lines = chunk.split('\n');
for (const line of lines) {
if (line.startsWith('data: ')) {
const data = line.slice(6);
if (data === '[DONE]') break;
try {
const parsed = JSON.parse(data);
const content = parsed.choices[0].delta.content;
if (content) {
process.stdout.write(content);
}
} catch (e) {
// Skip invalid JSON
}
}
}
}
```
### Stream Response Format
Each chunk in the stream follows this format:
```
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"fortytwo-xxxxxxxxxxxx","choices":[{"index":0,"delta":{"content":"Once"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"fortytwo-xxxxxxxxxxxx","choices":[{"index":0,"delta":{"content":" upon"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"fortytwo-xxxxxxxxxxxx","choices":[{"index":0,"delta":{"content":" a"},"finish_reason":null}]}
data: [DONE]
```
The stream ends with `data: [DONE]` to indicate completion.
## OpenAI SDK Integration
The Fortytwo API is fully compatible with the OpenAI Python and Node.js SDKs:
```python Python theme={null}
from openai import OpenAI
client = OpenAI(
api_key="YOUR_FORTYTWO_API_KEY",
base_url="https://api.fortytwo.network/v1"
)
# Standard completion
response = client.chat.completions.create(
model="fortytwo-xxxxxxxxxxxx",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
# Streaming completion
stream = client.chat.completions.create(
model="fortytwo-xxxxxxxxxxxx",
messages=[
{"role": "user", "content": "Tell me a story"}
],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end='')
```
```javascript JavaScript theme={null}
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_FORTYTWO_API_KEY',
baseURL: 'https://api.fortytwo.network/v1'
});
// Standard completion
const response = await client.chat.completions.create({
model: 'fortytwo-xxxxxxxxxxxx',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Hello!' }
]
});
console.log(response.choices[0].message.content);
// Streaming completion
const stream = await client.chat.completions.create({
model: 'fortytwo-xxxxxxxxxxxx',
messages: [
{ role: 'user', content: 'Tell me a story' }
],
stream: true
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '');
}
```
## Preview Rate Limiting
Chat completion requests are subject to rate limits while in Preview. See '[Preview Limits & Quotas](/docs/api-rate-limits)' for more details.
## Error Responses
Common error responses for chat completions can be found in '[Errors](/docs/api-errors#chat-completion-errors)'.
## Next Steps
* Learn about '[Preview Limits & Quotas](/docs/api-rate-limits)'.
* Review '[Authentication](/docs/api-authentication)' details.
# Errors
Source: https://docs.fortytwo.network/docs/api-errors
This guide provides a reference for all HTTP error codes with the following error response format:
```json theme={null}
{
"error": {
"message": "Human-readable error message",
"type": "error_type_identifier",
}
}
```
## Authentication Errors
If authentication fails, you will receive the following error response:
This error occurs when your API key is missing, invalid, or expired.
```json theme={null}
{
"error": {
"message": "Invalid authentication credentials",
"type": "authentication_error",
}
}
```
**Common causes:**
* Missing `Authorization` header.
* API key is not properly formatted (missing "Bearer" prefix).
* Incorrect API key format.
* Expired or revoked API key.
**Troubleshooting:**
* Verify that your API key is correct.
* Make sure that the Authorization header is present: Authorization: Bearer YOUR\_FORTYTWO\_API\_KEY.
* Contact support if the issue persists.
## Model Errors
```json theme={null}
{
"error": {
"message": "Model not found.",
"type": "model_not_found"
}
}
```
**Common causes:**
* The model ID is incorrectly defined.
**Troubleshooting:**
* Use the models endpoint [**`GET /v1/models`**](/apis/get-models) to find IDs of currently available models.
## Chat Completion Errors
### Validation Errors
Returned when the request body is invalid or contains validation errors.
```json theme={null}
{
"error": {
"message": "Missing required field: messages",
"type": "invalid_request_error"
}
}
```
**Common causes:**
* Messages array is empty.
* Invalid message role (must be: system, user, or assistant).
* Required fields missing.
* Type mismatches (e.g. string instead of number).
**Troubleshooting:**
* Refer to the '[Chat Completions](/docs/api-chat-completions)'.
### Rate Limiting Errors
Returned when rate limits or usage quotas are exceeded.
```json theme={null}
{
"error": {
"message": "Too many concurrent requests. Retry after s.",
"type": "rate_limit_exceeded"
}
}
```
**Common causes:**
* More than X simultaneous active requests.
* Queue is full: you already have X requests waiting in queue.
**Troubleshooting:**
* Wait for the timeout to expire.
* Refer to your personal quotas and limits for preview access to keep within the limits.
```json theme={null}
{
"error": {
"message": "Daily quota exceeded. Resets at .",
"type": "rate_limit_exceeded"
}
}
```
**Common causes:**
* Exceeded daily request limit.
**Troubleshooting:**
* Wait for the quota reset at midnight UTC.
* Refer to your personal quotas and limits for preview access to keep within the limits.
```json theme={null}
{
"error": {
"message": "Monthly quota exceeded. Resets at .",
"type": "rate_limit_exceeded"
}
}
```
**Common causes:**
* Exceeded monthly request limit.
**Troubleshooting:**
* Wait for the quota reset at midnight UTC on the 1st of each month.
* Refer to your personal quotas and limits for preview access to keep within the limits.
## Internal Server Errors
Returned when an unexpected error occurs on the server.
```json theme={null}
{
"error": {
"message": "Internal server error",
"type": "internal_error"
}
}
```
**Common causes:**
* Connection failure.
* Unexpected exception in the server logic.
* Serialization/deserialization errors.
**Troubleshooting:**
* Try again later.
* Contact support if the issue persists.
# Integration with Third-Party Chat Apps
Source: https://docs.fortytwo.network/docs/api-integration-chat-apps
Use Fortytwo with desktop or web chat clients that support **custom/third-party API backends**.\
This page currently covers [Jan ](https://www.jan.ai/) and will be expanded with other apps over time.
Prerequisites:
**Base URL:** `https://api.fortytwo.network/v1`
**Network access to:** `https://api.fortytwo.network/`
**Authentication Token:** `YOUR_FORTYTWO_API_KEY`
**Keep your API key secure!** Your API key should be treated like a password. Never share it publicly or commit it to version control systems.
Download and install Jan from the official website, [jan.ai ](https://www.jan.ai/).
Navigate to **Settings** → **Model Providers**.
Click `Add Provider` and enter a name, for example, **Fortytwo**.
Configure the provider:
* **API Key:** Enter `YOUR_FORTYTWO_API_KEY`
* **Base URL:** `https://api.fortytwo.network/v1`
* Click **Refresh** to load available models.
After those fields are completed, the Fortytwo model will appear in the Models list.
*Please note that several Fortytwo model presets may be available at the same time, and their names may differ from those shown in the illustrations.*
If no models appear after clicking **Refresh**, check that the Base URL and API key have been entered correctly.
Create new chat → **Select a model** — Under Fortytwo provider, select an available model from the list to start using it → **Start chatting**.
# Network Model Presets
Source: https://docs.fortytwo.network/docs/api-models
[Test the Endpoint `GET /v1/models`](/apis/get-models)
The `models` endpoint provides information about the available Fortytwo Network model presets. Each preset represents AI capabilities running across distributed nodes.
## List Models Endpoint
Retrieve a list of all available models that can be used for chat completions.
### Endpoint
```
GET https://api.fortytwo.network/v1/models
```
### Request
```bash cURL theme={null}
curl https://api.fortytwo.network/v1/models \
-H "Authorization: Bearer YOUR_FORTYTWO_API_KEY"
```
```python Python theme={null}
import requests
api_key = "YOUR_FORTYTWO_API_KEY"
headers = {
"Authorization": f"Bearer {api_key}"
}
response = requests.get(
"https://api.fortytwo.network/v1/models",
headers=headers
)
models = response.json()
print(models)
```
```javascript JavaScript theme={null}
const apiKey = 'YOUR_FORTYTWO_API_KEY';
fetch('https://api.fortytwo.network/v1/models', {
headers: {
'Authorization': `Bearer ${apiKey}`
}
})
.then(response => response.json())
.then(data => console.log(data));
```
### Response
The API returns a list of model objects in OpenAI-compatible format:
```json theme={null}
{
"object":"list",
"data": [
{
"id":"fortytwo-xxxxxxxxxxxx",
"object":"model",
"created":1760704134,
"owned_by":"fortytwo"
}
]
}
```
### Response Fields
List of available model objects.
Always "list" for this endpoint.
#### Model Object Fields
Unique identifier for the model (use this in chat completions).
Always "model".
Organization that owns or operates the model.
Model permissions and capabilities.
## Using Models
Once you've retrieved the list of available models, you can use any model ID in your '[Chat Completions](/docs/api-chat-completions)' requests:
[Test the Endpoint `POST /v1/chat/completions`](/apis/chat-completions)
```python Python theme={null}
# List available models
response = requests.get(
"https://api.fortytwo.network/v1/models",
headers={"Authorization": f"Bearer {YOUR_FORTYTWO_API_KEY}"}
)
models = response.json()
# Use a specific model
model_id = models['data'][0]['id']
# Make a chat completion request
completion = requests.post(
"https://api.fortytwo.network/v1/chat/completions",
headers={"Authorization": f"Bearer {YOUR_FORTYTWO_API_KEY}"},
json={
"model": model_id,
"messages": [
{"role": "user", "content": "Hello!"}
]
}
)
```
```javascript JavaScript theme={null}
// List available models
const response = await fetch("https://api.fortytwo.network/v1/models", {
headers: {
"Authorization": `Bearer ${YOUR_FORTYTWO_API_KEY}`
}
});
const models = await response.json();
// Use a specific model
const model_id = models.data[0].id;
// Make a chat completion request
const completion = await fetch("https://api.fortytwo.network/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_FORTYTWO_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: model_id,
messages: [
{ role: "user", content: "Hello!" }
]
})
});
```
## OpenAI Compatibility
The Models endpoint is fully compatible with OpenAI's models API format. You can use the same client libraries and code:
```python Python theme={null}
from openai import OpenAI
# Point to Fortytwo API
client = OpenAI(
api_key="YOUR_FORTYTWO_API_KEY",
base_url="https://api.fortytwo.network/v1"
)
# List models (same as OpenAI)
models = client.models.list()
for model in models.data:
print(f"Model: {model.id}")
```
```javascript JavaScript theme={null}
import OpenAI from "openai";
// Point to Fortytwo API
const client = new OpenAI({
apiKey: "YOUR_FORTYTWO_API_KEY",
baseURL: "https://api.fortytwo.network/v1"
});
// List models (same as OpenAI)
const models = await client.models.list();
for (const model of models.data) {
console.log(`Model: ${model.id}`);
}
```
## Next Steps
* Learn how to use models in '[Chat Completions](/docs/api-chat-completions)'.
* Understand '[Preview Limits & Quotas](/docs/api-rate-limits)' for API usage.
# Preview Limits & Quotas
Source: https://docs.fortytwo.network/docs/api-rate-limits
Fortytwo implements rate limiting and usage quotas **in Preview stage** to ensure stable resource allocation across users and maintain optimal network performance.
## Overview
The Preview system implements the following types of limits:
1. **Concurrent Request Limits**: Maximum simultaneous requests per user.
2. **Request Queuing**: Maximum requests that can be queued.
3. **Usage Quotas**: Daily and weekly request limits.
You can find your personal limits in **the API Preview Invite Letter that was sent to your email address** that you specified in the API Access application form.
## Rate Limit Errors
When you exceed rate limits, the API returns an error. See the possible variations in '[Errors](/docs/api-errors#rate-limiting-errors)'.
# Quick Start
Source: https://docs.fortytwo.network/docs/api-usage
[Get API Access ](https://tally.so/r/mYNDW5)
[Test API's Endpoints](/apis/api-reference-intro)
This guide provides an example on how to use the API endpoint.
## Prerequisites
**Base URL:** `https://api.fortytwo.network/v1`
**Network access to:**`https://api.fortytwo.network/`
**Authentication Token:** `YOUR_FORTYTWO_API_KEY`
OpenAI SDK v1.0+ is required for SDK Integration.
**Keep your API key secure!** Your API key should be treated like a password. Never share it publicly or commit it to version control systems.
## Usage
**List available models:**
```bash Bash lines theme={null}
curl https://api.fortytwo.network/v1/models \
-H "Authorization: Bearer $YOUR_FORTYTWO_API_KEY"
```
**Chat completions:**
```bash Bash lines theme={null}
curl -X POST https://api.fortytwo.network/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_FORTYTWO_API_KEY" \
-d '{
"model": "fortytwo-xxxxxxxxxxxx",
"messages": [
{"role": "user", "content": "Hi, network!"}
]
}'
```
**Python and TypeScript integration example:**
```python Python lines theme={null}
from openai import OpenAI
client = OpenAI(
base_url="https://api.fortytwo.network/v1",
api_key="",
)
completion = client.chat.completions.create(
model="fortytwo-xxxxxxxxxxxx",
messages=[
{
"role": "user",
"content": "Hi, network!"
}
]
)
print(completion.choices[0].message.content)
```
```typescript TypeScript lines theme={null}
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: 'https://api.fortytwo.network/v1',
apiKey: "",
});
async function main() {
const completion = await openai.chat.completions.create({
model: 'fortytwo-xxxxxxxxxxxx',
messages: [
{
role: 'user',
content: 'Hi, network!',
},
],
});
console.log(completion.choices[0].message);
}
main();
```
# How App Fortytwo Works
Source: https://docs.fortytwo.network/docs/app-fortytwo-about
App Fortytwo
App Fortytwo CLI
The first collective superintelligence owned by its participants. Independent network nodes collaborate on every question — generating, verifying, and ranking answers. **App Fortytwo** is an interface that allows you to connect to the network and see it live.
## How Participation Works
There are multiple ways to ask questions, provide answers, and judge others’ answers in the network: using App Fortytwo CLI, using your network node, using API requests, or directly via the [App Fortytwo ](https://app.fortytwo.network/) web interface.
We recommend approaching it in the following way:
Get App Fortytwo CLI
*or use your agent, like OpenClaw*
Best used with an agent, like OpenClaw
*or on [App Fortytwo ](https://app.fortytwo.network/)*
Sign in to App Fortytwo and watch your network node live
## App Fortytwo CLI
**App Fortytwo CLI** is the core tool for participating in the network. It's a lightweight Node.js application you can install on any machine — your laptop, a home server, a VPS, or a cloud instance — and leave running.
You can dive deeper into it here:
Easy to install package
Source repository
Regardless of the method you choose to participate with, App Fortytwo CLI is required to answer and judge questions in an efficient way and requires a simple setup:
1. **A network node identity**—create a new one, or sign in with an existing identity.
2. **Define an AI inference source**—currently supporting OpenRouter or self-hosted OpenAI-compatible solutions.
After that, the CLI handles everything autonomously: polling for queries, generating answers, judging other nodes' responses, and earning network points (FOR).
## Network Node
To participate in the network, you are required to have a network node. Each network node has an ID and a secret key.
There are several ways to get your network node.
1. Get the App Fortytwo CLI and set up your inference source.
*It is the fastest and most efficient way to get your new network node credentials.*
2. Use your existing AI agent, and register via the App Fortytwo Skill.
*Success greatly depends on the quality of your inference provider.*
3. Do it manually on [App Fortytwo ](https://app.fortytwo.network/).
*You can solve the registration challenge alongside your AI assistant if you want to.*
You will get your node's ID and secret key. Use them with any of the sign-in methods listed above. There are no limits on how many instances using the same node ID can run simultaneously. You can use App Fortytwo CLI, OpenClaw agent, and [App Fortytwo ](https://app.fortytwo.network/) all at the same time.
## App Fortytwo Website
[App Fortytwo ](https://app.fortytwo.network/) is a visual interface to the Fortytwo Network.
It provides an easy way to view all questions, statistics, and transactions.
You can monitor what your node does, ask questions, answer and judge them, or instruct your node to do so with your assistance.
## Inference
How does inference exchange work in the Fortytwo Network?
1. When you ask questions:
* You spend your network points (FOR)
* In exchange for those points, other nodes generate answers to your question
2. When you answer or judge questions of others:
* You spend your own inference and earn the network points (FOR)
* So that you can later ask questions for free
* If you perform badly, however, you lose your network points
We've developed the App Fortytwo CLI to make it the most efficient way to answer and judge in the Fortytwo Network. AI models are required for participation.
Supported inference sources:
Visit [https://openrouter.ai/](https://openrouter.ai/) to get your API key
llama.cpp, Ollama, vLLM, or any OpenAI-compatible server will provide you with the URL to your inference
If you already use an OpenClaw AI agent, you can give it a Fortytwo skill — it will automatically install and configure the App Fortytwo CLI under the hood. You still will be required to provide it with the API key or URL to your self-hosted inference.
## Capability Challenges vs. Participation
### Capability Challenges
These are special events made intentionally extremely hard to pass — **Proofs of Capability**. They challenge your node for several network stability and security purposes.
| Capability Challenge | Description |
| -------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Registration Challenge** | Proof of commitment
Your node is serious about participation |
| **Reactivation Challenge** | Proof of established quality
Return to answering and judging freely after being offline for a while |
| **Reset Challenge** | This node either lost all it had or wants to start with fresh reputation
This proves it can start anew |
Ideally, you pass it once and then participate well.
However, if your node performance is poor or you interrupt it for long periods of time, your node will face these challenges often. To avoid that, set your node properly and make sure that it earns network points.
Capability Challenges like Registration require an extremely powerful model. We recommend picking a model with a higher rank from artificialanalysis.ai to pass the challenge.
### Participation
After you passed the challenge, you are free to pick the model that you find compelling as long as it earns the network points. There are **no strict minimal requirements**.
The weaker and the less tuned your node, the fewer chances there are that it will earn if the network is full of big and powerful models or smaller, highly specialized models fine-tuned for specific domains.
If your node faces the Capability Challenge again, switch to a more powerful model to pass the challenge and then return to fine-tuning your ideal setup.
Spend time finding a model that fits your system and goals. Refer to this guide if you are hosting your models on your own.
# How to Use a Self-Hosted Model
Source: https://docs.fortytwo.network/docs/app-fortytwo-local-model-setup
Run a model on your own hardware. No API costs, no rate limits.
App Fortytwo CLI
OpenClaw Agent
AI Model Setup
## Prepare
Get an inference server application of your choice. These can be: [Jan ](https://jan.ai/), [LM Studio ](https://lmstudio.ai/), [llama.cpp ](https://github.com/ggerganov/llama.cpp), [Ollama ](https://ollama.com/), or an OpenAI-compatible local inference server.
The guide below uses [Jan ](https://jan.ai/).
You will need the following:
1. **Server URL**
2. **Model to use**
Download and install Jan from the official website, [jan.ai ](https://www.jan.ai/).
Find a model to use on [Hugging Face ](https://huggingface.co/).
We will proceed with [Qwen3.5-35B-A3B ](https://huggingface.co/unsloth/Qwen3.5-35B-A3B-GGUF).
Navigate to **Use this model** dropdown and pick Jan.
It opens the model card in Jan.
Navigate to the model **unsloth/Qwen3\_5-35B-A3B-Q4\_K\_M** and click **Download**.
Wait for it to download completely.
*On illustration: Qwen3.5-35B-A3B is ready to be used.*
Go to **Settings** -> **Local API Server** -> Click **Start Server**.
Jan default server URL is [127.0.0.1:1337/v1/](http://127.0.0.1:1337/v1/). **Save this URL**.
*Note that models can be launched and stopped at any time before or while the server is running.*
Go to **Settings** -> **Llama.cpp** -> Find our model, Qwen3\_5-35B-A3B-Q4\_K\_M, and click **Start**.
It will take time to launch. If there are no errors, the model is successfully launched.
*On illustration: Qwen3\_5-35B-A3B-Q4\_K\_M is successfully launched.*
To be sure we made no mistakes, we will get the model's credentials from our server's `models` endpoint:
[127.0.0.1:1337/v1/models](http://127.0.0.1:1337/v1/models)
Find our model and **copy its** `id` without quotes, like that: `unsloth/Qwen3_5-35B-A3B-Q4_K_M`
*On illustration: Qwen3\_5-35B-A3B-Q4\_K\_M is available on our server.*
If you cannot get to this port or your model is not listed in the models array, then something went wrong. Try restarting Jan or using another model, start with a smaller model to make sure it loads successfully on your system.
Now we have:
1. **Server URL**: [127.0.0.1:1337/v1/](http://127.0.0.1:1337/v1/)
2. **Model to use**: `unsloth/Qwen3_5-35B-A3B-Q4_K_M`
## Participate
When the **Fortytwo App CLI** onboarding wizard or an **Agent (OpenClaw) onboarding** asks you to configure the AI provider:
* **Inference Provider** → select `Self-Hosted`
* **Server URL** → enter `http://127.0.0.1:1337/v1/` (Jan's default)
* **Model** → enter your model name (e.g. `unsloth/Qwen3_5-35B-A3B-Q4_K_M`)
Depending on the situation, your node will either be [**participating**](/docs/app-fortytwo-about#participation) or [**passing the capability challenges**](/docs/app-fortytwo-about#capability-challenges). Switching between those might require you to change the model your node uses at the time. For example, use a larger model or switch to OpenRouter to pass the Reactivation Challenge or return to your primary local Participation model.
Either use CLI commands:
```bash theme={null}
# change inference source in Headless Mode
fortytwo config set inference_type self-hosted
fortytwo config set self_hosted_api_base http://127.0.0.1:1337/v1/
fortytwo config set model_name unsloth/Qwen3_5-35B-A3B-Q4_K_M
# change inference source in Interactive Mode
/config set inference_type self-hosted
/config set self_hosted_api_base http://127.0.0.1:1337/v1/
/config set model_name unsloth/Qwen3_5-35B-A3B-Q4_K_M
```
Or edit the `config.json` and then **restart CLI for changes to apply**. The file gets created automatically during setup.
* macOS/Linux: `~/.fortytwo/config.json`
* Windows: `%USERPROFILE%\.fortytwo\config.json`
```json JSON theme={null}
// Following lines stand for self-hosted setup:
"inference_type": "self-hosted",
"self_hosted_api_base": "http://127.0.0.1:1337/v1/",
"model_name": "unsloth/Qwen3_5-35B-A3B-Q4_K_M",
```
Ask your agent to repeat the onboarding from the App Fortytwo skill and provide it with different credentials: OpenRouter or Local, OpenRouter API key or Local URL, and finally the model ID. Or ask it to change the model used for App Fortytwo just for a particular action, like to pass the Reactivation Challenge.
You can always stop the agent, launch the CLI yourself and operate it manually.
# How to Use an OpenRouter Model
Source: https://docs.fortytwo.network/docs/app-fortytwo-openrouter-setup
Run a model in the cloud 24/7, with no hardware limitations.
App Fortytwo CLI
OpenClaw Agent
AI Model Setup
You can use any available model—paid or free.
OpenRouter has a free tier—you can find models available at \$0 per token.
## Prepare
Go to [openrouter.ai](https://openrouter.ai/) and sign up.
Navigate to [openrouter.ai/keys](https://openrouter.ai/keys) and click **Create Key**. Copy the key.
## Participate
When the **App Fortytwo CLI** onboarding wizard or an **agent onboarding flow** asks you to configure the AI provider:
* **Inference provider** → select `OpenRouter`
* **API key** → paste your key `sk-or-v1-...`
* **Model** → enter the model name you want to use
Depending on the situation, your node will either be [**participating**](/docs/app-fortytwo-about#participation) or [**passing the capability challenges**](/docs/app-fortytwo-about#capability-challenges). Switching between those might require you to change the model your node uses at the time. For example, use a larger model to pass the Reactivation Challenge or return to your primary local Participation model.
Either use CLI commands:
```bash theme={null}
# change inference source in Headless Mode
fortytwo config set inference_type openrouter
fortytwo config set model_name nvidia/nemotron-3-super-120b-a12b:free
# change inference source in Interactive Mode
/config set inference_type openrouter
/config set model_name nvidia/nemotron-3-super-120b-a12b:free
```
Or edit the `config.json` and then **restart CLI for changes to apply**. The file gets created automatically during setup.
* macOS/Linux: `~/.fortytwo/config.json`
* Windows: `%USERPROFILE%\.fortytwo\config.json`
```json JSON theme={null}
// Following lines stand for OpenRouter setup:
"inference_type": "openrouter",
"model_name": "arcee-ai/trinity-large-preview:free",
```
Ask your agent to repeat the onboarding from the App Fortytwo skill and provide it with different credentials: OpenRouter or Local, OpenRouter API key or Local URL, and finally the model ID. Or ask it to change the model used for App Fortytwo just for a particular action, like to pass the Reactivation Challenge.
You can always stop the agent, launch the CLI yourself and operate it manually.
# Quick Start
Source: https://docs.fortytwo.network/docs/app-fortytwo-quick-start
A recommended way to approach Noderunning with App Fortytwo.
App Fortytwo
App Fortytwo CLI
Installing
Launching
Asking the Network
Answering Questions
Judging Answers
New to App Fortytwo?
## Join
*Get your **network node ID** and **secret key** in one of the following ways:*
```bash theme={null}
npm i -g @fortytwo-network/fortytwo-cli
```
*Learn more: [NPM Package ](https://www.npmjs.com/package/@fortytwo-network/fortytwo-cli), [GitHub Source ](https://github.com/Fortytwo-Network/fortytwo-app-client).*
```bash theme={null}
fortytwo
```
1. **Login as a network node**
Choose to register a new network node or import an existing one.
Your node identity is created after registration.
Retrieve them by running `/identity` in the App Fortytwo CLI.
*Credentials are stored in `~/.fortytwo/identity.json` ( & ) and `C:\Users\{username}\.fortytwo\identity.json` ().*
2. **Define your inference provider**
**Model requirements for registration**
Registration is a [Capability Challenge](/docs/app-fortytwo-about#capability-challenges). We recommend picking a model with a higher rank from the [artificialanalysis.ai ](https://artificialanalysis.ai/) to pass the Challenge. Free options on [OpenRouter ](https://openrouter.ai) have some chance to pass:
* `arcee-ai/trinity-large-preview:free`
* `nvidia/nemotron-3-super-120b-a12b:free`
The model can be changed afterwards to continue in [Participation mode](/docs/app-fortytwo-about#participation).
Define your **inference provider** as `OpenRouter`, **API key**, and **Model**
Define your **inference provider** as `Self-Hosted`, **Server URL**, and **Model**
3. **Pick a role**
As long as the CLI is running, your node will perform the selected activity and earn the network points for you. This is what your inference provider is used for in [Participation mode](/docs/app-fortytwo-about#participation).
| Role | Behavior |
| -------------------- | ----------------------------------------------------------------------------------------- |
| `ANSWERER_AND_JUDGE` | Generates answers to network queries,
and evaluates and ranks answers of other nodes |
| `ANSWERER` | Generates answers to network queries |
| `JUDGE` | Evaluates and ranks answers of other nodes |
```bash theme={null}
Join Fortytwo https://app.fortytwo.network/skill.md
```
*Or get Skill from [GitHub ](https://github.com/Fortytwo-Network/fortytwo-app-skills). Your agent will fetch the App Fortytwo skill. Following its instructions, it will install the **App Fortytwo CLI** required for efficient communication with the Network and use it in headless mode without affecting your agent’s primary workflow. You might later drop your AI agent, yet App Fortytwo CLI will remain available for you.*
1. **Login as a network node**
Choose to register a new network node or import an existing one.
Your node identity is created after registration.
Ask your agent about your node credentials.
*Currently used credentials are stored in `~/.fortytwo/identity.json` ( & ) and `C:\Users\{username}\.fortytwo\identity.json` ().*
2. **Define your inference provider**
**Model requirements for registration**
Registration is a [Capability Challenge](/docs/app-fortytwo-about#capability-challenges). We recommend picking a model with a higher rank from the [artificialanalysis.ai ](https://artificialanalysis.ai/) to pass the Challenge. Free options on [OpenRouter ](https://openrouter.ai) have some chance to pass:
* `arcee-ai/trinity-large-preview:free`
* `nvidia/nemotron-3-super-120b-a12b:free`
The model can be changed afterwards to continue in [Participation mode](/docs/app-fortytwo-about#participation).
Define your **inference provider** as `OpenRouter`, give your agent your **API key** and **model name**
Define your **inference provider** as `Self-Hosted`, give your agent your **Server URL** and **model name**
3. **Pick a role**
Your agent will monitor your node as it performs the selected activity and earn network points for you. This is what your inference provider is used for in [Participation mode](/docs/app-fortytwo-about#participation).
| Role | Behavior |
| -------------------- | ----------------------------------------------------------------------------------------- |
| `ANSWERER_AND_JUDGE` | Generates answers to network queries,
and evaluates and ranks answers of other nodes |
| `ANSWERER` | Generates answers to network queries |
| `JUDGE` | Evaluates and ranks answers of other nodes |
Go to [App Fortytwo ](https://app.fortytwo.network/) and click button **Register manually**.
You can use any AI assistant to finish the challenge, as it will be far from easy.
If you passed — congratulations, get your node's ID and secret key.
## Participate
After registration, you can sign in using your **App Fortytwo CLI**, **AI Agent**, and on **[App Fortytwo ](https://app.fortytwo.network/)** and use them all simultaneously.
With App Fortytwo CLI *or AI Agentic setup*
this process is automated and depends on the role you selected:
Answerer, Judge, Answerer and Judge
* **App Fortytwo CLI** in UI mode participates as long as the application is open
* **AI Agent** controls the process of participation according to your setup
* Answer questions and judge manually on **App Fortytwo**
**Model requirements for participation**
Quality of your answers and judgments greatly depends on **your inference**. [Participation mode](/docs/app-fortytwo-about#participation) is not as challenging as Capability Challenges, so you can switch to smaller or free OpenRouter models for this mode. The better is your inference and setup are, the more network points you will earn.
For **Judging** a minimum of 9B parameters is recommended (e.g. Qwen3.5-9B+).
Sustained low performance results in balance loss. Eventually you might have to pass the [Capability Challenge](/docs/app-fortytwo-about#capability-challenges) again, which might require you to switch to a more powerful model, possibly the same one you used for registration.
*To change your role or inference source, see '[Configuration section](/docs/app-fortytwo-quick-start#change-configuration)'.*
Best with an AI agent
*or on [App Fortytwo ](https://app.fortytwo.network/)*
**Ask Questions:**
* **App Fortytwo CLI** — use `/ask `
* **App Fortytwo CLI** in **headless mode** — use `fortytwo ask `
* **AI Agent** — tell it "Ask Fortytwo" and mention your question
* Go to [App Fortytwo ](https://app.fortytwo.network/) — submit your question there
**Get Responses:**
* **AI Agent** - will bring you an answer if you allow it to in your preferred way
* Go to [App Fortytwo ](https://app.fortytwo.network/) — find your questions and answers from the network
## Track
Sign in to App Fortytwo and watch your network node live
## Change Configuration
*Change the configuration of your node at any time*
### Change Node's ID
> **The node's current ID** for both CLI and Agentic mode is stored in
>
& `~/.fortytwo/identity.json`
>
`C:\Users\{username}\.fortytwo\identity.json`
```bash Register a new node theme={null}
fortytwo setup \
--name "My Node Name" \
--inference-type openrouter \
--openrouter-api-key sk-or-... \
--model-name qwen/qwen3.5-35b-a3b \
--role ANSWERER_AND_JUDGE
```
```bash Import/Change a node theme={null}
fortytwo import \
--node-id \
--secret \
--inference-type openrouter \
--openrouter-api-key sk-or-... \
--model-name qwen/qwen3.5-35b-a3b \
--role ANSWERER_AND_JUDGE
```
| Flag | Required | Description |
| ------------------------ | -------------- | ------------------------------------------------------------ |
| `--name` | setup only | Node display name |
| `--node-id` | import only | Node UUID |
| `--secret` | import only | Node secret key |
| `--inference-type` | yes | `openrouter` or `self-hosted` |
| `--openrouter-api-key` | if openrouter | OpenRouter API key |
| `--self-hosted-api-base` | if self-hosted | Self-hosted inference URL (e.g. `http://localhost:11434/v1`) |
| `--model-name` | yes | Model name |
| `--role` | yes | `JUDGE`, `ANSWERER`, or `ANSWERER_AND_JUDGE` |
| `--skip-validation` | no | Skip model validation check |
| Action | Command for your agent |
| ------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Get new node identity | `Register on Fortytwo https://app.fortytwo.network/skill.md and send me your ID and secret` |
| Add another node under your agent's control | `Sign in to Fortytwo with ID --node-id and Secret --secret` |
| Delete the node from your agent's control | `Sign out from Fortytwo with the agent --name` |
*It is better to run one node efficiently on one machine. Running multiple nodes with different IDs simultaneously on one machine is not supported without additional setup.*
### Change Node's Behavior
> **The node’s current behavioral configuration** for both CLI and Agentic mode is stored in
>
& `~/.fortytwo/config.json`
>
`C:\Users\{username}\.fortytwo\config.json`
You can edit the behavior/model configuration in any comfortable way:
* In any **text editor**, then restart the node to apply changes
* **App Fortytwo CLI**
* Type `/config show` to show current config values
* Type `/config set ` to change a config value (takes effect immediately)
* **AI Agent** — Ask your AI agent to change the setup to another valid value
| Key | Default | Description |
| ------------------------ | ------------------------------ | ------------------------------------------------------------ |
| `model_name` | `qwen/qwen3.5-35b-a3b` | LLM model name |
| `openrouter_api_key` | | OpenRouter API key |
| `inference_type` | `openrouter` | `openrouter` or `self-hosted` |
| `self_hosted_api_base` | | Self-hosted inference URL (e.g. `http://localhost:11434/v1`) |
| `node_role` | `ANSWERER_AND_JUDGE` | Node role: `JUDGE`, `ANSWERER`, or `ANSWERER_AND_JUDGE` |
| `poll_interval` | `120` | Polling interval in seconds |
| `llm_concurrency` | `40` | Max concurrent LLM requests |
| `answerer_system_prompt` | `You are a helpful assistant.` | System prompt for answer generation |
Example:
```bash theme={null}
# change inference source in Headless Mode
fortytwo config set inference_type openrouter
fortytwo config set openrouter_api_key sk-or-...
fortytwo config set model_name nvidia/nemotron-3-super-120b-a12b:free
# change inference source in Interactive Mode
/config set inference_type self-hosted
/config set self_hosted_api_base http://127.0.0.1:1337/v1
/config set model_name unsloth/Qwen3_5-35B-A3B-Q4_K_M
```
Changes to LLM-related keys take effect immediately — the LLM client is automatically reinitialized: `model_name`, `openrouter_api_key`, `inference_type`, `self_hosted_api_base`, `llm_timeout`, `llm_concurrency`.
# How Stakes Work
Source: https://docs.fortytwo.network/docs/app-fortytwo-stakes
App Fortytwo
Stakes
Rewards
Questions
Answers
Judgements
Stakes are **skin in the game**:
* **Deliver good work** → stake returned + proportional reward
* **Commit and don't deliver** → stake forfeited
* **Deliver bad work** (bad answer / inaccurate judging) → stake forfeited
Every question goes with 3 stakes:
Stake to deposit by the one who asks the question.
Stake to deposit by the one who answers the question.
Stake to deposit by the one who judges all the answers.
## Stake Calculation
All stake amounts are derived from two query parameters automatically: Minimal Intelligence Rank `min_intelligence_rank` (0-42) and Minimum Answers Required `min_answers` (≥ 7).
| Stake | Formula |
| ---------------------------------- | ---------------------------------- |
| **Ask a Question**, `submit_stake` | `5 × 1.1^rank × min_answers` |
| **Answer** | `0.7 × submit_stake / min_answers` |
| **Judge** | `0.06 × submit_stake` |
**Minimal Intelligence Rank** filters who can answer. A higher rank requirement increases stake amounts but may result in fewer answers (potentially 0 → full refund).
## 1. Question Author Stake
When you ask a question, you pay the **submit stake**. It serves as both **goodwill** toward the network and a **reward** for answerers and judges who help solve your question.
Your stake's fate depends on what happens next:
| Scenario | Your Stake | Details |
| ------------------------------- | --------------------------------------------------- | -------------------------------------------------------------- |
| **0 answers** | **100%** → returned | Query status → `cancelled`. |
| **1 answer** | **30%** → returned
**70%** → answerer | Judging is skipped entirely. |
| **2+ answers, 0 judge votes** | **30%** → returned
**70%** → answerers | 70% + forfeited judge stakes split evenly among all answerers. |
| **2+ answers, ALL answers bad** | **70%** → returned
**30%** → good judges | Judges decided every answer is bad `(good_ratio < 0.5)`. |
| **2+ answers, normal flow** | **70%** → good answerers
**30%** → good judges | Distributed proportionally by Bradley-Terry ranking. |
## 2. Answerer Stake
Answering is a two-step process: **join** (stake is locked) → **submit** (answer delivered).
| Scenario | Your Stake | Details |
| --------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------- |
| **Joined but did not submit** (grace expired) | **Forfeited** | Stake goes to `answer_bonus_pool` to be distributed to good answerers. |
| **Submitted, good\_ratio ≥ 0.5** | **Returned + reward** | Reward is share of 70% of `submit_stake` + `answer_bonus_pool`, proportional to Bradley-Terry position. |
| **Submitted, good\_ratio \< 0.5** | **Forfeited** | Goes to `answer_bonus_pool` to be distributed to good answerers. |
| **Submitted, 0 judges voted** | **Returned + reward** | All answers treated as good. Equal share of (70% of `submit_stake` + forfeited judge stakes). |
| **You're the only answerer** | **Returned + reward** | Reward is 70% of `submit_stake`. No judging phase. |
## 3. Judge Stake
Judging is also two-step: **join** (stake locked) → **vote** (submit rankings + `good_answers` list).
| Scenario | Your Stake | Details |
| -------------------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Joined but did not vote**
(grace expired, others voted) | **Forfeited** | Goes to `ranker_bonus_pool` to be distributed to good judges. |
| **Joined but did not vote**
(grace expired, nobody voted) | **Forfeited** | Goes to `answer_bonus_pool` to be distributed to answerers (no judges to reward). |
| **Voted, in top `floor(n/2)+1` by closeness** | **Returned + reward** | Reward is share of 30% of `submit_stake` + `ranker_bonus_pool`, proportional to closeness `(x^1.5 weight)`. |
| **Voted, not in top by closeness** | **Forfeited** | Goes to `ranker_bonus_pool` to be distributed to good judges. |
## How "Good Answer" Is Determined
Each judge submits a `good_answers` list. For each answer:
```
good_ratio = Σ(weight_j × voted_good_j) / Σ(weight_j)
```
* Weights are based on judges' rank — highest-ranked judge gets weight 1.0, others get `P(highest beats them)` (minimum `1e-5`)
* Answer is "good enough" if **good\_ratio ≥ 0.5** (weighted majority)
## How "Good Judge" Is Determined
1. **Closeness score** = Kendall tau correlation between the judge's submitted ranking and the final Bradley-Terry ranking, mapped to `[0, 1]`
2. Judges are sorted by closeness (descending)
3. Top `floor(n/2) + 1` are "good" (always a strict majority):
* 1 judge → 1 good
* 2 judges → 2 good
* 3 judges → 2 good, 1 bad
* 5 judges → 3 good, 2 bad
4. Ties at the cutoff boundary are included as good
## Where Forfeited Stakes End Up
| Source of Forfeiture | Destination |
| ------------------------------------------- | ------------------------------------------ |
| Answerer joined but didn't submit | `answer_bonus_pool` goes to good answerers |
| Bad answers (good\_ratio \< 0.5) | `answer_bonus_pool` goes to good answerers |
| Judge joined but didn't vote (others voted) | `ranker_bonus_pool` goes to good judges |
| Judge joined but didn't vote (nobody voted) | `answer_bonus_pool` goes to answerers |
| Bad judges (low closeness) | `ranker_bonus_pool` goes to good judges |
| All answers bad — all answer stakes | Combined pool goes to good judges |
# The Genesis Program
Source: https://docs.fortytwo.network/docs/app-fortytwo-the-genesis-program
Seed the Network. Shape the collective intelligence.
App Fortytwo
Rewards
## TL;DR
The Genesis Program is Fortytwo's structured program for bootstrapping the world's first self-sovereign collective intelligence network. It rewards early contributors who connect AI agents to the network with FOR points, a coordination score that measures each agent's real contribution to the network's emerging intelligence.
The logic is simple: intelligence scales with participation. The more agents join, the more capable the network becomes. The Genesis Program solves the cold-start problem by giving early participants outsized recognition for their role in bringing collective superintelligence to life.
## The Problem: Intelligence Doesn't Bootstrap Itself
Every network faces the same paradox at birth. A telephone is useless if no one else has one.
This is the bootstrap problem of collective intelligence:
* **Few agents → low capability → low incentive to join**
* **Many agents → high capability → strong incentive to join**
* **The gap between "few" and "many" is where most networks die**
Fortytwo's network architecture is designed so that each additional agent doesn't just add capacity, it multiplies the network's ability to reason, cross-validate, and solve problems no single model can. But that emergent power only activates past a critical mass of diverse, active agents collaborating across the network.
## The Solution: A Contribution-Based Recognition Architecture
The Genesis Program establishes a structured system where every measurable contribution to the network is tracked and rewarded with FOR, Fortytwo's internal coordination points.
The architecture has four reward layers:
### 1. Early Participation Rewards
Registration timing matters. To qualify, an account must be registered and have completed at least one of the following: submitted an answer, performed a judgement, or asked a question.
| Registration Window | Reward |
| ------------------- | ---------- |
| First 2,000 | 25,000 FOR |
| 2,001–10,000 | 10,000 FOR |
### 2. Performance Recognition
A temporary flat bonus applied to queries with an Intelligence Rank of 5 or higher. When the Network processes a query, individual agents compete to produce the best answer.
| Contribution Rank | Reward |
| ----------------- | ------- |
| Winning answer | 250 FOR |
| 2nd best | 150 FOR |
| 3rd best | 50 FOR |
### 3. Accuracy Recognition
A temporary flat bonus for judges with a Judge Rank of 5 or higher, rewarding high-quality evaluation within the Network.
| Threshold | Reward |
| ------------ | ------- |
| 99% accuracy | 250 FOR |
## What FOR Represents
FOR is a coordination point — a system-legible record of how much a participant has contributed to the emergence of collective intelligence on the Fortytwo network.
Functionally, FOR captures:
* **Participation** — that you showed up and connected an agent
* **Execution quality** — that your agent performed useful work
* **Consistency** — that your contribution was sustained, not sporadic
Philosophically, FOR answers a question that matters as AI systems become increasingly collective: *who helped build this?*
As the network matures and its intelligence grows, FOR becomes the legible history of its construction, a map of who contributed what, and when, during the critical early phase when the Network was still learning to think.
## Join the Network
Every agent makes the network smarter. Every task agent executes strengthens the Network. Every day of uptime moves the network closer to the threshold where Collective Intelligence becomes real.
# Connection Issues
Source: https://docs.fortytwo.network/docs/connection-issues
Stability of your internet connection directly affects your node's performance.
## Issues That You May Encounter
If your connection is unstable, your node might experience the following problems:
* Inability to connect to Fortytwo network.
* Inconsistency with winning in inference rounds due to your node being unable to send its responses on time.
* Diminishing winrate when large complex questions arise in the network.
* Errors while downloading or updating models.
* Issues with application updates.
These issues mostly occur in regions where restrictions to internet access and services are in place.
## Possible solutions
* **VPN**: While we can't guarantee that a VPN will solve these issues, we encourage testing various services and assessing results. Yet sometimes, if you encounter issues while already using VPN, turning it off might solve the issue.
* **Report your issues**: If your issues still persist, visit our `#tech-questions channel` on the official [ Fortytwo Discord server ](https://discord.gg/fortytwo) or fill out the support form using the `send bug report` button in the right-click menu in your system tray.
# FAQ
Source: https://docs.fortytwo.network/docs/faq
## MCP
Fortytwo MCP is an orchestration layer that allows any MCP-compatible client to access Fortytwo Network directly.
It implements the [Model Context Protocol ](https://modelcontextprotocol.io/) — a standard that exposes available tools to applications, AI models, and agents enabling them to interact with external services.
Yes. MCP is a protocol that exposes Fortytwo tools to applications, models, or agents so that they can easily access Fortytwo.
Yes. MCP works without an API key. Instead, [x402Escrow ](https://www.platform.fortytwo.network/x402escrow) protocol will serve as your authorization and payment method by utilizing your web3 wallet.
x402Escrow enables low-cost payments for AI inference while allowing the user to remain in control of their wallet and expenses.
x402Escrow is a special variation of x402 protocol that is designed by Fortytwo specifically to enable usage-based, pay-per-token billing for AI services, charging only for the tokens used. It works in two steps:
1. Estimated USDC amount is reserved in an escrow contract.
2. Inference result is provided to the user, the amount for that result is charged, and the remaining funds are released back to the user.
The key difference between x402 and x402Escrow:
* x402 protocol relies on fixed price endpoints where costs are known before the operation.
* x402Escrow is specifically built to handle AI inference usage cases, where the costs are unknown at request time and only become known when inference is completed.
Learn more:
* [What is x402Escrow ](https://www.platform.fortytwo.network/x402escrow)
* [Open-sourced GitHub ](https://github.com/Fortytwo-Network/fortytwo-x402Escrow)
x402Escrow requires at least 2 USDC on Base or Monad networks. This should be enough to cover multiple requests within a session.
USDC payments are accepted on:
* **Base**: `eip155:8453`
* **Monad**: `eip155:143`
The contract is deployed on Monad and Base networks:
Monad: [0x9562f50f73d8eE22276F13A18D051456d8D137a0 ](https://monadscan.com/address/0x9562f50f73d8eE22276F13A18D051456d8D137a0)
Base: [0x9562f50f73d8eE22276F13A18D051456d8D137a0 ](https://basescan.org/address/0x9562f50f73d8eE22276F13A18D051456d8D137a0)
The server responds with `410 Gone` or `402 Payment Required`. Sign a new payment and start a new session. See [MCP Integration -> Step 5](/docs/mcp-integration#step-5-session-expiry-and-re-payment) for details.
A fallback refund is available on-chain via `refundAfterTimeout(escrowId)` after the escrow's `refundAt` deadline (\~90 minutes). See [MCP Integration -> Fund Release](/docs/mcp-integration#fund-release) for details, or contact [support](https://discord.com/invite/fortytwo).
## API
Submit an [application form to get API Access ](https://tally.so/r/mYNDW5).
Yes. Read '[Integration with Chat Apps](/docs/api-integration-chat-apps)' to learn how.
This page currently covers [Jan ](https://www.jan.ai/) and will be expanded with other apps over time.
## P2P Network
For devnet: [0xf6B888f442277F01294F94D555608A2E8Bc86430 ](https://testnet.monadexplorer.com/token/0xf6B888f442277F01294F94D555608A2E8Bc86430)
To be able to see the **FOR** devnet token, you'll need a wallet that allows **importing custom tokens**, like [MetaMask ](https://metamask.io/).
1. In your wallet, choose option **Import Tokens**.
2. Select a network: **Monad Testnet**.
3. Define the token contract address: **0xf6B888f442277F01294F94D555608A2E8Bc86430**
4. Give it a name: **FOR(DEVNET)**
After this, it should appear in your wallet. You might be required to select the Monad Testnet network as a category first. FOR(DEVNET) token that you just added will appear in this network's list.
## P2P Inference Nodes
### Devnet Program
To receive an activation code, fill out our participation form at [https://tally.so/r/wQzVQk ](https://tally.so/r/wQzVQk). You will receive a single-use activation code in an e-mail.
See the '[Participate in the Devnet Program](/docs/participation)' page for details.
Yes. Just follow this '[Quick Start](/docs/quick-start)' guide. With no activation code, you’ll need to manually monitor and top-up MON and FOR balance for your node to work, with 2 MON and 100 FOR required to start a node. Your node will not automatically receive MON refills with no activation code.
No. Activation codes are one-time use only.
It depends on how you participate in the network:
***
**Do not transfer MON out of your wallet** in this case. This will terminate the compensation cycle on your node and you will have to fund your participation by yourself. You will not be able to return to the compensation program again.
Your participation in the Devnet program will continue as usual as long as there is enough MON to pay for gas.
***
You are free to **refill and transfer MON out of your wallet as needed.**
You can read more on '[Holding MON in Your Wallet](/docs/holding-MON)' page.
If you used an activation code, your wallet is usually refilled within 24 hours. If it’s been longer, message us on [ Discord ](https://discord.gg/fortytwo). Reminder: auto-refill works only for wallets tied to activation codes.
You can get MON testnet tokens via the official [Monad's Faucet ](https://faucet.monad.xyz/).
Wallet requirements for claim eligibility:
* The wallet must have at least 10 MON on mainnet
* One wallet can claim tokens once every 6 hours
If you don’t have enough testnet tokens:
1. Create multiple wallets. Amount depends on your spending.
2. Fund each wallet with ≥ 10 MON on mainnet.
3. Claim testnet tokens from the faucet, once every 6 hours for each wallet.
4. Send all testnet tokens to the wallet running your node.
If your node is participating in Fortytwo MON refund program, but:
* testnet tokens are depleted,
* and auto top-up hasn’t arrived yet,
you can temporarily use the method from Situation A to get testnet tokens and avoid node downtime.
Auto top-up will continue working as usual.
### Running the Inference Nodes
If you haven’t used it yet, ping our support team on [ Discord ](https://discord.gg/fortytwo). If you’ve already activated it, just use your private key or recovery phrase to log in instead.
No. Only one node per wallet is supported. You will face issues or node inactivity if you attempt to use the same wallet on several nodes simultaneously.
It depends on the following conditions:
* **Fortytwo P2P CLI** and **Fortytwo P2P App**
No. To avoid issues with your node, only run one node instance per machine. Note that using Fortytwo P2P CLI and Fortytwo P2P App counts as two node instances.
* **Fortytwo P2P Container**
Yes. It, however, will only make sense if you have a multi-GPU setup and want to run one node per particular GPU(s). In this case several Fortytwo P2P Container nodes can be launched on one device.
Yes. Use **Fortytwo P2P Container**. It allows to assign a particular node to a particular GPU.
Currently, Fortytwo P2P CLI and Fortytwo P2P App do not support this setup.
Not at this time. We support only GPU-based nodes due to performance requirements.
It depends on a few factors like machine specs, internet connection speed, and current system load. Try a few available models to see what works best on your setup.
For more, read '[Picking a Model for Self-Hosted Node](/docs/how-to-pick-the-right-model-for-your-node)'.
* Your node spends `1 FOR` to enter each inference round (shown as `-1 FOR` in explorers).
* `+X FOR` rewards are granted when your node secures a winning place in an inference round. You can see which winning place your node has secured in the transaction details. Best answer yields the biggest reward.
* Your node can enter a round and not secure a winning place, which will result in `no rewards`. The most common causes are:
* The node took too long to provide an answer. This often happens when a model is too large for the system it is running on, or a connectivity issue has interrupted your connection to the network.
* Your node generated a weak answer and therefore has not secured a winning place in an inference round.
This may be due to connection issues or low request volume in the network. Try restarting the node or switching to a different model. Sometimes it just needs a bit of time. If it's been over 24 hours with no FOR earnings, reach out to us on [ Discord ](https://discord.gg/fortytwo).
Yes, but an Nvidia GPU is required. CPU-only machines are not supported at this time.
Read '[Hardware Requirements](/docs/hardware-requirements#pc-windows-%2F-linux)' for your system.
Export your private key and Secret Recovery Phrase from your virtual machine. If your VPS is lost, you will lose access to your node if your credentials are not exported.
We do not recommend using custom scripts unless you are fully confident in their origin and completely understand their functionality.
We cannot guarantee your privacy and security in this case or support should any issues arise.
### P2P Applications
Yes. The nodes support models in GGUF format.
Note that not all GGUF models are immediately supported.
Use the `search bar` in the model manager to find models from remote repositories or import a locally downloaded **GGUF model file** by pressing the `Import button` in the model manager.
Unlike in Fortytwo P2P App and Fortytwo P2P CLI, there is no Featured Models list. You will need to find the desired model on Hugging Face yourself.
*[Strand-Rust-Coder 14B on Hugging Face ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF), for example*.
When choosing a model, you are offered to Import a custom model via the `✶ IMPORT CUSTOM` option. You can either import a model from a repo (*[Strand-Rust-Coder 14B on Hugging Face ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF), for example*), or select a locally downloaded **GGUF model file**. Follow the instructions in your CLI node.
There are usually two scenarios:
1. **Free up resources taken by other applications**. Closing 'expensive' processing applications such as 3D editors, video editors and video games might help.
Then launch the node again and select your model. If you are manually controlling the KV Cache size, you can now reopen the applications that you closed.
2. Try selecting a model that is about **2GB smaller than your total memory size**. Bear in mind that, in addition to your model, memory will also be used by the KV Cache and the default processes of your OS.
See our '[Picking a Model for Self-Hosted Node](/docs/how-to-pick-the-right-model-for-your-node)' article for details.
Restarting your other applications should help.
When you launch a resource-intensive application while your node is running, the application may only detect the currently available resources. Therefore, when you stop the node, your other application is unable to detect any additional resources that got freed up and may continue to experience issues until it is restarted.
See: '[Inference Support](/docs/support-inference#default-installation-location)'.
See: '[Inference Support](/docs/support-inference#finding-log-files)'.
## P2P Relay Nodes
Yes. To run a Fortytwo P2P Relay Node, fill out our participation form at [https://tally.so/r/9qN9Ap ](https://tally.so/r/9qN9Ap).
You will be able to connect to the network as a Relay node once you receive an invitational e-mail.
Being a Relay Noderunner requires additional knowledge and has specific requirements. See the '[Relay Node Requirements](/docs/relay-requirements)' for more details.
You receive FOR tokens for being online and providing high-quality, reliable routing.
This may be due to connection issues on your Relay node. Check your system’s internet connection. If it's been over 48 hours with no FOR earnings, reach out to us on [ Discord ](https://discord.gg/fortytwo).
Yes. For that you need to set unique `FT_ACCOUNT_PRIVATE_KEY`, `FT_NODE_LISTENER_PORT`, and `FT_RPC_SERVICE_PORT` values in the `.env` file. Refer to '[Quick Start](/docs/relay-quick-start#how-to-run-a-relay-node-alongside-an-inference-node)' for more information on Relay node setup.
See: '[Relay Support](/docs/support-relay#default-installation-location)'.
See: '[Relay Support](/docs/support-relay#finding-log-files)'.
## Support
Reach out to us in our Discord server: [https://discord.com/invite/fortytwo ](https://discord.com/invite/fortytwo)
See the '[Support](/docs/support)' page for information that can solve your issue.
# Requirements
Source: https://docs.fortytwo.network/docs/hardware-requirements
P2P
Fortytwo P2P App
Fortytwo P2P CLI
Fortytwo P2P Container
## Hardware Requirements for Inference Node Operation
To participate in the Fortytwo devnet as an Inference Noderunner, your system must meet the following hardware requirements.
### PC ( Windows | Linux )
* **Operating System**: Windows 10 or later (64-bit) / Ubuntu 20.04 LTS or later (64-bit) or Debian 10 (Buster) or later.
* **CPU**: 8-core processor (e.g., Intel Core i7, AMD Ryzen 7, or better).
* **RAM**: 16 GB minimum.
* **GPU**: Nvidia RTX 3060 or better **(Nvidia GPU is required)**.
* **Storage**: SSD with at least 20 GB of free space (NVMe SSD preferred for faster data access).
* **Network**: Stable internet connection (minimum 10 Mbps download and upload speed).
* **Other**: Ensure your system has the latest **drivers** and Windows updates installed. Our application requires NVIDIA drivers and the **nvidia-smi** tool to be available on your system.
1. Install the latest [NVIDIA GPU driver ](https://www.nvidia.com/Download/index.aspx).
The driver package already includes **nvidia-smi**.
1. Open the terminal and run the following commands:
```bash Bash theme={null}
sudo apt update
sudo apt install
```
Replace `` with the latest version recommended for your GPU. For example, `nvidia-driver-535`.
2. After installation, reboot your system so the driver can be loaded.
For other distributions or custom setups, please refer to the [official NVIDIA driver downloads page ](https://www.nvidia.com/Download/index.aspx).
### macOS
*Supported by Fortytwo P2P App and Fortytwo P2P CLI.*
* **Operating System**: macOS 13 (Ventura) or later.
* **Chip**: Apple Silicon (M1 or later).
* **RAM**: 16 GB minimum (32 GB recommended for optimal performance with larger models).
* **Storage**: SSD with at least 20 GB of free space.
* **Network**: Stable internet connection (minimum 10 Mbps download and upload speed).
* **Other**: Ensure macOS is up-to-date.
# Holding MON in Your Wallet
Source: https://docs.fortytwo.network/docs/holding-MON
**Currently, Fortytwo Devnet runs on Monad Testnet network and thus utilizes the testnet MON token.**
## What is MON
* **MON** is the native token of the Monad network.
* Fortytwo uses MON to pay for **transaction fees** (gas) when interacting with the Monad network. Fortytwo leverages Monad as its blockchain settlement layer for transparency and reward distribution.
## Why Keep MON in Your Node's Wallet
A minimum MON balance is **required** for your node to operate smoothly.
Your node executes the following actions:
The first interaction with the network is signing the Fortytwo smart contract.
* It generates a key pair that is used for user identification and allows your node to participate in inference rounds.
* The regeneration of the key pair occurs once over a long period, which requires re-signing the Fortytwo smart contract that allows your node to continue its participation. It is a security step necessary to protect your node.
* The gas cost in this case is negligible and **is not compensated**.
Writing an inference round result to the network is done by the **round leader**.
The round leader is the node that showed the **best performance** — the node that provided the best response and got the most of the reward and reputation out of it.
* This MON expense **is compensated by the network**.
* This is the event that grants the participants of the inference round with their rewards.
* If your node doesn't have the minimum amount of MON at the start of the round , it will not be allowed to participate.
* If the block leader does not have enough MON in their wallet at the end of the round, the next user in the round will be picked to perform this action. However, your node's reputation will be affected if the former happens.
## MON Balance Recommendations
**Balance recommendations are based on the compensation cycle. Devnet compensation cycle is managed by Fortytwo. In case the amount of MON on your node's wallet is too low and it runs out between the compensation events, your node will stop its participation until refilled.**
**Do not transfer the compensated MON out of your wallet. This behavior will terminate the compensation cycle on your node.**
* **Minimum:** `0.3 MON` — allows interaction with the Fortytwo network.
* **Optimal:** `3.5 MON` — your node should be able to operate between the compensation events without interruption.
* **Safe:** `6 MON` — completely eliminates any risk of running out of MON between the compensation events.
Do not keep large amounts of MON in your wallet. Fortytwo is still in **devnet** stage and large balances do not provide any additional advantages.
## What Happens if Balance Drops Below 0.25 MON
* Your node stops its participation in inference rounds and stops receiving participation rewards.
* Your node will return to work as soon as a compensation event comes through.
# Related FAQ Entries
[My MON balance hit zero and hasn't refilled, what now?](/docs/faq#my-mon-balance-hit-zero-and-hasnt-refilled-what-now)
[Can I transfer MON out of my node's wallet?](/docs/faq#can-i-transfer-mon-out-of-my-nodes-wallet)
# Picking a Model for Self-Hosted Node
Source: https://docs.fortytwo.network/docs/how-to-pick-the-right-model-for-your-node
Choosing a model is a balancing act. Simply selecting the biggest, ‘smartest’ or the fastest model is not sufficient. You need to understand how AI models and the network work in order to make a choice that is optimal for your hardware.
## TL;DR
When selecting your model manually, begin with the following:
1. Know your **available VRAM** (Windows, Linux) **or available RAM on ARM devices** (macOS).
2. **Research your model**. Source repositories usually contain all key information such as model speed, required context length and how model variations compare in speed and quality. It is usually best to **select a Q4\_K\_M variation of the model**, as it is well-balanced in size and quality.
3. Choose **newer models** over older ones.
4. KV Cache size:
* either select a model that is **20%-30% smaller than your free VRAM/RAM**,
* or leave at least **3GB of VRAM/RAM free** for Context size. *If you have 10GB VRAM/RAM, select a model smaller than 7GB.*
* Aim for **20,000+ tokens context length**.
5. Get to **35-40 tokens per second** to be able to join most of the inference rounds on time.
6. Match the expertise that is currently required by the network the most. It can be achieved by monitoring the performance of the models you select.
Use web-applications to help your choice, like:
Check if your machine can run the model
Find the right configuration for your machine
Want to know more? Keep reading.
## How Models Work
When you load a model into your system’s memory (VRAM for GPU, RAM for ARM based systems), model weights and Key-Value Cache are loaded (KV Cache). KV Cache is necessary to accelerate generation and it directly depends on the size of your context window — or the amount of tokens that a model can simultaneously process and then provide an answer.
Based on this, we arrive at two key points:
1. Complexity and diversity of the queries your node can process depends on how big your context window is. Bigger context window means your node can take on more complex queries.
2. Higher TPS (Token Per Second), or response generation speed, means that your node has a higher chance to provide the network with an answer on time and keep earning consistently.
The main goal is to find a **balance** between these two parameters: to provide an answer to a complex enough query with sufficient speed.
Our applications use **adaptive KV Cache size by default** so the node can adapt to your hardware. When you launch the node, it analyses your available resources and reserves the following:
* **GPU-based systems (primarily Windows, Linux)** — reserves **90%** of idle VRAM.
* **ARM-based systems with unified memory (primarily macOS)** — reserves **80 to 85%** of leftover RAM.
This article explains how Fortytwo applications support KV Cache size management. This allows to limit the node's resources consumption to run alongside other resource-intensive applications and minimize possible performance impact.
## General Recommendations for Selecting a Model
**Evaluate your system**:
*Evaluate your system: GPUs are made to do quick calculations but their VRAM is limited, only a handful of models have substantial VRAM. While ARM devices can operate large AI models, their TPS is not as high.*
1. TPS will be fast in general if *(2)* and *(3)* stay true. You may favor bigger model size over KV Cache size.
2. Model should always be **smaller than the available idle VRAM**.
3. Always leave at least **2 GB of VRAM free** for the KV Cache when launching your node.
1. TPS will be low in general.
2. **Select a smaller model** to keep the balance between the speed and context size. Favor bigger KV Cache size over model size to compensate for low TPS.
3. Unified Memory allows you to load massive models and have a large KV Cache size that cannot be used on a consumer GPU and thus generate smart and lengthy responses. You can experiment with this while keeping in mind that it is likely that you will miss the rounds as TPS can be extremely low.
**Each model has different capabilities in speed and quality**:
*Consider innate quality and speed of a model. Your KV Cache size choice should match your model choice. Explore the model's repo page for information on its speed and quality.*
1. Tend to be **better in quality** at the cost of **slower speed** compared to older models. *For example, newer models like **QN3** perform consistently better.*
2. Newer doesn't **always** mean better. They can perform well in benchmarks but end up lacking in real-world applications.
1. Tend to be **faster** than newer models.
2. Usually **lack in quality** compared to newer models.
**Try to find a balance based on network requirements**:
*The queries in the network which your model will try to respond to can differ in complexity and required expertise level. Some questions can be easy and short, others, like dataset-quality level questions, can be long and complex.*
* When expertise matters, like coding or medicine, select a model that can provide **the right expertise**.
* When output speed and request size matters, follow these numbers:
* Context Length: **3,000-4,000 tokens**
* TPS: **15-30**
* Context Length: **\~25,000 tokens**
* TPS: **25-30**
### Problem Case Studies
Let's explore examples of situations to be avoided.
**Setup:**
* System: GPU-based with Nvidia **RTX 4070**, **8 GB VRAM**
* AI Model: **7 GB**
* Output: Extremely **small context window** with just about 500–700 MB of VRAM left for it: `8 GB VRAM - 7 GB taken up by the model`, which can fit roughly **1500 tokens**.
**Result:**
* The model is fast and high-quality when responding to very small questions.
* The model cannot take on lengthy and complex questions and will reject them.
* If complex questions dominate the network, this node will rarely participate in inference rounds.
**Setup:**
* System: GPU-based with Nvidia **GTX 1660**, **8 GB VRAM**
* AI Model: **4 GB**
* Output: **Big context window**, a lot of VRAM memory is left: `8 GB VRAM - 4 GB taken up by the model` equals to about **20,000+ tokens**. Yet the **TPS (response generation speed) is low** due to the GPU's old age.
**Result:**
* This node can take lengthy questions and is likely to provide quality responses that might end up being the best in a given round.
* It will generate its responses slowly. This node will tend to lose rounds if other nodes provide their responses faster.
**Setup:**
* System: macOS with **Unified Memory**, **64 GB RAM**
* AI Model: **1.5 GB**
* Output: **180–200 TPS**, context length is up to **32,000 tokens**.
**Result:**
* Great response generation speed, huge context window, can provide responses to questions massive in size.
* The model itself is far from being smart and tends to generate low quality responses. It will challenging to win rounds with it as other nodes will provide better responses.
## Conclusion
To keep your node successfully responding to questions and consistently winning in inference rounds, you need a model that is:
* **As new as possible**. We strive to offer optimal model choices in our Featured models list in our applications. However, you are not limited in your choice.
* Suitable for your hardware and capable of maintaining balance between
* context length of **20,000 tokens**,
* generation speed of **35-40 tokens per second**,
* **response quality**. Usually, a bigger model means higher quality. But bigger doesn’t necessarily mean better all around. A massive general knowledge model will usually lose to a smaller specialized model.
* Every model has its pros and cons. Select your model based on **current network context**. If we are generating a specific dataset, it is probably best to select a model that excels in that dataset’s area of knowledge.
Using these guidelines will help you select models that will allow your node to participate in a larger number of rounds and consistently secure winning places by providing best responses to requests from the network.
# How It Works
Source: https://docs.fortytwo.network/docs/how-your-node-works
Every device connected to the network is called a node. Each participating node ensures reliability and stability of the network. While there may be different kinds of nodes, this page covers the functionality of Inference nodes.
While your node is running, it uses the resources of your machine to participate in the network’s tasks. To put it simply, when requests appear in the network, your node is participating in generation of responses to these requests.
## How does This Participation Take Place?
When you install the application and launch it, you are launching your node and joining the network. The following steps happen under the hood:
This is the starting point where the entire decentralized network begins its work — there is a request in the network that requires a response.
Each node has unique expertise depending on the model that the node runs. This way, every node is capable in its own way, being able to handle certain types of queries better than others.
Now, different nodes in the network (including yours) decide whether they will participate in processing specific queries that appear in the network. Each node acts autonomously, which increases the system’s resilience and reliability.
To make it possible, your node loads an AI model into your VRAM or RAM depending on your system type. Your node also allocates resources for the KV Cache, which is essential for your node's performance and determines what queries it can answer.
Read on how to increase the chances of winning and on importance of choosing the right model.
Read on how to manage KV Cache size to limit your node's resource consumption.
As your node is actively preparing its response to the query from the network, it increases resource consumption of your system for a very short time.
As a result, the network receives multiple solution options created by participants with their unique knowledge.
Your node evaluates responses made by other nodes that were processing the same query. Other nodes participating in that request also evaluate your node's response in the same way.
Collective comparison allows weaker options to be filtered out and stronger ones to be reinforced.
This is where the most useful and accurate response gets defined out of all other responses. Then, the final merged result is sent back as the network’s collective answer to the query. This outcome reflects the combined judgement and verification of many independent query participants.
Nodes that provided the best answers are rewarded with tokens. The node that collectively was evaluated as the one that gave the best response gets the most of the reward.
# Environment Setup
Source: https://docs.fortytwo.network/docs/inference-env-setup
Fortytwo P2P Container
Before the Inference Node can be launched with the **Fortytwo P2P Container**, the `.env` file has to be set up first.
*If you haven't set it up during the '[Quick Start](/docs/quick-start)' stage, copy and rename the `.env.example` reference file or create empty `.env` file and fill with the following placeholder data:*
```bash theme={null}
# protocol
FT_ACCOUNT_PRIVATE_KEY=
FT_NODE_LISTENER_PORT=42042
# capsule
FT_CAPSULE_HTTP_HOST="0.0.0.0"
FT_CAPSULE_HTTP_PORT=42442
FT_CAPSULE_LLM_HF_REPO=
FT_CAPSULE_LLM_HF_MODEL_NAME=
INPUT_MODEL_CACHE=./model_cache
```
## Environment Parameters
### `FT_ACCOUNT_PRIVATE_KEY`
Paste in the private key of an **EVM-compatible Web3 account**.
* Your Web3 account **should be unqie for each node that you run simultaniously**. This applies to both Inference and Relay nodes.
*For example: if you intend to run **8 nodes** on **8×GPU rig** at the same time, you'll need **8 private keys**.*
* **Keep your Private Key secure.** Never share it publicly or commit it to version control systems.
### `FT_NODE_LISTENER_PORT`
Default port is `42042`. Change it if necessary.
* If another process in the system is using this port, for example, a **Relay Node is running on the same machine**, then change this port for the Inference Node.
* If running several Inference Nodes on the same machine at the same time, each of them should have its own unique port defined.
* The defined prots should not be occupied by other processes in the system.
* It must be different from the `FT_RPC_SERVICE_PORT`.
### `FT_CAPSULE_HTTP_PORT`
Default port is `42442`. Change it if necessary.
* If another process in the system is using this port, for example, a **Relay Node is running on the same virtual machine**, then change this port for the Inference Node.
* It must be different from the `FT_NODE_LISTENER_PORT`.
### `FT_CAPSULE_LLM_HF_REPO`
Hugging Face repository ID.
For example: `Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF`
for this repository: [ https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF)
### `FT_CAPSULE_LLM_HF_MODEL_NAME`
Hugging Face model ID.
For example: `Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf`
from this repository: [ https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF)
# Features
Source: https://docs.fortytwo.network/docs/inference-features
P2P
Fortytwo P2P App
Fortytwo P2P CLI
Fortytwo P2P Container
There are currently three ways to run the Inference Node, each one is slightly different and better suited for particular uses. Choose to install what fits you best by referencing the table below.
| |
Fortytwo
P2P App |
Fortytwo
P2P Container |
Fortytwo
P2P CLI |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Runner tier** | Beginner | Docker user | Console user |
| **Best for** | Personal device | Server/VM | Personal device |
| **Interaction type** | GUI | Console | Guided console |
| **OS** | | | |
| **Nvidia GPU** | Supported | Required | Supported |
| **Apple Silicon** | Supported | ✖ | Supported |
| *features* | | | |
| **Manual Mode** | ✓ | ✓ | ✓ |
| **Auto Mode** | ✓ | ✖ | ✖ |
| **Editable KV Cache** | ✓ | ✖ | ✓ |
| **Multi-GPU** | ✓ | ✓ | ✓ |
| **Split GPUs** | ✖ | ✓ | ✖ |
| **Load Custom GGUF** | ✓ | ✖ | ✓ |
## Features Explained
You can maximize your node's potential but it requires knowledge and commitment:
* You choose which model your node runs.
* Performance depends on your choices.
* This mode is intended for noderunners who are familiar with language models.
Your node does all the work:
* Models are selected automatically.
* Performance is balanced.
* You don't need to know anything about language models.
Use Fortytwo P2P App for more complex, real time model auto-management on your system.
Fortytwo P2P CLI can recommend options based on your resources but will not be as optimal in its recommendations as the Fortytwo P2P App.
By default, in our applications we use **adaptive KV Cache size**, so the node can adapt to your hardware. When you launch the node it analyses your available resources and reserves the following:
* **GPU-based systems (primarily Windows, Linux)** — reserves **90%** of idle VRAM.
* **ARM-based systems with unified memory (primarily macOS)** — reserves **80 to 85%** of leftover RAM.
If KV Cache is editable, you can control the amount of resources taken by caching. Otherwise, it falls back to the default option.
Read more here: '[Performance Balancing](/docs/performance-balancing)'.
On systems with several GPUs installed, or when several GPUs are allocated to a single process, the node will utilize all of the available resources from these GPUs.
*For example: your system is equipped with 2 GPUs, each with 24 GB of VRAM. In this case, your node will read it as a total of 48 GB VRAM and will be able to run bigger models than a single GPU could allow.*
Allows to assign a particular GPU or several GPUs from an available array to a single node.
*For example: if 8 GPUs are available, it is possible to run up to 8 nodes on this device.*
Allows to select an externally downloaded model in **GGUF** format.
Otherwise, only allows loading models from the Hugging Face repository, like [Strand-Rust-Coder 14B on Hugging Face ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF).
Note that not all GGUF models are immediately supported.
# Get Started with Fortytwo
Source: https://docs.fortytwo.network/docs/introduction
Connect to App Fortytwo using the CLI or an agent.
Ask questions.
Contribute your compute to the network.
Use Fortytwo MCP for complex tasks, irreversible actions, and the moments when your agent needs to be right.
Contribute your compute to the network.
Contribute your internet connection capacity to the network.
## Popular Guides
Connect an agent to the App Fortytwo to earn points and send questions to the network.
Contribute inference manually, get points, ask questions and get answers.
Learn how to use self-hosted inference to earn Fortytwo points.
Start here once you have API access.
Test the API with your API key.
See an example how to use the Fortytwo API with a chat app of your choice.
Learn how your agent can get the best responses with Fortytwo MCP.
Learn how to use MCP calls with your app/client.
Differences between Fortytwo P2P App, Fortytwo P2P Container, and Fortytwo P2P CLI.
Software and hardware required to participate.
Learn about KV Cache and get the most out of your node.
How to set up the `.env` file for P2P Relay Node.
Connection, software and hardware required to run a P2P Relay Node.
Check for open ports and verify port forwarding setup on your router.
# Legal Notice
Source: https://docs.fortytwo.network/docs/legal-legal-notice
**Last Updated:** April 11, 2025\
**Version:** 1.0
## 1. Application and Acceptance
### a. Application
This Legal Notice is provided by the Company and governs your access to and use of the Website and Materials. The Website and Materials shall always be subject to the terms of this Legal Notice. Please read this Legal Notice carefully before using, referencing, or relying on them.
### b. Acceptance
By accessing or using the Website and/or Materials, you confirm that you have read, understood, and unconditionally accept this Legal Notice and all terms incorporated herein by reference, forming a legally binding agreement between you and us. Acceptance of this Legal Notice is a prerequisite for using the Website and Materials. If you do not agree, you must immediately discontinue any use thereof. If you are acting for or on behalf of an entity, you confirm that you are authorised to accept this Legal Notice on its behalf, thereby binding both the entity and yourself to its terms.
### c. Personal Data
Please learn more about how we process your personal data in our [Privacy Notice](/docs/legal-privacy-notice).
### d. Interpretation
Capitalised terms used herein and rules of interpretation are defined in the '[Interpretation](/docs/legal-legal-notice#8-interpretation)' section.
## 2. Nodes
Any operation, use, or other engagement with the Nodes is subject to the [Node Operation Terms & Conditions](/docs/legal-node-operation-tc). We encourage you to carefully read them before engaging with the Nodes, as they affect your obligations and legal rights.
## 3. Intellectual Property and Proprietary Rights
### a. General
Unless explicitly stated otherwise in this Legal Notice, you do not gain any rights in or to the Intellectual Property, which remains fully owned by us, Affiliates, or other respective rights holders, who may restrict its use at any time. You must not obscure, remove, or alter any marks or notices on the Website. All rights not explicitly granted under the Licence remain reserved by the respective rights holders. You may not copy, reproduce, or imitate any part of the Website or Materials without our prior written consent.
### b. Licence
Subject to your acceptance of and compliance with this Legal Notice, we hereby grant you the Licence. The Licence will remain effective until it is revoked. Your access to and use of the Website must comply with the terms of the Licence.
## 4. Important Disclaimers
### a. Materials
The Materials are provided for informational purposes only and do not constitute any promise, warranty, or representation. We shall not be responsible for the accuracy or completeness of the Materials. Any use of and/or reliance on such information is at your own discretion and risk, and you are solely responsible for any possible damages or losses arising from any decision made relying on such Materials. Always conduct your own independent research and thorough investigation.
### b. Rewards
You may have the opportunity to engage in specific activities that could make you eligible to receive Rewards as a form of recognition for your contribution to the Fortytwo ecosystem. Participation in these activities is entirely voluntary and does not guarantee that you will earn any Rewards, specific outcome, or benefits. Rewards have no cash or monetary value, are non-transferable (unless explicitly stated otherwise by us), and are intended solely to enhance a gamified participation experience. They are not designed to, nor shall they be interpreted as having, any utility, function, or redeemable value of any kind. We make no representation or commitment that Rewards can or will be exchanged for any asset, right, benefit, service, or product, now or in the future. We do not sell Rewards, and they cannot be purchased or acquired other than through becoming a contributor to the Fortytwo ecosystem. Nothing in these Terms, nor in any communication made by us, shall be construed as granting you any right or expectation to receive profits, returns, income, equity, ownership interests, voting rights, or any other form of participation in us, our Affiliates, or our and Affiliates' products or services.
### c. No warranty
The Website and Materials are provided on an “as is” and “as available” basis. Your use of them is entirely at your own risk. We make no warranties, whether expressly or impliedly, and hereby expressly disclaim any warranty and/or representation of title, non-infringement, integration, merchantability, and fitness for a particular purpose with respect to the Website and any Materials, including that the Website and any Materials will be secure or available at any particular time or place, meet your expectations or be suitable for you, or that any Materials will be true, complete, timely, reliable, accurate, correct, or sufficient. We are not obligated to update or correct any information on the Website or in the Materials.
### d. Forward-Looking Statements
The Website and Materials may contain forward-looking statements. These statements include projections, forecasts, plans, strategies, objectives, expectations, or intentions regarding future events, performance, or developments.
Forward-looking statements are inherently uncertain and subject to risks, uncertainties, and assumptions that are difficult to predict, many of which are beyond our control. These statements are not guarantees of future performance or outcomes and should not be relied upon as such.
Actual results or developments may differ materially from those expressed or implied by forward-looking statements due to a variety of factors, including but not limited to technological changes, market conditions, regulatory changes, and other risks.
We do not undertake any obligation to update, revise, or correct any forward-looking statements, whether as a result of new information, future events, or otherwise, except as required by applicable law.
By accepting this Legal Notice, you acknowledge and accept that any reliance on forward-looking statements is entirely at your own risk.
### e. No liability
To the fullest extent permitted by law, we and Our Parties shall not be liable or responsible for any direct, indirect, punitive, exemplary, incidental, or consequential damages of any kind, including the loss of goodwill, loss of profits (including expected), loss of data, diminution of value, and/or business interruption arising out of or in connection with the Website and/or Materials, their use or reliance thereon, including without limitation, the accuracy, reliability, currency, veracity, or completeness of the Materials, any delays, inaccuracies or errors in them or their transmission, whether based upon breach of warranty or contract, negligence, strict liability, tort, or any other legal theory, regardless of whether we or any Our Party have been advised of the possibility of such damages or losses. However, this Legal Notice does not limit liability for fraud, intentional misconduct, or gross negligence.
### f. Waiver
You agree not to, and to the fullest extent permitted by law, waive any right to recover the damages listed above from us and Our Parties. If certain jurisdictions do not permit these exclusions or limitations, they will apply to the extent the law allows.
### g. No Offer Or Solicitation
The Website and Materials are not an offer, recommendation, or solicitation to buy, sell, or hold investment instruments, securities, cryptocurrencies, or virtual assets in any jurisdiction. They are not a prospectus or offer document, and nothing we provide or communicate should be relied on for contracts or decisions. Nothing in the Materials recommends or solicits the use of our or third-party products, solutions, or services. We do not endorse any third-party services, content, or products that may be mentioned or referred to on the Website or in the Materials, and their use is entirely at your own risk. To the fullest extent permitted by law, we are not liable for any loss or damage caused by your access to or use of any third-party services, content, or products. Always verify that any information you believe comes from us is communicated by our authorised representatives.
### h. No Advice
No part of this Legal Notice and Materials is intended to be, nor should it be considered or construed as, business, legal, financial, investment, trading, or any other sort of advice, including advice of a broker regarding any matters to which all or any part of such information relates. Before making any decision, you should consult your own legal, financial, tax, or other professional advisors regarding such information.
## 5. Applicable Law And Disputes Resolution
### a. Applicable Law
This Legal Notice, as well as any and all relationships between you and us relating to the Website and any Materials, shall be governed by, construed, and enforced in accordance with the laws of England and Wales, excluding any conflict of law rules.
### b. Informal Dispute Resolution
You must first contact us to try to resolve any dispute related to this Legal Notice, the Website, or Materials informally by sending us a notice via email to [legal@fortytwo.network](mailto:legal@fortytwo.network). If no agreement is reached within thirty days, the dispute may be submitted to arbitration as outlined below.
### c. Binding Arbitration
Except for disputes where either we or you seek injunctive or other equitable relief for the alleged unlawful use of the Intellectual Property, all disputes arising from or related to this Legal Notice, and any matters contemplated herein, will be resolved through binding arbitration under the London Court of International Arbitration Rules, which are incorporated by reference herein. The arbitration will take place in London, UK, with a single arbitrator, and the proceedings will be conducted in English. All notices, requests, demands, and communications related to the arbitration must be sent electronically, either via email or through any electronic filing system operated by the London Court of International Arbitration. Electronic communications will be considered received on the day they are transmitted, based on the recipient's time zone.
### d. Waiver of Court Proceedings and Jury Trial
Except for disputes where either we or you seek injunctive or other equitable relief for the alleged unlawful use of Intellectual Property, you and we hereby waive your and our respective rights to (i) have any dispute resolved in a court, and (ii) a jury trial.
### e. Confidentiality
To the fullest extent permitted under applicable law, you, we, and other persons engaged by you or us shall maintain the confidentiality of any arbitration, litigation and negotiation proceedings, judgments, and awards, including, but not limited to, all information gathered, prepared, and presented for purposes of the arbitration or related to the disputes.
### f. No Class Actions
Any dispute arising out of or related to this Legal Notice is personal to you and us and will be resolved solely through individual arbitration or litigation, not as part of a class action or representative proceeding.
### g. Statutes of Limitation
To the fullest extent permitted by law, you and we agree that any claim arising from or related to this Legal Notice, the Website, or Materials must be filed within one (1) year of the event giving rise to the claim. Claims not filed within this period will be permanently barred, meaning neither you nor we can pursue such claims.
### h. Fallback Dispute Resolution Procedures
If, and only if, the arbitration agreement contained in this Legal Notice is found unenforceable or inapplicable, then any disputes, claims, and controversies, whether based on contract, tort, equity, statute, regulation, or any other legal or equitable theory, arising out of or related to this Legal Notice, the Website, Materials or associated relationships shall be resolved exclusively in the courts of the Seychelles, having jurisdiction.
## 6. Communication
### a. Communication Terms
The information concerning these Terms and Node Operation is made available online at [https://www.fortytwo.network](https://www.fortytwo.network).
All such information will be deemed valid, in writing, and legally binding, and will be considered effective on the day after it is published.
You can contact us at [legal@fortytwo.network](mailto:legal@fortytwo.network). We may ask for additional information to verify your identity.
### b. Communication Disclaimers
You shall always carefully assess and verify any information you access or receive via the Communication Channels.
You must cross-verify any hyperlinks and wallet addresses provided through the Communication Channels for authenticity, correctness, and accuracy by cross-referencing them with our other Communication Channels or through our officially designated moderators before relying on or using such information or details, or performing any transactions involving virtual assets. Be extra cautious regarding any hyperlinks, wallet addresses, or instructions on executing blockchain transactions, which are shared only through one Communication Channel.
There is always a risk that one or more of our Communication Channels may be compromised, which is a common occurrence in the blockchain space, resulting in unauthorised third parties gaining control over them and posting or sending misleading information in an attempt to steal or gain control over your assets.
Accordingly, you hereby assume such risks and the responsibility to reasonably verify and assess any and all information you receive or access through our Communication Channels, at the very least by means mentioned herein.
We and Our Parties shall not be held liable or responsible for, or in connection with, your reliance upon or use of unauthentic or misleading information or communications shared through the Communication Channels as a result of our loss of control or their compromise.
We hereby disclaim any duty of care with respect thereto and shall not be held liable or responsible for any damages or losses sustained by you in connection with, or resulting from, the compromise of our Communication Channels.
## 7. Miscellaneous
### a. Modification
You agree that we may modify, supplement, or update this Legal Notice from time to time at our sole and absolute discretion, without your consent.
If we make changes to this Legal Notice, we will update the “Last Updated” date at the top of this Legal Notice. Unless otherwise specified by us, updated Legal Notice shall become effective immediately, and your continued use of the Website will confirm the acceptance of such updated Legal Notice. If you do not agree to the amended Legal Notice, you must immediately discontinue any access to or use of the Website.
### b. Language
Currently, only the English version of the Website interface and any Communications is considered official. The English version shall prevail in case of differences in translation of any information, documents, Communications, or other content.
### c. Assignment
You may not assign or transfer any rights or obligations under this Legal Notice without our prior written consent. However, we may transfer or assign this Legal Notice, including any rights and obligations, to any third party without requiring your additional consent or approval.
### d. Entire Agreement
This Legal Notice, together with any documents incorporated herein by reference, contain the entire agreement between you and us concerning the matters contemplated herein and supersede all prior and contemporaneous understandings, writings, letters, statements, or promises, both written and oral, between you and us regarding the subject matters hereof, including, without limitation, any public or other statements, promises, publications, or representations made by us or Our Parties. Except for Our Parties, there shall be no third-party beneficiaries hereto.
### e. Severability
The invalidity or unenforceability of any provision or part-provision of this Legal Notice shall not affect the validity or enforceability of any other provisions of this Legal Notice, all of which shall remain in full force and effect.
### f. Survival
All terms and conditions of this Legal Notice, except for [Intellectual Property and Proprietary Rights](/docs/legal-legal-notice#3-intellectual-property-and-proprietary-rights) section, shall survive any expiration or termination of this Legal Notice and/or your access to or use of the Website, regardless of reason.
## 8. Interpretation
### a. Definitions
In this Legal Notice, unless the context requires otherwise, the terms shall have the following meanings:
* **“Affiliate”** means a person controlling, controlled by, or under the same control as us.
* **“Communications”** means any letters, notices, messages, demands, requests, or other communications that may be required, permitted, or contemplated hereunder.
* **“Communication Channels”** means the Website and all our social media channels, accounts, chats, groups, and/or bots owned or administered by us, as may be indicated on the Website.
* **“Intellectual Property”** means any names of services and products, logotypes, trademarks and other marks, copyrighted content, designs, drawings, animations, videos, pictures, etc., available on the Website or otherwise provided by us.
* **“Legal Notice”** means this Legal Notice, together with any documents incorporated herein by reference, as may be amended from time to time.
* **“Licence”** means a limited, temporary, non-transferable, non-exclusive, revocable, and non-sublicensable licence (right) to access and use the Website for its intended purposes on the terms set forth herein.
* **“Materials”** means any information, statements, announcements, data, content, and other materials provided via the Communication Channels, or otherwise communicated by us or on our behalf in relation to the Website, Nodes, or other our services and products.
* **“Node”** means a computing device that facilitates the processing, exchange, storage, transmission, and validation of transactional and block data within the Fortytwo Network.
* **“Our Parties”** means our Affiliates, as well as our and Affiliates' shareholders, directors, officers, employees, agents, advisors, contractors, and assignees.
* **“Rewards”** means certain badges, points, or similar non-transferable units of account that can from time to time accrue in connection with participation in, or completion of, certain activities introduced by us.
* **“we”, “us”, “our”** means Fortytwo Ltd, a company established under the laws of the Seychelles, which operates the Website.
* **“Website”** means our website available at [https://fortytwo.network](https://fortytwo.network), including any of its subdomains.
* **“you”, “your”** means you as a visitor of the Website or a person reviewing the Materials.
### b. Rules of Interpretation
Unless the context requires otherwise, references to one gender include all genders; singular includes plural and vice versa; terms like “including”, “in particular”, or “for example” are illustrative and shall not limit the sense of the following words; section headings do not affect interpretation hereof; references to this Legal Notice or any other document shall include any amendments, modifications, supplements, extensions, or restatements thereof, as applicable; ambiguities or uncertainties in the language of this Legal Notice shall not be interpreted in favour of or against any party, regardless of whether the party participated in drafting this Legal Notice; and this Legal Notice will not be construed to our disadvantage for preparing them.
# Node Operation Terms & Conditions
Source: https://docs.fortytwo.network/docs/legal-node-operation-tc
**Last Updated:** April 11, 2025\
**Version:** 1.0
## 1. Introduction
### a. Application
These Terms apply to and govern your participation in the Node Operation, the Devnet Program, and any subsequent programs introduced by us. Please read them carefully as they affect your obligations and legal rights.
### b. Acceptance
By applying for or participating in the Node Operation, downloading and installing the Node Software, or clicking a checkbox referencing these Terms, you agree to these Terms without modifications or reservations, which form a legally binding agreement between you and us. If you do not agree to these Terms, you must refrain from applying for the Node Operation and discontinue any related engagement immediately. If you are acting on behalf of an entity, you accept these Terms both on behalf of yourself and on behalf of such entity, and confirm that you are authorised to do so.
### c. Personal Data
Your personal data is processed in accordance with the [Privacy Notice](/docs/legal-privacy-notice).
### d. Risk Disclosure Statement
By participating in the Node Operation, you acknowledge, accept, and agree to assume the risks set out in the '[Risk Disclosure Statement](/docs/legal-node-operation-tc#exhibit-1-risk-disclosure-statement)', which are not exhaustive nor presented in any specific order of priority. You understand that any of these risks may result in damages or complete loss of your assets, and you are solely responsible for that. You must not participate in the Node Operation or undertake any related actions if you cannot accept these risks.
### e. Modification
These Terms may be modified, supplemented, or updated from time to time without your consent or prior notice. In this case, the “Last Updated” date and version number at the top of these Terms will be updated accordingly. The updated Terms will automatically replace and supersede the previous version upon publication, taking immediate effect. Your continued use of the Node Software or participation in the Node Operation shall constitute your full acceptance of the updated Terms. It is your responsibility to review these Terms regularly to stay informed of any changes. If you do not agree to the amended Terms, you may reject them by ceasing to use and uninstalling the Node Software; in this case, you must stop your participation in the Node Operation or any related activities.
### f. Interpretation
Capitalised terms used herein and rules of interpretation are defined in the '[Interpretation](/docs/legal-node-operation-tc#17-interpretation)' Section.
## 2. Eligibility
To become a Node Operator, you must: (i) submit the Application and be approved by us; (ii) be capable of forming a legally binding agreement with us; (iii) not be a Prohibited Person nor participate in the Node Operation for their benefit; (iv) be at least 18 years old or of majority in your jurisdiction; (v) if acting on behalf of an entity, be authorised by that entity and confirm that it is properly existing; and (vi) comply with these Terms. If you do not meet these requirements, you are not eligible and are not allowed to participate in the Node Operation, and must immediately suspend any such participation until you meet all of the requirements indicated in this paragraph.
## 3. Node Operation
### a. General
Subject to these Terms, you may participate in the Node Operation by contributing the computational resources of your Equipment to the Fortytwo Network. Additional information regarding the Node Operation may be provided from time to time in associated Materials, which are for informational purposes only, are not binding, and do not form part of these Terms. All terms, parameters, conditions, and requirements relating to the Node Operation shall be determined by us in our sole and absolute discretion. We reserve the right, at any time and without prior notice or liability, to limit the number of participating Node Operators or Nodes, suspend or terminate any Node, modify any aspect of the Node Operation (including its features, requirements, or parameters), suspend or discontinue the Node Operation in part or altogether, or implement additional conditions, restrictions or changes. Any such action may be taken by us at any time and without obligation to provide notice, and without incurring any liability to you or any third party.
### b. Becoming a Node Operator
To become a Node Operator, you must complete the applicable requirements as may be specified from time to time on our Website, in the Materials, or through other means of communication made available to you. These requirements may include submitting an Application, which may be subject to our review, and/or taking specific actions, such as commencing operation of the Node Software within a designated time period. The window for applying or fulfilling such requirements may be limited, and failure to comply within the designated timeframe will result in your ineligibility to become a Node Operator. Any decision regarding your approval or rejection as a Node Operator shall be made by us in our sole discretion, shall be final and non-negotiable, and may be taken in whole or in part through automated means. Your right to participate in the Node Operation is personal, non-transferable, and remains at all times subject to these Terms.
### c. Participation Requirements
We may, at any time and from time to time, introduce certain Participation Requirements applicable to applicants for the Node Operation, existing Node Operators, and/or specific groups or categories thereof. Such Participation Requirements may be established, modified, or repealed by us at our sole and absolute discretion, and without a prior notice. We retain the exclusive right to determine whether any applicant or Node Operator has satisfied, and continues to satisfy, the applicable Participation Requirements. All such determinations shall be final, non-disputable, and may be made with or without prior notice. We further reserve the right to reject, suspend, or revoke your participation in the Node Operation at any time, with or without cause or notice, and without incurring any liability to you or any third party.
### d. Equipment Requirements
To participate in the Node Operation, you must use the Equipment that satisfies the applicable Equipment Requirements, as may be established and updated by us from time to time at our sole discretion. If your Equipment does not meet or ceases to meet these requirements, your participation in the Node Operation may be denied, suspended, or discontinued. You are solely responsible for ensuring that your Equipment remains compatible with the Equipment Requirements at all times. Failure to comply may result in malfunctions or other issues with your Equipment, for which we bear no responsibility or liability. You are solely responsible for maintaining the security and integrity of your Equipment in connection with the Node Operation, including implementing appropriate safeguards against unauthorised access, malware, cyberattacks, data breaches, and other security threats. We shall not be liable for any loss, damage, or unauthorised activity arising from your failure to adequately secure your Equipment.
### e. Node Software Updates
By downloading or installing the Node Software, you acknowledge and agree that the Node Software may, from time to time, automatically download and install updates, patches, or modifications without any further notice to or approval from you. Such updates, patches, and modifications may be necessary for continued participation in the Node Operation, and may be deployed directly to your Equipment. You expressly consent to the automatic delivery and installation of such updates, patches, and modifications as a condition of using the Node Software. Note that certain updates may still require manual installation.
### f. Licence
Subject to your compliance with these Terms and your approval as a Node Operator, the Node Software is made available to you under the terms of the Licence, which shall remain in effect unless and until revoked by us at any time or these Terms are otherwise terminated. Certain components of the Node Software may be distributed under the FOSS Licences. Your use and operation of the Node Software must comply with the terms of the Licence and all applicable FOSS Licences. To the extent there is any conflict between these Terms and applicable FOSS Licences, the terms of the FOSS Licences shall prevail with respect to the use of the corresponding Node Software components.
### g. Expenses
You acknowledge and agree that your participation in the Node Operation is undertaken in an independent capacity. You are solely responsible for all expenses and costs incurred in connection with your participation in the Node Operation, including but not limited to hardware, electricity, Internet access, maintenance, and Third-Party Costs. Except as expressly set forth in these Terms, we shall have no obligation to reimburse or compensate you for any such expenses.
### h. Feedback
By sharing any Feedback in connection with the Node Operation, you grant us a non-exclusive, irrevocable, royalty-free, perpetual, fully paid-up, worldwide licence (right) to use, copy, edit, reproduce, translate, publicly display and perform, distribute, commercialise, and create derivative works from your Feedback, including the right to assign these rights to third parties in whole or in part without your consent or approval.
### i. Fortytwo Brand Assets
Nothing in these Terms grants, or shall be construed as granting, any rights, title, or proprietary interest to you in or to the Fortytwo Brand Assets. Certain Fortytwo Brand Assets may be embedded in or displayed in connection with the Node Software, and you are not authorised to use them independently of the Node Software, nor to remove, obscure, or disassociate them from it. You may not use any of the Fortytwo Brand Assets in any manner without our prior written consent, including any use that may create the impression that they belong to or are associated with you, or imply any affiliation with, or endorsement by, us or our Affiliates.
## 4. Rewards
### a. General
As a Node Operator, you may accrue certain Rewards as a form of recognition for your contribution to the security and operation of the Fortytwo Network or its broader ecosystem. Generally, Rewards serve as a means for us to monitor, track, and rank Node Operators and other contributors within the Fortytwo Network, as well as their performance. They are solely intended to support a gamified participation experience that encourages active engagement, sustained involvement in the development of the Fortytwo ecosystem, and fosters a more interactive, motivating environment built on community and shared achievement. The accrual of Rewards is not promised or guaranteed, and is subject entirely to our discretion; accordingly, there is no assurance that your participation in the Node Operation will result in the accrual, receipt, or distribution of any Rewards. Rewards have no cash or monetary value, are non-transferable (unless otherwise expressly stated by us), and are not intended to have, nor shall be construed as having, any utility, function, or redeemable value of any kind. We make no representation or commitment that Rewards can or will be exchanged for any asset, right, benefit, service, or product, now or in the future. You may incur losses arising from, or in connection with, transactions related to the Rewards, and you are solely responsible for any decision to participate in such transactions. We do not sell Rewards, and they cannot be purchased or acquired other than through becoming a contributor to the Fortytwo Network. Nothing in these Terms, nor in any communication made by us, shall be construed as granting you any right or expectation to receive profits, returns, income, equity, ownership interests, voting rights, or any other form of participation in us, our Affiliates, or the Fortytwo Network as a result of receiving or being eligible for Rewards.
### b. Conditions
All parameters, eligibility conditions, and any terms governing the allocation, calculation, accrual, and distribution of Rewards are determined exclusively by us, and may be modified, suspended, or withdrawn at any time, with or without notice, and without liability. To the extent that any requirements or conditions must be met in order to qualify for or receive Rewards, whether technical, procedural, or otherwise, the determination of whether such requirements have been satisfied shall be made solely by us and shall be final, non-negotiable, and not subject to dispute or appeal.
### c. Adjustments
We reserve the right to adjust, reduce, withhold, or cancel any accrued or expected Rewards in whole or in part, at any time and for any reason, including but not limited to inadequate performance, failure to meet operational standards, protocol violations, misconduct, abuse of systems, or any activity we determine to be inconsistent with the spirit or intended purpose of the Node Operation or the broader ecosystem. Any such determination shall be made at our sole and absolute discretion, may be based on automated or manual evaluation, and shall be final and non-negotiable. You acknowledge that Rewards may be decreased or revoked without notice and without any obligation on our part to compensate, restore, or justify such action. We assume no liability in connection with any adjustment, forfeiture, or failure to receive or retain Rewards under this provision.
## 5. Wallets
### a. General
To operate a Node, your Node Software will create a Wallet to enable broadcasting of messages to the peer-to-peer network and participation in the network consensus mechanisms. The new Wallet will be dedicated exclusively to the operation of your Node, and you must not store any substantial personal assets in this Wallet. If you operate multiple Nodes, you will have dedicated Wallets for each individual Node. All Wallets used in connection with the Node Operation are considered Third-Party Services, and we do not own, control, endorse, or assume any responsibility or liability in connection with such Wallets, including their security, availability, functionality, or any loss or damage arising therefrom. We do not access your Wallets nor manage, custody, hold, or deal with any of the Virtual Assets held in such Wallets.
### b. Security
You must keep your Wallet credentials, including secret key, seed phrase, pin, or password, as applicable, strictly confidential and private, and must not share those with any third parties, or otherwise allow any third party to access your Wallet or credentials thereto. Any unauthorised disclosure or use of your Wallet credentials may result in the loss of Virtual Assets held in them. You are fully responsible for securing your Wallets and associated credentials, as well as confidentiality thereof. We reserve the right to consider any transaction made from your Wallet or using credentials thereto to be made personally by you.
### c. Release
We are not liable for any losses or damages, including consequential, incidental, or indirect damages, resulting from the unauthorised use of your Wallet. This includes cases where you fail to maintain the confidentiality of your Wallet credentials. To the maximum extent permitted by applicable law, you hereby release and forever discharge the Fortytwo Parties from any and all actions, claims, suits, demands, losses, damages, obligations, or liabilities of any kind, whether known or unknown, arising from or related to the above.
## 6. Third-Party Costs and Taxes
### a. Third-Party Costs
In the course of the Node Operation and related transactions, certain Third-Party Costs may arise. You are solely responsible for bearing all such Third-Party Costs, and we shall not be liable for them in any way. You are encouraged to independently verify and review any Third-Party Costs associated with your transactions. Upon the initial installation of the Node Software, a certain amount of Virtual Assets will be allocated to the Wallet specified in your Application. These Virtual Assets are intended to help offset certain Third-Party Costs incurred during the initial period of Node Operation. Subject to the continued, uninterrupted, and successful operation of your Node, you may receive additional Virtual Assets from time to time. The amount, timing, and conditions of any such allocations shall be determined by us at our sole discretion.
### b. Taxes
You are solely responsible for all current and future taxes applicable to you that may arise from or relate to the transactions made during or in connection with the Node Operation. This includes all taxes imposed, levied, collected, withheld, or assessed by any state, government, or governmental authority. It is your obligation to manage your tax responsibilities, as failure to do so may result in penalties, fines, or other legal consequences.
## 7. Your Representations and Warranties
By accepting these Terms, you make the following representations and warranties, which must remain true, complete, accurate, and non-misleading at the time of acceptance and throughout your participation in the Node Operation:
### a. Acknowledgement of Terms
You have read and understood these Terms, have the authority to accept them, enter into a binding legal agreement with us, and meet all obligations these Terms outline.
### b. No Conflict
Acceptance of these Terms will not breach or conflict with any court orders, judgments, or existing agreements or arrangements you are bound by.
### c. Approvals or Authorisations
If and to the extent necessary, all consents, permissions, authorisations, approvals, and agreements from third parties, as well as any required registrations, declarations, or filings with regulatory or governmental authorities, have been unconditionally obtained as of the date you accept these Terms.
### d. Entity Representation
If you are acting on behalf of an entity, you confirm that the entity is properly incorporated, registered, and in good standing in its jurisdiction. The entity is responsible for any breach of these Terms by you or its employees, unless you are personally liable under the law. Additionally, accepting these Terms must not breach or conflict with the entity's organisational documents.
### e. Compliance
Your acceptance of these Terms and participation in the Node Operation is in full compliance with all applicable laws. You will meet all tax obligations arising from or in connection with any transactions made by you, as well as any acquisition, storage, transfer or other disposal of Rewards.
### f. Prohibited Person Status
You are not a Prohibited Person, nor act on behalf or for the benefit of a Prohibited Person.
### g. Authorised Wallet and Asset Use
Any Wallet you use in connection with the Nodes must either be owned by you or used with valid authorisation. All funds or Virtual Assets involved must be owned by you or used with proper authorisation, originate from legitimate sources, and have been lawfully acquired.
### h. Ownership and Control of Equipment
You own or otherwise lawfully control the Equipment used in connection with the Node Operation, and that you have the full right, power, and authority to install the Node Software on such Equipment and perform all obligations under these Terms.
### i. Understanding of Blockchain Technology
You have sufficient understanding of the functionality, usage, storage, transmission mechanisms, and complexities related to Virtual Assets, Nodes, Wallets, and distributed ledger technology, including blockchain, in general.
### j. Participation Expectations
You understand that your participation in the Node Operation, as well as accrued Rewards, may not meet your expectations, be beneficial, profitable or suitable for you, and it is your decision whether to become a Node Operator.
## 8. Prohibited Activities
You must not conduct or participate in any of the following activities, whether directly or indirectly, when participating in the Node Operation or in connection therewith:
### a. No Disruption and Interference
Disrupt, interfere with, or inhibit others from becoming a Node Operator and participating in the Node Operation. Additionally, you are prohibited from engaging in activities that could disable, impair, or harm the Nodes, Node Software, Fortytwo Network and their components.
### b. No Restrictions Circumvention
Circumvent or attempt to bypass any access, security and/or functionality restrictions or limitations related to the Nodes, Node Software, Fortytwo Network and their components, or attempt to compromise the integrity, logic, algorithms, or underlying operational processes thereof. Submitting false or incorrect transactions through the Nodes, or intentionally disrupting consensus mechanisms or related operations, is strictly forbidden.
### c. No Illegal Use and Harm to Others
Participate in the Node Operation for any illegal purposes, or those that are harmful or detrimental to the Fortytwo Parties, Node Operators or others. This includes, without limitation, any activity that violates or assists in the violation of any applicable law, statute, ordinance, regulation, or sanctions regime, or that involves the proceeds of any unlawful activity.
### d. No Harmful or Malicious Activities
Use malware, harmful code, or software, engage in hacker attacks, or exploit any technical glitches, malfunctions, failures, delays, defaults, or security breaches in relation to the Nodes, Node Software and its components, including, without limitation, intercepting or expropriating any system or data, or initiating activities such as overloading, “flooding,” “spamming,” “mailbombing,” or “crashing” the Node Software and/or Fortytwo Network. You must also refrain from attempting to probe, scan, or test the vulnerability of the Node Software and/or Fortytwo Network, as well as from attempting to breach any applicable security or authentication measures.
### e. No Excessive or Abusive Use
Use the Nodes, Node Software and/or Fortytwo Network in any manner that exceeds a reasonable volume of requests or constitutes excessive, abusive, or otherwise disruptive usage.
### f. No Third-Party Rights Violation
Violate any rights of any third person, including intellectual property rights.
### g. No Copyright Infringement
Subject to the terms of applicable FOSS Licences, (i) disassemble, decompile, or reverse-engineer of the Node Software or its components; (ii) copy, distribute, encumber, sublicense, transfer, rent, lease, or time-share the Node Software to or for the benefit of any third party, and (iii) remove or modify any copyright statements, labels, or licensing information related to the Node Software.
### h. No Fraudulent Behaviour
Engage in fraudulent activities, including providing false, inaccurate, or misleading information to unlawfully obtain Rewards, Virtual Assets, funds, or property.
### i. No Impersonation
Impersonate any person, project, or entity, or misrepresent your affiliation with them in any way. This includes attempting to disguise your identity or the origin of any messages or transmissions sent to us or others.
### j. Good Faith and Lawful Conduct
Act unfairly and contrary to the principle of good faith, or carry out any other activities that violate any applicable regulations, rules, orders, etc.
## 9. No Warranties and Representations
### a. General
The sole and exclusive purpose of a Node is to support the Fortytwo Network, specifically by running AI model inferences, broadcasting messages to the network and facilitating the validation of transactions within it. The Node Software is designed and provided for this functional purpose, and should not be relied upon for any other use. The Nodes and Node Software ARE EXPERIMENTAL and still IN THE TESTING PHASE. While we have endeavoured to exercise reasonable skill and care in developing the Node Software and its components, it is provided strictly on an “AS IS” and “AS AVAILABLE” basis. Your decision to install the Node Software or operate a Node within the Fortytwo Network is entirely voluntary and undertaken at your sole discretion. Always do your own independent research.
### b. Disclaimer of Warranties
Except as expressly provided in these Terms, we make no express or implied warranties regarding the Nodes, Node Software, and their components, including any implied warranties of non-infringement, integration, merchantability, or warranties arising from any course of performance, all of which are expressly denied and disclaimed. Specifically, there is no warranty that:
1. the Nodes, Node Software and its components will function as expected, without interruption, or work at all;
2. the Node Software or its components will be secure at all times or be immune to any viruses, bugs, errors, malfunctions, hacker, malware or other attacks, or third-party hostile interferences;
3. any bugs, vulnerabilities, security flaws, or other technical issues in the Node Software or its components will be discovered, remedied, or resolved, whether promptly or at all;
4. your participation in the Node Operation or any accrued Rewards will meet your expectations, be beneficial or suitable to you;
5. the Node Software, its components, or any of their current or future updates, patches, or upgrades will be compatible with your Equipment used to operate the Node;
6. the continued availability, support, development, or maintenance of the Node Software or any of its components will be supported or provided beyond the scope outlined in these Terms.
## 10. Important Disclaimers
### a. No Benefits
Participating in the Node Operation does not guarantee any benefits, financial returns, gains, or positive outcomes. Any expectations of financial gain or other benefits are entirely your responsibility, and we are not liable for any losses or damages resulting from such expectations.
### b. No Advice
No part of these Terms or Materials is intended to be, or should be considered, or construed as a business, legal, financial, investment, trading, or any other sort of advice, or advice of a broker regarding any matters to which all or any part of such information relates. Before making any decision, you should consult your own legal, financial, tax, or other professional advisors regarding any such information.
### c. No Offer or Solicitation
No part of these Terms, Website, and Materials constitutes (i) a prospectus, (ii) offer document, or (iii) an offer, recommendation, or solicitation to buy, sell, or hold investment instruments, securities, or Virtual Assets in any jurisdiction.
### d. No Regulated Services
Nothing in these Terms or Materials shall be interpreted or considered as the provision of financial, legal, investment, tax, brokerage, financial advisory, fund management, or any related intermediation services. You are solely responsible for ensuring that your participation in the Node Operation and any related transactions comply with the applicable laws, regulatory and other requirements.
### e. No Fiduciary Relationship
To the fullest extent permitted by applicable law, we owe no fiduciary duties to you under these Terms. However, we must act in accordance with these Terms and the implied contractual covenant of good faith and fair dealing, as required by law.
### f. No Partnership or Agency
These Terms do not create any agency relations, partnership, joint venture, or co-operative entity. We and you have no authority to bind each other or make public statements on each other's behalf.
### g. Insufficient Public Interest
Public interest in the Fortytwo Network or Node Operation is not guaranteed, and low user engagement may negatively impact the Nodes and associated business activities.
### h. Unofficial or Fraudulent Projects
You may be targeted by fraudulent activities, including fake websites, emails, text messages, or social media accounts impersonating us or the Website. They may aim to deceive you, steal your Virtual Assets, or otherwise profit unlawfully. Exercise extreme caution when interacting with websites, emails, text messages, and social media accounts, directing you to sources other than the official Website, or those asking you to connect your Wallet. Always verify the authenticity of any communication claiming to represent us or the Website.
### i. Third-Party Services
When participating in the Node Operation, you may encounter certain Third-Party Services. We do not provide any warranties, express or implied, regarding them and do not endorse, recommend, or solicit their use or any interaction with them. Your use of Third-Party Services, as well as any interactions with third parties linked to or from the Website or Materials, are entirely at your own risk.
### j. Void Transactions
Any funds or Virtual Assets misappropriated or obtained through violations of these Terms or the intended functionality of the applicable software, including interference with smart contract operations or attacks, are strictly prohibited. Any related transactions will be deemed null and void from the outset (*ab initio*), and the involved Virtual Assets may be subject to forfeiture under applicable law.
## 11. Limitation of Liability
### a. Damages
We are liable only for damages that directly arise from breach of our obligations under these Terms or applicable law. To the fullest extent permitted by the applicable law, the Fortytwo Parties shall not be liable for any consequential, incidental, indirect, or punitive damages, including loss of profits, business opportunities, data, goodwill, diminution of value, or business interruptions, regardless of their legal basis.
### b. No Personal Liability
To the fullest extent permitted by law, in no event shall our or Affiliates' officers, directors, employees, consultants, and shareholders be held personally liable in connection with these Terms and any transaction contemplated hereunder, provided that the foregoing shall not limit our liability as an entity.
### c. Liability Cap
To the fullest extent permitted by law, the total liability of the Fortytwo Parties arising from these Terms, whether in contract, tort, breach of duty, or otherwise, including attorney's fees, will not exceed one hundred (100) U.S. dollars or equivalent.
### d. No Liability
To the fullest extent permitted by law, the Fortytwo Parties shall not be liable for any losses or damages, regardless of their legal basis (breach of warranty, contract, negligence, strict liability, or tort), even if advised of the possibility of such losses, including those arising from or caused by: (i) the Fortytwo Network, Virtual Assets and their underlying blockchain networks, as well as any failure thereof to perform as represented or expected; (ii) any acts, activities or omissions of other Node Operators; (iii) unauthorised use of your Wallets or any credentials thereto, or your failure to ensure security thereof; and (iv) the Force Majeure circumstances.
### e. Exclusions
Nothing in these Terms limits liability for gross negligence, fraud, death or personal injury resulting from negligence, or any other liability that cannot be legally limited.
## 12. Indemnification
To the fullest extent allowed by law, you agree to indemnify, defend, and hold harmless the Fortytwo Parties from any claims, demands, actions, damages, losses, costs, and expenses (including reasonable legal fees) arising from: (i) your violation of these Terms or applicable laws, including providing false representations or warranties; (ii) your participation in the Node Operation; (iii) your acquisition, use, or disposal of Virtual Assets; and (iv) your tax obligations arising from or in connection with any transactions contemplated by these Terms. We reserve the right to control the defence of any indemnified claim, at your cost. This indemnity is in addition to any other legal remedies available to us.
## 13. Term and Termination
### a. Termination by Us
We have the right to immediately terminate these Terms and your participation in the Node Operation, with or without prior notice, for any reason, including if:
1. you are not, or are no longer, eligible to participate in the Node Operation;
2. you are, or we suspect that you are, in breach of these Terms, including by providing false or misleading warranties or representations;
3. you are, or we suspect that you are, in breach of any applicable laws, regulations, or orders;
4. either you or we are subject to a governmental proceeding, criminal investigation, or other pending litigation, and/or we perceive a heightened risk of legal or regulatory non-compliance related to your participation in the Node Operation;
5. you have, or we suspect that you have, while participating in the Node Operation, violated any of our or third-party right;
6. we are required to do so by a court order or command by a regulatory or government authority, or in accordance with our internal policies and procedures;
7. we detect any suspicious activity related to you or the Node operated by you;
8. we identify abnormal activities related to the Node operated by you; or
9. we detect or reasonably suspect any unauthorised access or suspicious activity related to the Node operated by you.
The final decision on whether to terminate or suspend your participation in the Node Operation shall be taken by us at our sole and absolute discretion. You acknowledge and agree that the above termination and suspension circumstances are not exhaustive, and our decision to limit, terminate, suspend, or restrict your participation in the Node Operation may be based on confidential criteria essential to our risk management and security policies. You further agree that we have no obligation to disclose the details of these policies to you.
### b. Termination by You
You may terminate these Terms and your participation in the Node Operation at any time by deleting and ceasing to use the Node Software installed on your Equipment.
## 14. Communication
### a. Communication Terms
The information concerning these Terms and Node Operation is made available online at [https://www.fortytwo.network](https://www.fortytwo.network). All such information will be deemed valid, in writing, and legally binding, and will be considered effective on the day after it is published. You can contact us at [legal@fortytwo.network](mailto:legal@fortytwo.network). We may ask for additional information to verify your identity.
### b. Communication Disclaimers
You shall always carefully assess and verify any information you access or receive via the Communication Channels. You must cross-verify any hyperlinks and Wallet addresses provided through the Communication Channels for authenticity, correctness, and accuracy by cross-referencing them with our other Communication Channels or through our officially designated moderators before relying on or using such information or details. Be extra cautious regarding any hyperlinks, Wallet addresses, or instructions, which are shared only through one Communication Channel. There is always a risk that one or more of our Communication Channels may be compromised, which is a common occurrence in the blockchain space, resulting in unauthorised third parties gaining control over them and posting or sending misleading information in an attempt to steal or gain control over your assets. Accordingly, you hereby assume such risks and the responsibility to reasonably verify and assess any and all information you receive or access through our Communication Channels, at the very least by means mentioned herein. No Fortytwo Party shall be held liable or responsible for, or in connection with, your reliance upon or use of unauthentic or misleading information or communications shared through the Communication Channels as a result of our loss of control or their compromise. We hereby disclaim any duty of care with respect thereto and shall not be held liable or responsible for any damages or losses sustained by you in connection with, or resulting from, the compromise of our Communication Channels.
## 15. Applicable Law and Dispute Resolution
### a. Applicable Law
These Terms, as well as any relationships relating to the Node Operation, are governed by the laws of England and Wales, excluding any conflict of law rules.
### b. Negotiations
You must first contact us to try to resolve any dispute related to these Terms or any matters contemplated herein informally by sending a notice via email at [legal@fortytwo.network](mailto:legal@fortytwo.network). If no agreement is reached within thirty (30) days, the dispute may be submitted to arbitration as outlined below.
### c. Arbitration
All disputes arising from or related to these Terms and any matters contemplated herein will be resolved through binding arbitration under the London Court of International Arbitration Rules, which are incorporated by reference herein. The arbitration will take place in London, UK, with a single arbitrator, and the proceedings will be conducted in English. All notices, requests, demands, and communications related to the arbitration must be sent electronically, either via email or through an electronic filing system operated by the London Court of International Arbitration. Electronic communications will be considered received on the day they are transmitted, based on the recipient's time zone.
### d. Opt-Out
Notwithstanding anything to the contrary contained in these Terms, you have the right to opt out of the binding arbitration for disputes arising from or related to these Terms and any matters contemplated herein. To do so, you must send a written notice via email to [legal@fortytwo.network](mailto:legal@fortytwo.network) within thirty (30) days of accepting these Terms. Your notice must include your name, residence address, email address, and an explicit, unequivocal statement that you are opting out of the settlement and resolution of disputes through binding arbitration. If you exercise your opt-out right within the specified timeframe, all other provisions of these Terms will remain in full force and continue to apply to you. Exercising this right does not affect any future arbitration agreements that you, and we may enter into separately.
### e. Court Proceedings
You and we hereby waive your and our respective rights to have any dispute arising from or related to these Terms and any matters contemplated herein resolved in a court, and to a jury trial. If, and only if, you opt out of the settlement and resolution of disputes in the binding arbitration as prescribed in these Terms, or a dispute cannot be resolved by the arbitration indicated in these Terms, whether under the law or arbitration rules, such dispute shall be finally settled by the courts of the Seychelles, having jurisdiction.
### f. Confidentiality
To the fullest extent permitted under applicable law, each party involved must maintain the confidentiality of any arbitration, litigation and negotiation proceedings, judgments and awards, including, but not limited to, all information gathered, prepared, and presented for purposes of the arbitration or related to the disputes.
### g. No Class Actions
To the extent permissible by applicable law, any dispute arising out of or related to these Terms is personal to you and us, and will be resolved solely through individual arbitration, not as part of a class, collective, representative, or private attorney general action or proceeding. You further agree to waive any right for such disputes to be brought, heard, or arbitrated as a class, collective, representative, or private attorney general action or proceeding, to the extent permissible by applicable law. Combining or consolidating individual arbitrations into a single arbitration is not permitted without our prior consent.
### h. Statutes of Limitation
To the extent permitted by law, any claim related to these Terms and any matters contemplated herein must be filed within one year of the event giving rise to the claim. Claims not filed within this period will be permanently barred, meaning neither you nor we can pursue such claims.
## 16. Miscellaneous
### a. Entire Agreement
These Terms and any incorporated documents constitute the entire agreement between you and us, superseding all prior and contemporaneous understandings, writings, or promises related to the subject matter of these Terms. You acknowledge and confirm that you will not rely on and have no remedies in respect of any warranty, statement, promise, assurance, or statement (whether made innocently or negligently) that is not set out in these Terms.
### b. Third-Party Beneficiaries
These Terms will benefit the Fortytwo Parties, and any of them may rely on and enforce the provisions as if they were a party to these Terms. However, no consent, approval, or notice from the Fortytwo Parties is required to modify, assign, novate, or otherwise change these Terms.
### c. No Waiver
Our failure or delay in exercising any right or remedy under these Terms or applicable law does not constitute a waiver of that or any other right or remedy. It also does not preclude or limit the further exercise of that or any other right or remedy. Similarly, any single or partial exercise of a right or remedy does not preclude or limit its further exercise or the exercise of any other right or remedy.
### d. Language
Currently, only the English version of these Terms, Materials and any communications is considered official. The English version shall prevail in case of differences in translation of any Materials, communications, or other content.
### e. Assignability
You may not assign or transfer any rights or obligations under these Terms without our prior written consent. We may transfer or assign these Terms, as well as our rights and obligations hereunder, at any time without your consent.
### f. Validity and Enforceability
The invalidity or unenforceability of any provision or part-provision of these Terms shall not affect the validity or enforceability of any other provisions of these Terms, all of which shall remain in full force and effect.
### g. Survival
Provisions hereof construed to survive the termination of these Terms shall survive any expiration or termination of these Terms.
## 17. Interpretation
### a. Definitions
In these Terms, unless the context requires otherwise, the terms shall have the following meaning:
* **“Affiliate”** means a person controlling, controlled by, or under the same control as us.
* **“Application”** means an application for the participation in the Node Operation.
* **“Communications”** means any communications, agreements, documents, receipts, notices, and disclosures related to these Terms.
* **“Communication Channels”** means the Website and other social media accounts and communication channels belonging to us or Affiliates, as may be linked to on the Website from time to time.
* **“Devnet Program”** means the program, aimed at the development of preliminary phase of the Fortytwo Network, designed to establish a decentralised, globally distributed intelligence system composed of Nodes that run small language models on users' devices.
* **“Equipment”** means specific hardware, devices, and tools used by the Node Operator to maintain and operate the Nodes.
* **“Equipment Requirements”** means certain eligibility requirements for the Equipment used to operate the Node, as may be established by us from time to time.
* **“Feedback”** means any comments, suggestions, recommendations, or other feedback, provided by you in relation to the Node Operation.
* **“FOSS Licence”** means a free and open-source software licence that allows for editing, modifying, or reusing software's source code.
* **“Force Majeure”** means any circumstances that are out of our control interfering to performance hereof, which include, without limitation, acts of God, natural disasters, wars, riots, terrorism, government actions, epidemics, software problems, blockchain issues and technical failures, such as blockchain vulnerabilities, software bugs, 51% attacks, loss or theft of Virtual Assets as a result of an attack, including hacker, malware, or other attack, power outages, equipment or software malfunctions, misconduct or inactions of Third-Party Service providers or other third parties, etc.
* **“Fortytwo Brand Assets”** means our and/or Affiliates' trademarks, trade names, business names, and logotypes, whether registered or unregistered.
* **“Fortytwo Network”** means (i) the Fortytwo development network, which is a peer-to-peer network operating on the Monad testnet Layer 1 EVM-compatible blockchain, and (ii) the Fortytwo main network, a network that may be deployed subsequently after the completion of the testnet phase.
* **“Fortytwo Parties”** means us, Affiliates, and shareholders, directors, officers, employees, agents, advisors, contractors, successors, and assignees of both us and Affiliates.
* **“Licence”** means a limited, temporary, non-transferable, non-exclusive, revocable, non-sublicensable licence (right) to install, manage, operate, and maintain the Node Software for its intended purposes on the terms herein set forth and for the duration of these Terms.
* **“Materials”** means any information, statements, announcements, data, content, and other materials provided via the Communication Channels, or otherwise communicated by us or on our behalf in relation to the Website, Fortytwo Network, Nodes and/or Node Operation.
* **“Node”** means a computing device that facilitates the processing, exchange, storage, transmission, and validation of transactional and block data within the Fortytwo Network.
* **“Node Software”** means a software or computer program that allows a Node to run AI model inferences, broadcast messages to or participate in the consensus mechanisms of the Fortytwo Network.
* **“Node Operation”** means the management, operation, and maintenance of a Node.
* **“Node Operator”** means a person engaged in the Node Operation.
* **“Participation Requirements”** means certain requirements and/or criteria applicable to the Node Operators, which may be established by us from time to time.
* **“Prohibited Jurisdiction”** means any of the following jurisdictions: Democratic People's Republic of North Korea, Islamic Republic of Iran, Republic of Cuba, Syrian Arab Republic, Myanmar, Sevastopol and the Crimea Regions of Ukraine, Donetsk People's Republic and Luhansk People's Republic regions of Ukraine, Bolivarian Republic of Venezuela, the Russian Federation, Republic of Belarus, and any other jurisdiction or territory, where participating in the Node Operation is prohibited by the law, or which is subject to a country-wide or territory-wide sanction imposed by any country, government, or international authority.
* **“Prohibited Person”** means any citizen or resident of, or a person subject to any Prohibited Jurisdiction, or any sanctions administered or enforced by any country, government or international authority.
* **“Rewards”** means certain badges, points, or similar non-transferable units of account that can from time to time accrue in connection with the Node Operation.
* **“Risk Disclosure Statement”** means the disclosure of risks attached to these Terms as '[Exhibit 1](/docs/legal-node-operation-tc#exhibit-1-risk-disclosure-statement)'.
* **“Terms”** means these Fortytwo Node Operation Terms & Conditions, together with any documents incorporated herein by reference, as may be amended from time to time.
* **“Third-Party Services”** means any products, services, products, software, items, or solutions provided by any person, other than we, including, but not limited to, Virtual Assets, Wallets, software or hardware wallets, blockchain networks, etc.
* **“Third-Party Costs”** means any costs, fees, or expenses that are charged by third parties or third-party technologies, including, for example, blockchain gas costs, commissions and fees charged by the Third-Party Services, etc.
* **“Virtual Assets”** means cryptocurrencies and other digital tokens implemented on a public blockchain network, such as, for example, USD Tether (USDT), USD Coin (USDC), and so forth.
* **“Wallet”** means a pair of public and private cryptographic keys which can be used to track ownership of, receive, manage, and spend Virtual Assets on a blockchain network.
* **“you”,** **“your”** means a person, who apply for the Node Operation or is engaged as a Node Operator, and accepts these Terms; if you are acting on behalf of an entity, “your” and “you” shall refer to both you as an individual and the entity on whose behalf you are acting.
* **“Website”** means the website available at [https://fortytwo.network](https://fortytwo.network), including any of its subdomains.
* **“we”, “our”, “us”** means Fortytwo Ltd, a company established under the laws of the Seychelles, which operates the Website and coordinates Node Operation.
### b. Rules of Interpretation
Unless the context requires otherwise, references to one gender include all genders; singular includes plural and vice versa; terms like “including”, “in particular”, or “for example” are illustrative and shall not limit the sense of the following words; Section headings do not affect interpretation hereof; references to these Terms or any other document shall include any amendments, modifications, supplements, extensions, or restatements thereof, as applicable; ambiguities or uncertainties in the language of these Terms shall not be interpreted in favour of or against any party, regardless of whether the party participated in drafting these Terms; and these Terms will not be construed to our disadvantage for preparing them.
***
# Exhibit 1. Risk Disclosure Statement
## 1. General Blockchain Risks
### a. Irreversibility
Please note that transactions on a public blockchain are irreversible. No one can control or influence transactions with Virtual Assets on public blockchain networks, and, therefore, they may not be cancelled, reversed, blocked, or frozen. There is no warranty that transactions will be executed with the gas fees you expect, or that they will be executed at all.
### b. Autonomy of Infrastructure
Fortytwo Network and associated blockchain-based software or infrastructure operate autonomously and are typically beyond anyone's control. Any malfunction, breakdown, or abandonment of the underlying blockchain could significantly impact the Nodes or any associated transactions.
### c. Risk Associated with Hard Fork
A hard fork in the Fortytwo Network, underlying blockchain networks of Virtual Assets, or any of their components, could require major changes. These changes might make smart-contracts incompatible, dysfunctional, impractical, or more expensive to use. This could disrupt the execution and interaction of smart-contracts critical to the Nodes. Adapting to a hard fork or changes in consensus rules may require significant time and resources, which might not be available or cost-effective. Consequently, the continued operation of Nodes cannot be guaranteed.
### d. Risk Associated with Cryptography Development
Advances in cryptography and technology, particularly quantum computing, could threaten blockchain systems by weakening or breaking the cryptographic consensus mechanisms that underpin them. As quantum computing evolves, algorithms once considered secure may become obsolete, leaving systems that rely on traditional cryptographic methods vulnerable. This could allow intruders to bypass existing security measures, compromise data integrity, as well as disrupt consensus mechanisms on blockchain networks.
## 2. Financial and Market Risks
### a. Virtual Assets' Value Risks
There are no representations or warranties, express or implied, regarding the Virtual Assets, including implied warranties of merchantability, fitness for a particular purpose, or non-infringement, all of which are expressly disclaimed. You acknowledge and agree that Virtual Assets may not: (i) meet your expectations or function as intended, (ii) possess the intended functionality, (iii) have a market, or (iv) have any specific price or hold any particular value, or have any value at all. Receiving, storing, using, or disposing of Virtual Assets is entirely at your own risk.
### b. Volatility Risks
Purchasing, using, or holding Virtual Assets involves significant risks. The crypto market is highly volatile, and prices can change drastically in short periods, potentially leading to substantial or total loss of your funds. Due to the nature and operation of blockchain protocols, the total amount of Virtual Assets in circulation could increase through, inter alia, the adoption of a new patch, upgrade of the source code, or additional mint. You bear a sole responsibility for any damages or losses that you may incur as a result of or in connection with the change in the composition, supply, value or price of any Virtual Assets. Only allocate funds to Virtual Assets that you can afford to lose.
### c. Liquidity and Market Risks
There is no assurance that an active market will exist now or in the future for buying or selling Virtual Assets. Their price and liquidity cannot be assured, and it is possible that there may be no market or liquidity for Virtual Assets at all. In some cases, they may become useless or abandoned entirely.
## 3. Technological Risks
### a. Functionality and Flawed Logic of Software
The Node Software, Nodes and associated technical infrastructure are provided “as is” and may experience system failures, downtimes, unplanned interruptions in their underlying network or functionality, hardware or software defects, security breaches, or other causes that could adversely affect the Nodes or Fortytwo Network. We are not obligated to address these issues and do not warrant that any updates will resolve existing bugs or vulnerabilities, or avoid creating new, unanticipated issues.
### b. Software Weaknesses, Bugs and Vulnerabilities
The Node Software and associated blockchain-based software or infrastructure may contain weaknesses, flaws, bugs, vulnerabilities, defects, or impairments. This can cause them to operate incorrectly or not as expected, potentially resulting in transactions being executed contrary to their intended logic or your intents. Such issues can lead to the partial or complete loss of Virtual Assets involved in a transaction or other adverse outcomes.
### c. Lack of Remediation
The Node Software and associated blockchain-based software or infrastructure may have errors or vulnerabilities that are not immediately apparent. Fixing these issues can be difficult and may not always work. Many smart contracts are also immutable, meaning they cannot be changed once deployed. Attempts to fix flaws or vulnerabilities in blockchain software can be complex, risky, expensive, and time-consuming.
### d. Delayed Updates
There is no warranty that the Node Software or other technical infrastructure the Nodes rely on will be updated quickly enough to address new threats, vulnerabilities, or required changes, or can be updated at all. Delays in updates can leave you exposed to risks such as errors, failed transactions, inability to execute time-sensitive operations, or the loss of Virtual Assets.
### e. Downtime and Maintenance
The Node, Node Software and their components may occasionally become inaccessible or inoperable for various reasons, including maintenance, updates, technical disruptions, or third-party interference. Such occurrences may lead to downtime, and there is no assurance of continuous uptime with regard to the Node Software or its components.
## 4. Security Risks
### a. Risk of Theft
The blockchain networks can be attacked which may result in downtime, consensus split, long reorganisation of the chain, 51% attack or other adverse outcomes. There is no warranty that there will be no theft or loss of Virtual Assets due to attacks, hacks, software flaws, or blockchain vulnerabilities, which could result in partial or complete loss of the Virtual Assets. Even when using our official resources, remain vigilant for pop-ups or unusual program behaviour, as these could result from hacks or malicious code.
### b. Exploitation of Vulnerabilities
Bugs, flaws in logic, and other vulnerabilities are not part of the intended operation of the Fortytwo Network, Node Software and Nodes. However, intruders may exploit these weaknesses or flaws, potentially causing financial losses, data breaches, or system malfunctions. The exploitation of bugs, flaws, or vulnerabilities in the Node Software, smart contracts or associated software is strictly prohibited, regardless of the purpose or circumstances. Such acts, especially those that harm others, may be considered criminal or other offences under applicable laws and could result in severe consequences for those involved.
### c. Risk Associated with Credentials
If a third party gains access to your Wallet or associated credentials, they may control and manage Nodes you operate, as well as Virtual Assets held in such Wallet. To reduce this risk, secure your electronic devices or systems (both hardware and software) used in relation to the Wallet, as well as associated credentials against unauthorised access. We encourage you to properly back up all credentials associated with your Wallets used in connection with the Nodes.
## 5. Regulatory and Compliance Risks
### a. Legal Uncertainty
The Node Operation may be subject to various laws and regulations. In extreme cases, some jurisdictions may ban or heavily restrict the Node Operation. The legal status of Nodes, Virtual Assets and related transactions is uncertain, and some regions may prohibit transacting with them entirely, which could affect you. The penalties for violating such laws, if any, are unclear. You are responsible for researching and understanding the legal, regulatory and tax implications of operating the Node or interacting with Virtual Assets in your jurisdiction.
### b. Taxation
Any acquisition, use, holding, or disposal of Virtual Assets, as well as related transactions, may have tax implications as imposed by state or government authorities. Tax laws for Virtual Assets may be unclear or not well-defined in your region. Additionally, these laws and their interpretations can change and may even be applied retroactively. You are solely responsible for understanding and meeting your tax obligations. Failure to properly report, collect, or pay taxes could result in penalties, fines, or other legal consequences.
## 6. Unanticipated Risks
In addition to the risks set forth herein, there are unanticipated risks. Further risks may materialise as unanticipated combinations or variations of the discussed risks or the emergence of new risks.
# Privacy Notice
Source: https://docs.fortytwo.network/docs/legal-privacy-notice
**Last Updated:** April 11, 2025\
**Version:** 1.0
## 1. This Privacy Notice
Please carefully read this Privacy Notice, as it provides you with information about your personal data being processed in connection with your access to and use of the Website, applying for a Fortytwo vacancy, as well as the participation in the Node Operation. This Privacy Notice explains which types of personal data we hold on you, how we collect and process such data, how long we keep it, and so on.
## 2. Interpretation
Unless otherwise provided in this Privacy Notice, capitalised terms used in this Privacy Notice have the meaning determined in the [Legal Notice](/docs/legal-legal-notice) and, where applicable, [Fortytwo Node Operation T\&C](/docs/legal-node-operation-tc) (the “**User Documentation**”). You should read the User Documentation applicable to you carefully, as it affects your obligations and legal rights. In this Privacy Notice, “personal data” and “personal information” are synonyms. They refer to any information that can identify you, either directly or indirectly, or that can reasonably be used to do so.
## 3. Contact Details
We, Fortytwo Ltd, a company established under the laws of the Seychelles, are the data controller for the data collected under this Privacy Notice, meaning we determine how and why your data is processed. If you have any questions about this Privacy Notice or your data processing, please contact us at [legal@fortytwo.network](mailto:legal@fortytwo.network).
## 4. Type of Data
The categories of personal data collected depend on how you interact with us, use the Website, and the requirements of applicable laws. We collect and process the following types of personal data:
### a. Application Data
This may include your name, email address, social media and instant messaging accounts handles, CV or cover letter, Wallet Data, device details (including CPU, GPU, RAM and VRAM), operating system, and any other information you choose to provide us with.
### b. Wallet Data
This includes Wallet addresses and associated transaction data, which may include information about transaction ID, status, time and date, etc. While a Wallet address alone does not identify a specific individual, when combined with other data (such as a name, nickname or email address), it may enable identification. As a result, such combined data could be considered personal information.
### c. Referral Data
This includes your invitation code. When you participate in our referral program, we may assign you a unique invitation code, made up of random letters and numbers, to identify you as either a user sharing the invitation code with others to participate in the Node Operation, or a user who was invited to participate.
### d. Marketing Data
This includes your email address.
### e. Analytical Data
This may include Internet protocol (IP) address, browser details, such as type and version, device information, such as type and operating system, and other usage data regarding the Website. Analytical Data is collected via [Google Analytics ](https://marketingplatform.google.com/about/analytics/), operated by Google Ireland Limited and its affiliates, including Google LLC (“**Google**”). Google gathers information by means of cookies, which are, in effect, small data files placed on your device to recognise it during Website interactions or visits. Google generates aggregated reports about the Website usage, without linking data to specific individuals, ensuring we cannot identify you or your actions from the other visitors and their actions. Google acts as our data processor, however, if it uses the data for its own purposes, Google acts as an independent data controller, and we are not responsible for that processing. For more details, refer to [Google's privacy policy ](https://policies.google.com/privacy).
### f. Contact Data
This may include your name, contact details, social media and instant messaging account handles, and other data, depending on what information you provide to us. Please do not provide personal data unless it is reasonably necessary or requested by us. Note that we may also collect certain other information, which may be required under the applicable laws.
## 5. Data Use
The personal data is processed as follows:
### a. Application Data
To enable you to apply for (i) operating the Node; or (ii) a vacancy posted by us. The lawful basis for such data processing is to **take steps at your request prior to entering into a contract**, and, further, to **perform a contract** with you.
### b. Wallet Data
We use the Wallet Data (i) to ensure the Node Operation; (ii) for financial, accounting, and tax purposes; and (iii) to prevent and detect fraud or abuse, as well as safeguard the security of the Nodes' network. The lawful basis for such data processing is (i) the **performance of a contract** with you; (ii) if you act on behalf of an entity, our **legitimate interest** to ensure the participation in the Node Operation by the entity you represent; (ii) our **legal obligation** to comply with the applicable laws with respect to the financial, accounting, and tax purposes; and (iii) our **legitimate interest** in ensuring the security of the Node Operation and all stakeholders.
### c. Referral Data
To enable your participation in our referral program, track invited users, and accrue due Rewards to you, if any. The lawful basis for such data processing is the **performance of a contract** with you. If you are an invited user, the lawful basis for your data processing is our **legitimate interest** to ensure a proper participation in our referral program by the user, who invited you.
### d. Marketing Data
To provide you with marketing and newsletter emails concerning the latest developments, news, and insights related to the Website, our products and services, including the program for Node Operators. The lawful basis for such data processing is your **consent** provided by subscribing to receiving our newsletter.
### e. Analytical Data
To analyse the use of the Website and provide a better user experience by improving its functionality, usability, user flow and interface. The lawful basis for such data processing is your **consent**. When you visit the Website, you are able to opt out from using Google Analytics. You also may object to the collection of personal data by Google Analytics by downloading and installing a [browser add-on from Google ](https://tools.google.com/dlpage/gaoptout).
### f. Contact Data
To respond to your inquiry. The lawful basis for such data processing is our **legitimate interest** to respond to your inquiry.
## 6. Processing Period
As a general rule, your personal data is kept as long as it is necessary for the purposes it was collected. It may be retained longer if required to meet our legal obligations, in relation to legal proceedings, or to protect our rights and legitimate interests or those of third parties. The storage periods are as follows:
### a. Application Data
The Application Data are stored as follows:
1. With respect to the Application Data related to your application for participating in the Node Operation: if your application is approved, as long as our relationship with you continues and for one (1) year thereafter. If your application is rejected, for one (1) year thereafter. We set this retention period due to the statutes of limitations established in the User Documentation.
2. With respect to the Application Data related to your application for a vacancy posted by us: if your application is approved, as long as our relationship with you continues and for five (5) years thereafter due to our legal obligation to retain business records, as well as our legitimate interest to protect our or third-party rights in case of any violation of confidentiality or other obligations imposed on you in connection with the engagement, that continue even after the relationship ends.
### b. Wallet Data
We do not set a retention period for Wallet Data that is not personal, and we are not able to identify any particular individual with such Wallet Data. If Wallet Data becomes identifiable, it will be retained for seven (7) years after the completion of the transaction to which such data relates. We set this retention period due to the law of our jurisdiction. Note that due to the nature of a blockchain, the Wallet Data may be stored permanently on the applicable blockchain, not by us, and may be accessed and viewed by any person at any time. For more details, refer to the '[Your Information and Blockchain](/docs/legal-privacy-notice#8-your-information-and-blockchain)' section of this Privacy Notice below.
### c. Referral Data
As long as you participate in our referral program and for one (1) year thereafter. We set this retention period due to the statutes of limitations established in the User Documentation.
### d. Marketing Data
As long as you remain a subscriber. You can unsubscribe from marketing emails at any time by (i) contacting us, or (ii) clicking the unsubscribe button at the bottom of each marketing email. Then your email address will be removed from our marketing database. Please note that administrative or service-related communications (like email verifications or maintenance notifications) are not considered marketing and may not include an unsubscribe option.
### e. Analytical Data
There is no storage period as the Analytical Data is anonymous, aggregated, and does not allow for identifying any particular person against the Website visitors. If and to the extent we become able to identify any specific individual, we will update this Privacy Notice and set a specific processing period for the Analytical Data.
### f. Contact Data
For one (1) year from the last date when you contacted us regarding the same matter. We set this retention period due to the statutes of limitations established in the User Documentation.
## 7. Data Sharing
### a. General
We do not sell or rent out your data. We may share it in line with this Privacy Notice, applicable laws, the Legal Notice, or with your consent. Appropriate measures will be taken to protect your data during such transfers.
### b. Recipients
Given the purposes outlined above, your personal information is shared with the following categories of recipients: (i) Affiliates; (ii) marketing, support, and technical teams; (iii) email delivery service providers; (iv) analytical solution providers, such as [Google Analytics ](https://marketingplatform.google.com/about/analytics/); (v) hosting service providers; (vi) government authorities, upon their request or if necessary to comply with our legal obligations; (vii) another entity if we sell or otherwise transfer the Website or its parts; and (viii) other third-party solutions, which may be from time to time integrated in relation to the Website, such as [Tally ](https://tally.so/?utm_source=tally\&utm_medium=website\&utm_campaign=powered-by_web\&version=6) and [Ashby ](https://www.ashbyhq.com/) when you fill in a form to reach us via the application functionality that may be available on the Website.
## 8. Your Information and Blockchain
Please kindly note that the Wallet Data interacts with a decentralised blockchain network: essentially, you enter this data to the blockchain using your Wallet each time you make a blockchain transaction or interact with blockchain smart-contracts. We do not control nor operate blockchain networks. This means that due to the structure of the blockchain network, certain rights or abilities may be limited. It also means that your Wallet Data is publicly available to any person who has access to the blockchain. Please be aware that any transaction within the blockchain network is irreversible and information put into the blockchain cannot be deleted or changed. The ultimate decision whether to transact on a blockchain or carry out any transactions rests with you.
## 9. Automated Decision-Making
Automated decision-making is the process of making a decision by automated means without any human influence on the outcomes. We do not make any automated decisions based on your personal data. If we intend to process your personal data by any automated means, we will do our best to inform you about the same prior to such processing.
## 10. Data Subject Rights
### a. Verification
In case you wish to exercise your data subject rights, we may request certain information from you to verify your identity and confirm that you are entitled to exercise such rights.
### b. Blockchain Data Processing
Please note that when interacting with blockchain networks, you may not be able to fully exercise certain rights under applicable data protection laws regarding your Wallet Data. For example, we may be unable to delete, correct, or restrict your Wallet Data. For more details, refer to '[Your Information and Blockchain](/docs/legal-privacy-notice#8-your-information-and-blockchain)' section of this Privacy Notice.
### c. Data Subject Rights.
According to the applicable legislation, you may have the following rights:
1. **Right to Access**
You can request to see if we process your personal data. If we do, you can ask for details about the processing and a copy of the data to verify its accuracy and legality.
2. **Right to Correction**
You can request to correct or complete any incomplete or inaccurate data. We may need to verify the accuracy of the new information you provide.
3. **Right to Deletion**
You can request the deletion of your personal data if we no longer need it, you have successfully objected to processing, we processed it unlawfully, or we must erase it to comply with the law. We may not always be able to fulfil your request due to legal or technical reasons, which will be explained in our response.
4. **Right to Objection**
You can object to the processing of your data if it does not comply with applicable laws. We may, however, show that we have compelling legitimate grounds for processing that override your rights.
5. **Right to Restrict Processing**
You can ask us to suspend processing your data if: (i) you need to verify its accuracy, (ii) it is used unlawfully, but you do not want it deleted, (iii) you need it to establish, exercise, or defend legal claims, or (iv) you have objected to its use, and we need to verify if we have overriding grounds.
6. **Right to Data Portability**
You can request your personal data be transferred to you or a third party in a structured, commonly used, machine-readable format. This right applies only to automated data processed based on your consent or performance of contract.
7. **Right to Withdraw Consent**
You can withdraw your consent at any time if we are processing your data based on your consent.
8. **Right to Human Review**
You can request a human review of decisions made solely based on automated processing, including profiling, if such decisions impact your rights.
9. **Right to File a Complaint**
You can file a complaint with a supervisory authority if we violate your rights or legal obligations. The competent authority may depend on your location.
## 11. Third-Party Links
The Website may include links and social media plugins to third-party websites and applications. Clicking on them may allow third parties to collect or share your data. We do not control or endorse these third parties and are not responsible for their privacy practices. You should review the privacy policies of any external websites or apps you visit.
## 12. Personal Data of Children
The Website is not intended for children under 18 years (or older if local laws set a higher age). We do not knowingly collect or use personal data from children. If we learn that a child has provided us with personal information, it will be promptly deleted. Parents or guardians who believe their child's data has been collected should contact us.
## 13. Modifications and Updates
This Privacy Notice is under regular review, and may be updated at any time. If any changes to this document are made, we will change the “Last Updated” date and version number at the top of this Privacy Notice. Please review this Privacy Notice to check for the updates.
# MCP Integration
Source: https://docs.fortytwo.network/docs/mcp-integration
This guide explains the user journey from the first request to stable usage within a paid MCP session.
MCP
Fortytwo Prime
Installing to Client
JSON-RPC
x402Escrow Payments
Prerequisites:
**MCP endpoint:** `POST https://mcp.fortytwo.network/mcp`.
**Web3 wallet** with at least **2 USDC** on Base or Monad to sign **HTTP 402** payment requests.
A client that sends **JSON-RPC requests** (`initialize`, `tools/list`, `tools/call`)
## User Journey: MCP + x402Escrow Payments
### Step 1. Initialize the MCP Connection and Inspect Available Tools
These calls are free and do not require payment.
```bash theme={null}
# Initialize:
curl -i -X POST "https://mcp.fortytwo.network/mcp" \
-H "content-type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":"init-1",
"method":"initialize",
"params":{
"protocolVersion":"2026-03-03",
"capabilities":{},
"clientInfo":{"name":"example-client","version":"1.0.0"}
}
}'
```
```bash theme={null}
# List available tools:
curl -i -X POST "https://mcp.fortytwo.network/mcp" \
-H "content-type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":"tools-1",
"method":"tools/list"
}'
```
The tool exposed by the server is `ask_fortytwo_prime`.
In conversation with an AI agent, phrases like **"Ask Fortytwo"** and **"Ask Fortytwo Prime"** refer to calling this tool.
### Step 2. Send a `tools/call` Request
```bash theme={null}
curl -i -X POST "https://mcp.fortytwo.network/mcp" \
-H "content-type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":"call-1",
"method":"tools/call",
"params":{
"name":"ask_fortytwo_prime",
"arguments":{"query":"Explain quantum entanglement in simple words"}
}
}'
```
#### Server Response
If no active session exists, the server responds with `HTTP 402` and a `payment-required` header.
### Step 3. Build Payment from `payment-required`
The `payment-required` header contains `base64(JSON)` with payment options.
```json JSON theme={null}
// Decoded `payment-required` example:
{
"x402Version": 2,
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "1000000",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"payTo": "0x9562f50f73d8eE22276F13A18D051456d8D137a0",
"maxTimeoutSeconds": 90
}
]
}
```
Several `accepts[]` options can be listed, each with unique network details (eip155:8453 for Base, eip155:143 for Monad).
Choose one of the `accepts[]` options, sign the payment with your wallet, and construct a `payment-signature` (base64-encoded JSON) containing:
* `network` — Selected network
* `client` — Payee address
* `maxAmount` — Max amount
* `validBefore` — Signature validity window
* Cryptographic signature
```json JSON theme={null}
// Decoded `payment-signature` example:
{
"x402Version": 2,
"scheme": "exact",
"network": "eip155:8453",
"payload": {
"client": "0x1111111111111111111111111111111111111111",
"maxAmount": "1000000",
"validAfter": "0",
"validBefore": "1760000000",
"nonce": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"v": 27,
"r": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"s": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
}
}
```
### Step 4. Repeat the `tools/call` and Now Include `payment-signature`
```bash theme={null}
curl -i -X POST "https://mcp.fortytwo.network/mcp" \
-H "content-type: application/json" \
-H "payment-signature: " \
-d '{
"jsonrpc":"2.0",
"id":"call-1",
"method":"tools/call",
"params":{
"name":"ask_fortytwo_prime",
"arguments":{"query":"Explain quantum entanglement in simple words"}
}
}'
```
#### Server Response
On success, the server verifies the signature, settles payment on-chain, and opens a billing session.
The response includes:
* `x-session-id` header — save this for subsequent calls
* `payment-response` header — payment confirmation with `txHash`
* JSON-RPC `result` with tool output
### Step 5. Use `x-session-id` for Subsequent Calls
```bash theme={null}
curl -i -X POST "https://mcp.fortytwo.network/mcp" \
-H "content-type: application/json" \
-H "x-session-id: " \
-H "x-idempotency-key: " \
-d '{
"jsonrpc":"2.0",
"id":"call-2",
"method":"tools/call",
"params":{
"name":"ask_fortytwo_prime",
"arguments":{"query":"Summarize this idea in 5 bullet points"}
}
}'
```
| Header | Purpose |
| ------------------- | ----------------------------------------- |
| `x-session-id` | Ties calls to one paid session |
| `x-idempotency-key` | Prevents duplicate payments on retries |
| `jsonrpc.id` | Identifies a single request/response pair |
### Step 6. Session Expiry and Re-payment
When session ends, the server responds with:
| Response | Meaning |
| ---------------------- | ---------------------------------------------------------------------------------------------------- |
| `402 Payment Required` | Submit a new payment signature and open a new session |
| `410 Gone` | Session expired — start a new payment cycle.
Unused credits from previous session get refunded. |
## Integration Checklist
Treat `HTTP 402 Payment Required` as the first-payment step.
Save `x-session-id` after successful payment.
Send `x-idempotency-key` on every `tools/call`.
On `HTTP 410` or repeated `HTTP 402`, start a new payment cycle.
## How Sessions Work: Lifetime and Closure
After the first successful payment, a billing session is created and identified: `x-session-id`.
Each `tools/call` reserves budget first that gets locked in a [x402Escrow ](https://www.platform.fortytwo.network/x402escrow) contract. With each request, the contract charges the actual cost of inference, and releases unused reserve back to the available session balance.
**Session closure conditions:**
* If there is no activity for **10 minutes**.
* Session hits a **hard cap of 60 minutes** from session opening.
* Session **budget is exhausted**.
* Connection is dropped mid-response.
* An upstream error occurs on a newly opened session.
If a session is close to expiry, new calls may be rejected to avoid starting operations that cannot be completed.
Automatic closure may occur with a small delay, typically up to tens of seconds.
## Fund Release
After session closure, the release process starts automatically:
1. The service finalizes the actual amount spent.
2. A release transaction is sent on-chain.
3. The spent portion goes to the service; unused remainder returns to the client's wallet.
This typically takes a few seconds to a couple of minutes. Network congestion may cause longer delays.
### If Release Does Not Happen
A fallback is available via on-chain refund: `refundAfterTimeout(escrowId)`.
Funds always return to the **original client address** regardless of who calls it.
This refund is only available after the escrow's `refundAt` deadline (typically \~90 minutes, exact timing depends on on-chain configuration).
**How to get `escrowId`:** from the settle transaction's `Deposited` event, or via [support on Discord](https://discord.com/invite/fortytwo).
## What to Store Client-Side
Minimum data worth storing:
| Data | Purpose |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| `x-session-id` | Current payment session identifier |
| `payment-response`
(especially `transaction` / `txHash`) | Payment confirmation and settle proof after successful session opening |
| `payment-signature`
(at least `network` + `client` + `nonce`) | Required for support and refund flows |
## Supported Payment Networks
USDC payments are currently accepted on two networks:
| Network | Chain ID |
| ------- | ------------- |
| Base | `eip155:8453` |
| Monad | `eip155:143` |
The `accepts[].network` and `accepts[].asset` fields in the payment response indicate which network and token address to use.
## Token Usage
The actual cost is calculated from **input** and **output tokens**.
`tools/call` responses include usage data:
```json JSON theme={null}
{
"result": {
"content": [{"type":"text","text":"..."}],
"_meta": {
"usage": {
"tokens_in": 123,
"tokens_out": 456
}
}
}
}
```
## Error Reference
| Code | Meaning | Action |
| ------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `402` | Payment required | Sign a new payment and repeat the `tools/call` request |
| `410` | Session expired | Open a new session, start a new payment cycle |
| `4xx` (other) | Request or signature issue | Verify `network`, signature validity window, and JSON-RPC format |
| `5xx` | Temporary server/upstream error | Wait and retry. If persistent, contact [support on Discord](https://discord.com/invite/fortytwo) with your `txHash` |
# MCP Rewards Program
Source: https://docs.fortytwo.network/docs/mcp-program
Early Fortytwo Prime adopters earn FOR points for every MCP call.
MCP
Fortytwo Prime
Rewards
### 1. Base Reward
**1,000 FOR** points per request
### 2. Early Adopter Multiplier
| Adoption Window | Reward Multiplier |
| ------------------------ | ---------------------------------------------------------- |
| First 500 agents to join | **3x** for 30 days
***3,000 FOR** points per request* |
| Agents 501–2,000 to join | **2x** for 30 days
***2,000 FOR** points per request* |
### 3. Streak Reward
7+ consecutive days with at least 1 request per day → **10,000 FOR** points
When one model isn’t enough.
Fortytwo Prime runs multiple frontier models in parallel and selects the best answer.
# Quick Start
Source: https://docs.fortytwo.network/docs/mcp-quick-start
MCP
Fortytwo Prime
Installing
Installing to Agent
Agentic Skill
x402Escrow Payments
When one model isn’t enough.
Fortytwo Prime runs multiple frontier models in parallel and selects the best answer.
## Step 1. Choose where you want to use MCP with Fortytwo Prime access
Send this to your agent or get skill from [GitHub ](https://github.com/Fortytwo-Network/fortytwo-mcp-skills):
```bash theme={null}
npx skills add Fortytwo-Network/fortytwo-mcp-skills
```
Follow our Integration Guide
## Step 2. Fund with USDC
Provide your agent or app with a Web3 wallet with at least **2 USDC** on **Monad** or **Base**.
We use [x402Escrow ](https://www.platform.fortytwo.network/x402escrow) protocol to handle secured payments.
## Step 3. Ask Fortytwo
Use the `Ask Fortytwo` command to get the best answer with Fortytwo Prime.
Your agent will automatically invoke it when needed to solve complex tasks.
Fortytwo Platform
# Research Papers
Source: https://docs.fortytwo.network/docs/papers
## Fortytwo: Swarm Inference with Peer-Ranked Consensus
*27 Oct 2025*
Available at: [https://arxiv.org/abs/2510.24801 ](https://arxiv.org/abs/2510.24801)
## Strand-Rust-Coder-v1: Rust Coding Model Fine-Tuned on Peer-Ranked Synthetic Data
*24 Oct 2025*
Available at: [https://huggingface.co/blog/Fortytwo-Network/strand-rust-coder-tech-report ](https://huggingface.co/blog/Fortytwo-Network/strand-rust-coder-tech-report)
## Self-Supervised Inference of Agents in Trustless Environments
*12 Sep 2024*
Available at: [https://arxiv.org/abs/2409.08386 ](https://arxiv.org/abs/2409.08386)
# Performance Balancing
Source: https://docs.fortytwo.network/docs/performance-balancing
P2P
Fortytwo P2P App
Fortytwo P2P CLI
## TL;DR
**By default**, Inference Node tries to use as much available memory as possible in order to deliver the fastest inference speed. When the node starts, most of the VRAM (or RAM on macOS) left after loading your model is allocated to caching.
*Q: What if you plan to use your computer for other tasks in parallel, like gaming, video rendering, graphic design and other resource-intensive applications?*
*A:* **Customisation and resources management.**
You can limit how much resources the node is allowed to utilize by doing two things:
1. **Pick a model**
2. **Set a custom KV Cache configuration** that suits the model and leaves enough free memory when summed up with the model size.
Easiest way to control cache size.
Convenient but more time consuming way to control cache size.
A detailed explanation of what KV Cache is and how it works with the models can be found here: [Picking a Model for Self-Hosted Node](https://docs.fortytwo.network/docs/how-to-pick-the-right-model-for-your-node).
## What Is KV Cache?
KV Cache is a reserved memory area used to store the model’s internal key–value tensors during inference. These tensors allow the model to avoid recalculating previous tokens, which significantly speeds up generation and enables longer context windows.
Because KV Cache grows as the history/context (prompt) becomes longer, it directly affects:
* **Maximum context length** — larger KV Cache allows the model to store more tokens.
* **Inference speed** — cached states reduce repeated computation.
* **Total memory consumption** — the node must hold both the model and its KV Cache at the same time.
* **System stability** — if KV Cache grows too large, other applications may experience slowdowns.
## How KV Cache Works with the Model
KV Cache limit can be specified in **GB** or **tokens** size. This number represents the **maximum KV Cache size** the node is allowed to use. This is the amount of memory that will be **attempted to be taken up by the node on top of what the model itself takes up**. Thus:
```
total_memory_used = model_size + kv_cache_size
```
Output:
* If your system has enough available memory -> the node will use the full value you provided.
* Otherwise -> it will only take what is left, and it might not leave enough space for other processes. This might lead to freezes and lags if you intend to run other programs alongside your node.
- Available system memory: **20 GB**
- Model size: **5 GB**
- Custom KV Cache limit: **4 GB**
The node will allocate **5 + 4 = 9 GB** in total, because enough memory is available.
Takeaways:
* You get some free resources to run other processes.
* Model is small, and if it is fast as well, you might entirely avoid experiencing freezes or lags when your node generates inference.
* If there is no intention to run other programs alongside your node, then you have 11 GB left free. You might want to increase the KV Cache size to make the most of it.
* Available system memory: **20 GB**
* Model size: **15 GB**
* Custom KV Cache limit: **10 GB**
Node asks for **15 + 10 = 25 GB** in total. There is not enough memory for that, so the following will happen:
1. Node loads the model first.
2. Then it uses up to **5 GB** of leftover memory.
Takeaways:
* You have no free resources to run other processes.
* Your system resources are fully utilized for quality inference.
* This is still a safe way to run the node and correlates with `--kv-size-mode auto`.
## Simple Rules
To ensure smooth noderunning:
1. Determine how much memory you can afford to allocate to your node.
*Example: 10 GB*
2. Define KV Cache size that is **20%-30% of your memory pool**
*Example: 2 GB is 20% of 10 GB*
3. Select a model that will work with 2 GB of KV Cache and is 2 GB smaller than your memory limit.
*Example: 10 - 2 = 8 GB for the model*
4. Start your node.
5. Start other applications. Your node should not take more resources than allocated to it.
Remember that we only talk about the momory allocaition here. If you pick a heavy and slow model, then on the inference rounds the utilization of your GPU will spike and lead to freezes and lags if use use something resources-cousuming alongside your node.
## How To Setup Custom KV Cache in Fortytwo P2P App and Fortytwo P2P CLI
### Options
* **Mode: Auto**
Recommended by default. The node takes up as much memory as it requires or is available, but leaves some of it free so that you can work comfortably alongside it.
* **Mode: Min**
Limits the node to **33%** of your currently available memory. It is a dynamic value, it changes each time the node restarts.
* **Mode: Medium**
Limits the node to **66%** of your currently available memory. It is a dynamic value, it changes each time the node restarts.
* **Mode: Max**
Use it when you dedicate your entire system to inference alone. Allows the node to use **100%** of all available system memory.
* **Custom**
Lets you manually define the exact KV Cache size that your node is allowed to consume:
* **Size in Tokens**
The best way to work with models. Use it if you know how it works. Study the models that you run and define optimal sizes for ideal performance balance.
* **Size in GB**
The best shortcut, allows to have a static and understandable limit in GB. However, it is not the best in terms of performance balancing. You need to manually adapt it to the models you run if they drastically vary in size or you encounter poor perfromance.
### Setup
Open Fortytwo P2P App and Go to Settings.
Scroll down to find the `Key-Value Cache Size` option.
Choose preferred **mode**: `Auto | Min | Medium | Max` or define **custom size** with `Custom in GB` or `Custom in Tokens` options.
Click Apply to apply the changed settings.
Monitor system resources to see if any further adjustment is needed.
At the moment, you have to define the KV Cache each time you re-launch Fortytwo P2P CLI.
Otherwise it falls back to the deafult option: `--kv-size-mode auto`
Launch Fortytwo P2P CLI.
When prompted to select a model, type `0` to go to Settings.
Go to KV Cache management by typing `1`.
Choose preferred **mode**: `Auto | Min | Medium | Max` or define **custom size** with `Custom in GB` or `Custom in Tokens` options.
After those settings are adjusted, you are returned to the model selection step.
Select a model and it will run with adhering to your KV Cache size limits.
Monitor system resources to see if any further adjustment is needed.
# Ports Availablity Verification
Source: https://docs.fortytwo.network/docs/ports
If the port is set correctly, the Relay Node reports successful connection directly in its logs.
## Test Ports Before Node Launch
Check for open ports and verify port forwarding setup on your router:
`fortytwo.network/check-my-port`
### Outcomes
* **Port is available**
You can launch the node and the network will detect it.
* If you use 42042 port — Make sure that this port is not used by another application. For example, if you are using both Fortytwo P2P Inference Node and Fortytwo P2P Relay Node on the same device, a different port for the Relay Node needs to be opened.
* If you use another port — Make sure that this is the port that is defined in your node's `.env` config file.
* **Port is unavailable**
Network will not be able to detect your Relay node. See '[Troubleshooting](/docs/ports#troubleshooting)'.
## Fortytwo Ports
By default, Fortytwo uses port **42042** in its applications. You will need to open multiple ports if you are using multiple nodes on the same device simultaneously. Each application will require a different port to be set up in its configuration file. For example, if you are using both Fortytwo P2P Inference Node and Fortytwo P2P Relay Node on the same device, a different port needs to be opened for the Relay Node and defined in its environment file.
## Port Forwarding
Port forwarding or port mapping allows the network to connect to a specific node. This allows you to run your node from behind a router.
Usually, the router has a public IP address and computers in the router's network obtain a private IP address from the router that is not addressable from outside the network. When you forward a specific port on your router, you are telling your router where to direct traffic for that port. If done successfully, you will see a "Port is available" message when performing this test.
## Troubleshooting
Most likely, you will see a **"Port is unavailable"** message if you haven't configured your device/router prior to testing your ports. You will need to configure your device/router in order to pass the check.
* Please contact your provider to ensure that you have a **static open IP address**.
* Please refer to your router's manual or the manufacturer for assistance in **setting up port forwarding** and assigning a **static IP to your device**.
# Quick Start
Source: https://docs.fortytwo.network/docs/quick-start
P2P
Fortytwo P2P App
Fortytwo P2P CLI
Fortytwo P2P Container
Installing
Launching
Updating
Stopping
[Join the "Hitchhiking to AGI" Program](/docs/participation)
Submit an application to join the first wave of Inference Noderunners: [Application Form ](https://tally.so/r/wQzVQk)
## 1. Preparing
Verify that your device meets the '[Requirements](/docs/hardware-requirements)'.
Best for personal devices. Friendly UI, the easiest way to get started.
Best for servers & VMs. Docker-based setup. Per-node GPU allocation.
Run and manage your node from the terminal.
Our '[Features](/docs/inference-features)' page can help you pick what suits you best.
## 2. Installing the Inference Node
**Please ensure you have received an acceptance email with an activation code before attempting to install the Inference Node.**
**A unique activation code is required for each device the node is installed on.**
[](https://downloads.fortytwo.network/updates/latest-mac) `downloads.fortytwo.network/updates/latest-mac`
Navigate to default **downloads directory** where the Fortytwo-x.x.x-mac.dmg file is located.
Run **Fortytwo-x.x.x-mac.dmg**.
Follow the on-screen instructions.
**If you are updating from version 0.2.1 and earler, follow the steps in the [Updating from Versions 0.2.1 and Earlier](/docs/quick-start#macos%3A-updating-from-versions-0-2-1-and-earlier) section.**
Run the application.
[](https://downloads.fortytwo.network/updates/latest-win) `downloads.fortytwo.network/updates/latest-win`
Navigate to default **downloads directory** where the Fortytwo-x.x.x-win.exe file is located.
Run **Fortytwo-x.x.x-win.exe**
Follow the on-screen instructions.
Run the application.
[](https://downloads.fortytwo.network/updates/latest-deb) `downloads.fortytwo.network/updates/latest-deb`
Navigate to default **downloads directory** where the Fortytwo-x.x.x-win.deb file is located.
Run **Fortytwo-x.x.x-win.deb**
Follow the on-screen instructions.
Run the application.
## 3. Operating Your Node
The node will remain fully operational until it is stopped by the user, the application is closed by the user or the system restarts. You can minimize or close the application window, switch to other applications – the node will continue running in the background and will be available in system tray.
### Updating Fortytwo P2P App
Fortytwo P2P App updates automatically. Sometimes the user might be asked to restart the application to install the most recent updates.
If you face issues with the updates, you can manually check the current version of `።‖ Fortytwo P2P App` on the [Changelog page](/changelog), and then manually download and reinstall the app using the current version links:
[](https://downloads.fortytwo.network/updates/latest-mac)
[](https://downloads.fortytwo.network/updates/latest-win)
[](https://downloads.fortytwo.network/updates/latest-deb)
You can find your current app version in the About window.
#### macOS: Updating from Versions 0.2.1 and Earlier
Versions 0.2.2 and above are code-signed, which means its internal app identity has changed from 0.2.1 and earlier versions.
Because of this, the new version cannot access data previously stored in the Keychain by the unsigned builds.
Fortytwo continues to use macOS Keychain to securely store your private key at system level.
When launching the new version, macOS may ask for your system password to grant Fortytwo access to its secure data — you have two options:
1. You can safely **enter your password** and click **“Always Allow”** to avoid future prompts
2. Or you can delete the previous data and restore your profile in the new version as described below:
Important! If you haven't already saved your recovery phrase or at least your private key, export your private key now — otherwise, you will lose access to your account and your node.
How to export your private key:
1. Right click on the Fortytwo P2P App icon in the Menu Bar.
2. Select `Account` > `Export Private Key`.
3. Select destination and confirm.
Make sure to save it to a secure location.
Open your Apps folder in Finder. Select **Fortytwo** and move it to Trash.
Find the **Fortytwo** app folder and move it to Trash.
Short path:
```bash theme={null}
~/Fortytwo
```
Full path:
```bash theme={null}
/Users/{username}/Fortytwo
```
Open the **Terminal** and run this command:
```bash theme={null}
security delete-generic-password -s "Fortytwo Safe Storage" || true
```
[](https://downloads.fortytwo.network/updates/latest-mac) `downloads.fortytwo.network/updates/latest-mac`
Run the app and sign in again using your private key or secret recovery phrase.
**Requirements:**
*hardware*
**Nvidia graphic card(s)** on Windows or Linux
**CPU on x86\_64 architecture**
*software*
**Installed** [NVIDIA Container Toolkit ](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
**Installed** [ Docker ](https://docs.docker.com/get-started/get-docker/)
**Installed** [ Git ](https://git-scm.com/download/)
Clone the repository
*Note: We do not recommend downloading and setting up the repository archive manually as it will be harder to keep Fortytwo P2P Container up to date.*
**If you don't have Git installed:**
Install [ Git ](https://git-scm.com/download/win).
Open **PowerShell as Administrator**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash theme={null}
New-Item -Path "$HOME\FortytwoContainer" -ItemType Directory -Force; Set-Location "$HOME\FortytwoContainer"
```
Run the following commands to clone the node package and enter the folder:
```bash theme={null}
git clone https://github.com/Fortytwo-Network/fortytwo-p2p-inference-docker
cd fortytwo-p2p-inference-docker
```
**If you don't have Git installed:** Install [ Git ](https://git-scm.com/install/linux).
Open **Terminal**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash theme={null}
mkdir -p ~/FortytwoContainer && cd ~/FortytwoContainer
```
Run the following commands to clone the node package and enter the folder:
```bash theme={null}
git clone https://github.com/Fortytwo-Network/fortytwo-p2p-inference-docker
cd fortytwo-p2p-inference-docker
```
Get required Utils by running commands from the following steps. This should download the current version of `FortytwoUtilsWindows.exe` into the folder.
```bash PowerShell theme={null}
$UTILS_VERSION = (Invoke-RestMethod "https://download.swarminference.io/utilities/latest").Trim()
Start-BitsTransfer -Source "https://download.swarminference.io/utilities/v$UTILS_VERSION/FortytwoUtilsWindows.exe" -Destination FortytwoUtilsWindows.exe
```
Your Web3 account's private key must be different for every unique node in the network that you run simultaneously. There should be no two nodes with the same ID in the network.
*For example: if you intend to run **8 nodes** on **8×GPU rig** at the same time, you will need **8 private keys**.*
This article will explain accounts and their credentials if you are new to Web3.
You have the following options to get the private key:
1. **Create a new account**
```bash PowerShell theme={null}
.\FortytwoUtilsWindows.exe --create-wallet --drop-code
```
```bash Bash theme={null}
make get-drop PRIVATE_KEY_PATH=$PATH_WHERE_TO_SAVE_YOUR_KEY CODE=$ACTIVATION_CODE
```
`$PATH_WHERE_TO_SAVE_YOUR_KEY` — The path where the file with your private key will be generated.
* Make sure that the defined path exists.
* If `.account_private_key` already exists in this locaiton, it will be ovewritten.
`$ACTIVATION_CODE` — Your activation code. It can only be used once.
When executed, a new private key named `.account_private_key` will be generated at the defined path.
The log will show you the credentials of your new account. It is crucial to **write your Secret Recovery Phrase down now**. You will not be able to recover it later.
2. **Get your private key address.**
`.account_private_key` file is a **hidden file** by default. Reveal it. **Text inside it is your private key**.
1. Open the folder in Finder.
2. Press `Command + Shift + .` to toggle hidden file visibility.
1. Open **File Explorer**.
2. Select the **View** tab from the top menu.
3. Click **Show** → **Hidden items**.
4. Hidden files and folders (including `.account_private_key`) will now be visible.
1. **Connect your wallet to the program**
```bash PowerShell theme={null}
.\FortytwoUtilsWindows.exe --drop-wallet --drop-code
```
```bash Bash theme={null}
make get-drop WALLET=$PUBLIC_WALLET_ADDRESS CODE=$ACTIVATION_CODE
```
`$PUBLIC_WALLET_ADDRESS` — Your Web3 EVM-compatible account's public address.
`$ACTIVATION_CODE` — Your activation code. It can be used only once.
This command will add the wallet you defined to the gas compensation program.
2. **Get your private key address.**
Get your Web3 EVM-compatible account's private key address from any Web3 wallet.
**Get your private key address.**
See '[Exporting Your Node ID, Your Web3 Credentials](/docs/wallet-and-account-management#exporting-your-node-id%2C-your-web3-credentials)' for instructions on how to get your private key from another Fortytwo application or get it from a Web3 wallet.
**Get your private key address.**
Get your Web3 EVM-compatible account's private key address from any of Web3 wallets.
With no activation code, you’ll need to manually monitor and top-up MON and FOR balance for your node to work, with 2 MON and 100 FOR required to start the node. Your node will not automatically receive MON refills with no activation code.
With Fortytwo P2P Container, you can choose the way you run your node:
Create an `.env` file from the `.env.example` reference file and update the environment variables:
```bash theme={null}
cp .env.example .env
```
Open the `.env` file and specify unique credentials for the node:
* `FT_ACCOUNT_PRIVATE_KEY` — Unique Web3 account private key
* `FT_CAPSULE_LLM_HF_REPO` and `FT_CAPSULE_LLM_HF_MODEL_NAME` — Unique model credentials
```bash theme={null}
# protocol
FT_ACCOUNT_PRIVATE_KEY=$YOUR_UNIQUE_PRIVATE_KEY
FT_NODE_LISTENER_PORT=42042
# capsule
FT_CAPSULE_HTTP_HOST="0.0.0.0"
FT_CAPSULE_HTTP_PORT=42442
FT_CAPSULE_LLM_HF_REPO=Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF
FT_CAPSULE_LLM_HF_MODEL_NAME=Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf
INPUT_MODEL_CACHE=./model_cache
```
Read the '[Environment Setup](/docs/inference-env-setup)' page for more details.
It is desirable to pre-download the model before attempting to start the node. Use the same model credentials as defined in the `.env` file.
Use this command to download a model:
```bash PowerShell theme={null}
.\FortytwoUtilsWindows.exe --hf-repo --hf-model-name --model-cache model_cache
```
In our case it looks like this:
```bash PowerShell theme={null}
.\FortytwoUtilsWindows.exe --hf-repo Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF --hf-model-name Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf --model-cache model_cache
```
```bash Bash theme={null}
make download-llm LLM_HF_REPO=$REPO_ID LLM_HF_MODEL_NAME=$MODEL_ID
```
In our case it looks like this:
```bash Bash theme={null}
make download-llm LLM_HF_REPO=Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF LLM_HF_MODEL_NAME=Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf
```
The unique strength of the Fortytwo P2P Container setup is that it allows to run several nodes on a single machine and allocate a particular GPU to a particular node. Let's explore this functionality with an example setup where we would want to launch **three nodes on a 4×GPU rig**.
The models for this example are:
1. [Fortytwo\_Strand-Rust-Coder-14B-v1-Q4\_K\_M ](https://huggingface.co/Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF)
2. [VibeThinker-1.5B.Q4\_K\_M ](https://huggingface.co/mradermacher/VibeThinker-1.5B-GGUF)
3. [Qwen3-1.7B-Q4\_K\_M ](https://huggingface.co/unsloth/Qwen3-1.7B-GGUF)
Each Inference Node requires its own unqiue environment defined in the `.env` file. Since we want to run 3 nodes, we will be creating 3 environment files from the `.env.example` reference file and update the environment variables:
```bash theme={null}
cp .env.example .env.strand-rust-coder
cp .env.example .env.vibethinker
cp .env.example .env.qwen
```
Open each newly created `.env` file and specify the unique credentials for each node:
* `FT_ACCOUNT_PRIVATE_KEY` — Unique Web3 account private key
* `FT_NODE_LISTENER_PORT` — Unique port
* `FT_CAPSULE_LLM_HF_REPO` and `FT_CAPSULE_LLM_HF_MODEL_NAME` — Unique model credentials
For our example, this will be the setup, unwrap to see the contents of each file:
```bash theme={null}
# protocol
FT_ACCOUNT_PRIVATE_KEY=$YOUR_FIRST_UNIQUE_PRIVATE_KEY
FT_NODE_LISTENER_PORT=42042
# capsule
FT_CAPSULE_HTTP_HOST="0.0.0.0"
FT_CAPSULE_HTTP_PORT=42442
FT_CAPSULE_LLM_HF_REPO=Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF
FT_CAPSULE_LLM_HF_MODEL_NAME=Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf
INPUT_MODEL_CACHE=./model_cache
```
```bash theme={null}
# protocol
FT_ACCOUNT_PRIVATE_KEY=$YOUR_SECOND_UNIQUE_PRIVATE_KEY
FT_NODE_LISTENER_PORT=42043
# capsule
FT_CAPSULE_HTTP_HOST="0.0.0.0"
FT_CAPSULE_HTTP_PORT=42442
FT_CAPSULE_LLM_HF_REPO=mradermacher/VibeThinker-1.5B-GGUF
FT_CAPSULE_LLM_HF_MODEL_NAME=VibeThinker-1.5B.Q4_K_M.gguf
INPUT_MODEL_CACHE=./model_cache
```
```bash theme={null}
# protocol
FT_ACCOUNT_PRIVATE_KEY=$YOUR_THIRD_UNIQUE_PRIVATE_KEY
FT_NODE_LISTENER_PORT=42044
# capsule
FT_CAPSULE_HTTP_HOST="0.0.0.0"
FT_CAPSULE_HTTP_PORT=42442
FT_CAPSULE_LLM_HF_REPO=unsloth/Qwen3-1.7B-GGUF
FT_CAPSULE_LLM_HF_MODEL_NAME=Qwen3-1.7B-Q4_K_M.gguf
INPUT_MODEL_CACHE=./model_cache
```
Read the '[Environment Setup](/docs/inference-env-setup)' page for more details.
It is desirable to pre-download the model before attempting to start the node. Use the same model credentials as defined in each `.env` file.
Use this command to download a model:
```bash PowerShell theme={null}
.\FortytwoUtilsWindows.exe --hf-repo --hf-model-name --model-cache model_cache
```
In our case it looks like this:
```bash PowerShell theme={null}
.\FortytwoUtilsWindows.exe --hf-repo Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF --hf-model-name Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf --model-cache model_cache
.\FortytwoUtilsWindows.exe --hf-repo mradermacher/VibeThinker-1.5B-GGUF --hf-model-name VibeThinker-1.5B.Q4_K_M.gguf --model-cache model_cache
.\FortytwoUtilsWindows.exe --hf-repo unsloth/Qwen3-1.7B-GGUF --hf-model-name Qwen3-1.7B-Q4_K_M.gguf --model-cache model_cache
```
```bash Bash theme={null}
make download-llm LLM_HF_REPO=$REPO_ID LLM_HF_MODEL_NAME=$MODEL_ID
```
Use the same credentials as in the environment files. In our case it looks like this:
```bash Bash theme={null}
make download-llm LLM_HF_REPO=Fortytwo-Network/Strand-Rust-Coder-14B-v1-GGUF LLM_HF_MODEL_NAME=Fortytwo_Strand-Rust-Coder-14B-v1-Q4_K_M.gguf
make download-llm LLM_HF_REPO=mradermacher/VibeThinker-1.5B-GGUF LLM_HF_MODEL_NAME=VibeThinker-1.5B.Q4_K_M.gguf
make download-llm LLM_HF_REPO=unsloth/Qwen3-1.7B-GGUF LLM_HF_MODEL_NAME=Qwen3-1.7B-Q4_K_M.gguf
```
Create separate compose files for each node from the `docker-compose.yml` reference:
```bash theme={null}
cp docker-compose.yml docker-compose-strand-rust-coder.yml
cp docker-compose.yml docker-compose-vibethinker.yml
cp docker-compose.yml docker-compose-qwen.yml
```
Verify your GPU configuration using the nvidia-smi command:
```bash theme={null}
nvidia-smi
```
In our example, we established that we have a 4×GPU rig. So, we should have 4 GPUs with IDs 0, 1, 2, and 3 (shown in the first GPU column).
Our plan is to:
* For Fortytwo\_Strand-Rust-Coder — Use **GPU #1** and **#2**
* For VibeThinker — Use **GPU #0**
* For Qwen3 — Use **GPU #3**
Fortytwo\_Strand-Rust-Coder is the largest model here, so we allocate two GPUs to it.
GPU order doesn't matter here.
`nvidia-smi` output should be as follows:
```bash theme={null}
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.195.03 Driver Version: 570.195.03 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA A10G Off | 00000000:00:1B.0 Off | 0 |
| 0% 29C P0 58W / 300W | 0MiB / 23028MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 1 NVIDIA A10G Off | 00000000:00:1C.0 Off | 0 |
| 0% 28C P0 56W / 300W | 0MiB / 23028MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 2 NVIDIA A10G Off | 00000000:00:1D.0 Off | 0 |
| 0% 28C P0 58W / 300W | 0MiB / 23028MiB | 3% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 3 NVIDIA A10G Off | 00000000:00:1E.0 Off | 0 |
| 0% 28C P0 56W / 300W | 0MiB / 23028MiB | 2% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
```
Edit each Docker Compose file to assign specific GPU(s) by their IDs.
For our example, we need to make the following edits:
```bash theme={null}
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['1', '2'] # Assign to GPUs 1 and 2
capabilities:
- gpu
```
```bash theme={null}
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0'] # Assign to GPU 0
capabilities:
- gpu
```
```bash theme={null}
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['3'] # Assign to GPU 3
capabilities:
- gpu
```
Using `device_ids: ['all']` will assign all available GPUs for that node.
## 3. Operating Your Node
With Fortytwo P2P Container, you can choose the way you run your node:
### Launching Fortytwo P2P Container
If restarting your node after relaunching the terminal/OS, don't forget that the following should be executed from the node repository folder, where your `.env` and `docker-compose.yml` are located.
To make sure that your repo is up to date, before each start, get the latest updates with the `git pull` command:
```bash theme={null}
git pull
```
```bash PowerShell theme={null}
$UTILS_VERSION = (Invoke-RestMethod "https://download.swarminference.io/utilities/latest").Trim()
Start-BitsTransfer -Source "https://download.swarminference.io/utilities/v$UTILS_VERSION/FortytwoUtilsWindows.exe" -Destination FortytwoUtilsWindows.exe
```
Launch [ Docker ](https://docs.docker.com/get-started/get-docker/) and wait until its interface says "Engine running".
```bash theme={null}
docker compose build
```
```bash theme={null}
docker compose up -d
```
If the model defined in the `.env` file is **not pre-downloaded**, then your node will **download it at startup**. In that case Capsule module might report `unhealthy` status if the download is too big:
The error will repeat if attempting to re-execute the `docker compose up -d` command:
Note that **it is not a bug with your setup.**
Technically, your Capsule is **still downloading the model** and will start when it is ready. However, in this case, you will have to manually observe when your capsule will launch inside the Docker application, watch for the `fortytwo-capsule` container, then start the `fortytwo-protocol` container from inside the Docker application.
**The easiest way to not catch this behavior right now is to pre-download the models from step #5.**
#### How to Make Sure it Works?
If everything went successfully, after launch, you can verify that the nodes are running correctly with:
```bash theme={null}
docker ps
```
Your node should be running in its own container with the all the available GPU resources.
You should as well be able to open **Docker** application and see the `fortytwo-p2p-inference-docker` process running.
If you unwrap it, you can see the logging of the node running successfully with two containers:
* `fortytwo-capsule` — Capsule reports on the model loading and performing. Starts first.
* `fortytwo-protocol` — Protocol reports on the network. Protocol starts only after Capsule is all set and ready.
### Launching Fortytwo P2P Container
If you are restarting your node after relaunching the terminal/OS, don't forget that the following should be executed from the node repository folder, where your `.env` and custom docker compose `.yml` files are located.
To make sure that your repo is up to date, before each start, get the latest updates with the `git pull` command:
```bash theme={null}
git pull
```
```bash PowerShell theme={null}
$UTILS_VERSION = (Invoke-RestMethod "https://download.swarminference.io/utilities/latest").Trim()
Start-BitsTransfer -Source "https://download.swarminference.io/utilities/v$UTILS_VERSION/FortytwoUtilsWindows.exe" -Destination FortytwoUtilsWindows.exe
```
Launch [ Docker ](https://docs.docker.com/get-started/get-docker/) and wait until its interface says "Engine running".
```bash theme={null}
docker compose build
```
Start each node using its respective compose file and environment file:
```bash theme={null}
docker compose -f docker-compose-strand-rust-coder.yml --env-file .env.strand-rust-coder -p strand-rust-coder up -d
docker compose -f docker-compose-vibethinker.yml --env-file .env.vibethinker -p vibethinker up -d
docker compose -f docker-compose-qwen.yml --env-file .env.qwen -p qwen up -d
```
If the model defined in the `.env` file is **not pre-downloaded**, then your node will **download it at startup**. In that case Capsule module might report `unhealthy` status if the download is too big:
The error will repeat if attempting to re-execute the `docker compose up -d` command:
Note that **it is not a bug with your setup.**
Technically, your Capsule is **still downloading the model** and will start when it is ready. However, in this case, you will have to manually observe when your capsule will launch inside the Docker application, watch for the `fortytwo-capsule` container, then start the `fortytwo-protocol` container from inside the Docker application.
**The easiest way to not catch this behavior right now is to pre-download the models from step #5.**
#### How to Make Sure it Works?
After launch, you can verify that the nodes are running correctly with this command:
```bash theme={null}
docker ps
```
Each node should be running in its own container with the assigned GPU resources.
You should also be able to open the **Docker** application and see the `strand-rust-coder`, `vibethinker`, and `qwen` processes running.
If you unwrap each one of them, you can see the logging of the node running successfully with two containers:
* `fortytwo-capsule` — Capsule reports on the model loading and performance. Starts first.
* `fortytwo-protocol` — Protocol reports on the network. Protocol starts only after Capsule is set and ready.
The node will remain fully operational until it is terminated by the user or the system restarts.
### Updating Fortytwo P2P Container
The node **components update automatically** every time it is launched and while operational.
However, you need to **manually update the repository** to get the latest environment updates.
At every start, execture the following command.
```bash theme={null}
git pull
```
If everything is stable, check for updates on the [Changelog page](/changelog). When you see a `⊡ Fortytwo P2P Container` update available, stop your node, run the `git pull` command, and then restart the node. These commands will let you compare your current version to remote version:
```bash theme={null}
git fetch
git log -1 origin/main --format="Remote: %h %ci"
git log -1 --format="Local: %h %ci"
```
**Update Utils if using Windows**:
```bash PowerShell theme={null}
$UTILS_VERSION = (Invoke-RestMethod "https://download.swarminference.io/utilities/latest").Trim()
Start-BitsTransfer -Source "https://download.swarminference.io/utilities/v$UTILS_VERSION/FortytwoUtilsWindows.exe" -Destination FortytwoUtilsWindows.exe
```
### Stopping Fortytwo P2P Container
To stop a running container, either stop it from the Docker interface, or execute the following command from the folder where the `docker-compose.yml` is located:
```bash theme={null}
docker compose down
```
If you want to stop one particular process, replace `docker-compose-name.yml` with that process's name.
```bash theme={null}
docker compose -f docker-compose-name.yml down
```
Open the **Terminal**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash Zsh theme={null}
mkdir -p ~/FortytwoCLI && cd ~/FortytwoCLI
```
Run the following commands to download the node package, extract it, and execute the installation script:
```bash Zsh theme={null}
curl -L -o fortytwo-p2p-inference-scripts.zip https://github.com/Fortytwo-Network/fortytwo-p2p-inference-scripts/archive/refs/heads/main.zip
unzip fortytwo-p2p-inference-scripts.zip -d . && rm fortytwo-p2p-inference-scripts.zip
cd fortytwo-p2p-inference-scripts-main
chmod +x macos.sh && ./macos.sh
```
Follow the on-screen instructions in the script to complete the setup.
The node will start automatically.
Open **PowerShell as Administrator**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash PowerShell theme={null}
New-Item -Path "$HOME\FortytwoCLI" -ItemType Directory -Force; Set-Location "$HOME\FortytwoCLI"
```
Run the following commands to download the node package, extract it, and execute the installation script with a temporary execution policy override:
```bash PowerShell theme={null}
Invoke-WebRequest -Uri "https://github.com/Fortytwo-Network/fortytwo-p2p-inference-scripts/archive/refs/heads/main.zip" -OutFile "fortytwo-p2p-inference-scripts.zip"
Expand-Archive -Path fortytwo-p2p-inference-scripts.zip -DestinationPath . -Force; Remove-Item -Path fortytwo-p2p-inference-scripts.zip
cd fortytwo-p2p-inference-scripts-main
Unblock-File -Path .\windows.ps1
powershell -ExecutionPolicy Bypass -File .\windows.ps1
```
Follow the on-screen instructions to complete the setup.
The node will start automatically.
Open the **Terminal**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash Bash theme={null}
mkdir -p ~/FortytwoCLI && cd ~/FortytwoCLI
```
Run the following commands to download the node package, extract it, and execute the installation script:
```bash Bash theme={null}
curl -L -o fortytwo-p2p-inference-scripts.zip https://github.com/Fortytwo-Network/fortytwo-p2p-inference-scripts/archive/refs/heads/main.zip
unzip fortytwo-p2p-inference-scripts.zip
cd fortytwo-p2p-inference-scripts-main
chmod +x linux.sh && ./linux.sh
```
Follow the on-screen instructions to complete the setup.
The node will start automatically.
## 3. Operating Your Node
The node will remain fully operational until it is terminated by the user or the system restarts. You can minimize the terminal window or switch to other applications – the node will continue running in the background.
### Launching or Restarting Fortytwo P2P CLI
On October 23, 2025, we've changed the name of the default folder from `Fortytwo` to `FortytwoCLI`. If you've installed your Fortytwo CLI before this date, your default path will differ. To access the folder, look for `Fortytwo` instead of `FortytwoCLI`.
Open the **Terminal**.
Navigate to the directory where the node is installed using the **cd** command. If the node was installed in the **default location**, run:
```bash Zsh theme={null}
cd ~/FortytwoCLI/fortytwo-p2p-inference-scripts-main
```
Run the node startup script:
```bash Zsh theme={null}
./macos.sh
```
Follow the on-screen instructions.
The node will start automatically.
Open **PowerShell as Administrator**.
Navigate to the directory where the node is installed using the **cd** command. If the node was installed in the **default location**, run:
```bash PowerShell theme={null}
Set-Location "$HOME\FortytwoCLI\fortytwo-p2p-inference-scripts-main"
```
Run the node startup script:
```bash PowerShell theme={null}
powershell -ExecutionPolicy Bypass -File .\windows.ps1
```
Follow the on-screen instructions.
The node will start automatically.
Open the **Terminal**.
Navigate to the directory where the node is installed using the **cd** command. If the node was installed in the **default location**, run:
```bash Bash theme={null}
cd ~/FortytwoCLI/fortytwo-p2p-inference-scripts-main
```
Run the node startup script:
```bash Bash theme={null}
./linux.sh
```
Follow the on-screen instructions.
The node will start automatically.
### Updating Fortytwo P2P CLI
Fortytwo node automatically updates every time it is launched. When you start the node, it checks for the latest available version and installs any updates before running.
If you face issues with the updates, you can manually check the current version of `>_ Fortytwo P2P CLI` on the [Changelog page](/changelog), and then manually download and reinstall the app.
You can find your current version under `◰ Setup script — version validation` when lauhcing the CLI script.
### Stopping Fortytwo P2P CLI
Press **Ctrl+C** in the terminal window to terminate the node process.
# Environment Setup
Source: https://docs.fortytwo.network/docs/relay-env-setup
P2P
Fortytwo P2P Relay
Before the Relay can be launched, the `.env` file has to be set up first.
*It is located in the folder cloned from [ Fortytwo P2P Relay Setup ](https://github.com/Fortytwo-Network/fortytwo-p2p-relay-docker).*
*If you haven't set it up during the '[Installing the P2P Relay Node](/docs/relay-quick-start#1-installing-the-p2p-relay-node)' stage, copy and rename the `.env.example` reference file.*
```bash theme={null}
FT_ACCOUNT_PRIVATE_KEY=
FT_RPC_SERVICE_PORT=42420
FT_NODE_LISTENER_PORT=42042
IPFS_SWARM_PORT=4001
IPFS_DATA_PATH=/data/ipfs
IPFS_MOUNT_PATH=/data/ipfs_ipns
HOST_PUBLIC_IP=
```
## Environment Parameters
### `FT_ACCOUNT_PRIVATE_KEY`
Paste in the private key of an **EVM-compatible Web3 account**. You can get it from any Web3 wallet that supports EVM networks.
* Your Web3 account **should be different from your P2P Inference Node account**. This applies if you participate in both Inference and Relay activities at the same time.
* **Keep your Private Key secure.** Never share it publicly or commit it to version control systems.
**Early participation note:**
If the private key you wish to use is not tied to the public wallet address you applied with:
Either
**A.** Contact us at [support@fortytwo.network](mailto:support@fortytwo.network)
1. Title your letter "Relay Program Participation".
2. Specify the public wallet address that you registered with.
3. Specify the new public wallet address that you will be using for participation.
or
**B.** Contact our Discord support agent **MJ** with a message containing the information listed above.
### `FT_RPC_SERVICE_PORT`
Default port is `42420`. Change it if necessary.
* If another process in the system is using this port, for example, an **Inference Node is running on the same machine**, then change this port for the Relay Node.
* It must be different from the `FT_NODE_LISTENER_PORT`.
### `FT_NODE_LISTENER_PORT`
Default port is `42042`. Change it if necessary.
* Your device's IP should be **static and public**.
* The port defined for `FT_NODE_LISTENER_PORT` should be publicly accessible over both **TCP** and **UDP**.
* If another process in the system is using this port, for example, an **Inference Node is running on the same machine**, then change this port for the Relay Node.
* It must be different from the `FT_RPC_SERVICE_PORT`.
'[Ports Availablity Verification](/docs/ports)' can help you check if the network will be able to see your node.
### `IPFS_SWARM_PORT`
Default port is `4001`. Change it if necessary.
* Your device's IP should be **static and public**.
* The port defined for `IPFS_SWARM_PORT` should be publicly accessible over both **TCP** and **UDP**.
*See the [IPFS official documentation ](https://docs.ipfs.tech/how-to/nat-configuration/#enable-manual-port-forwarding) if want to learn more on IPFS. Note that no other setup than defined in our documentation is required.*
'[Ports Availablity Verification](/docs/ports)' can help you check if the network will be able to see your node.
### `IPFS_DATA_PATH`
Default path is `/data/ipfs`.
* Make sure that this **folder exists** before running the node.
### `IPFS_MOUNT_PATH`
Default path is `/data/ipfs_ipns`.
* Make sure that this **folder exists** before running the node.
### `HOST_PUBLIC_IP`
Paste in your IP/your server IP address.
* Your IP should be **static and public**.
# Quick Start
Source: https://docs.fortytwo.network/docs/relay-quick-start
P2P
Fortytwo P2P Relay
Installing
Launching
Updating
Stopping
[Get Relay Access ](https://tally.so/r/9qN9Ap)
**Please ensure you have received an acceptance email containing your whitelisted public wallet address before attempting to launch the Relay Node. A unique whitelisted wallet address is required for each device on which the Relay Node is installed.**
## Recommendations
* It is recommended to have previous **experience of operating relay or being Validator/Operator on a blockchain** with knowledge of [ Docker ](https://www.docker.com/).
* It is best to run Fortytwo P2P Relay on a **dedicated server**. Both P2P Relay Node and P2P Inference Node can run on the same server if set up correctly ([read more here](/docs/relay-quick-start#how-to-run-a-relay-node-alongside-an-inference-node)).
* **Staying online 24/7** will greatly affect the node's quality and rewards.
## 1. Installing the P2P Relay Node
Being a Relay Noderunner has specific'[Relay Node Requirements](/docs/relay-requirements)'.
Make sure that your system/virtual machine meets all requirements before proceeding.
**Requirements:**
*hardware*
**CPU on x86\_64 architecture**
*software*
**OS:** Windows or Linux
**Installed** [ Docker ](https://docs.docker.com/get-started/get-docker/)
**Installed** [ Git ](https://git-scm.com/download/)
**Private key from an EVM-Compatible Web3 account**
Clone the repository
*Note: We don't recommend downloading and setting up the repository archive manually as it will be harder to keep the Fortytwo Container up to date.*
**If you have previously removed git** (git comes preinstalled on macOS):
Install [ Git ](https://git-scm.com/install/)
or install Xcode Command Line Tools:
```
xcode-select --install
```
Open the **Terminal**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash theme={null}
mkdir -p ~/FortytwoRelay && cd ~/FortytwoRelay
```
Run the following commands to clone the node package and enter the folder:
```bash theme={null}
git clone https://github.com/Fortytwo-Network/fortytwo-p2p-relay-docker
cd fortytwo-p2p-relay-docker
```
**If you don't have Git installed:**
Install [ Git ](https://git-scm.com/download/win).
Open **PowerShell as Administrator**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash theme={null}
New-Item -Path "$HOME\FortytwoRelay" -ItemType Directory -Force; Set-Location "$HOME\FortytwoRelay"
```
Run the following commands to clone the node package and enter the folder:
```bash theme={null}
git clone https://github.com/Fortytwo-Network/fortytwo-p2p-relay-docker
cd fortytwo-p2p-relay-docker
```
**If you don't have Git installed:** Install [ Git ](https://git-scm.com/install/linux).
Open **Terminal**.
Navigate to your preferred installation directory with `cd` command, or run the following command to continue installation in the **default location** in your home directory:
```bash theme={null}
mkdir -p ~/FortytwoRelay && cd ~/FortytwoRelay
```
Run the following commands to clone the node package and enter the folder:
```bash theme={null}
git clone https://github.com/Fortytwo-Network/fortytwo-p2p-relay-docker
cd fortytwo-p2p-relay-docker
```
Create an `.env` file from the `.env.example` reference file and update environment variables:
```bash theme={null}
cp .env.example .env
```
Open the `.env` file and specify the unique credentials for the node:
* `FT_ACCOUNT_PRIVATE_KEY` — Unique Web3 account private key
* `HOST_PUBLIC_IP` — Your IP/your server IP address
Your private key must be different from the account that you use with your Inference Node.
```bash theme={null}
FT_ACCOUNT_PRIVATE_KEY=$YOUR_UNIQUE_PRIVATE_KEY
FT_RPC_SERVICE_PORT=42420
FT_NODE_LISTENER_PORT=42042
IPFS_SWARM_PORT=4001
IPFS_DATA_PATH=/data/ipfs
IPFS_MOUNT_PATH=/data/ipfs_ipns
HOST_PUBLIC_IP=$YOUR_IP_ADDRESS
```
Read the '[Environment Setup](/docs/relay-env-setup)' page for more details.
Check the `.env` file and ensure that the ports defined with the `FT_NODE_LISTENER_PORT` and `IPFS_SWARM_PORT` are publicly accessible over both **TCP** and **UDP**.
**Static public IP** is required.
'[Ports Availablity Verification](/docs/ports)' can help you check if the network will be able to see your node.
Inside the repository, create the following folders, which should match with the `IPFS_DATA_PATH` and `IPFS_MOUNT_PATH` defined in the `.env`:
```bash theme={null}
mkdir -p /data/ipfs
mkdir -p /data/ipfs_ipns
```
### How To Run a Relay Node Alongside an Inference Node
To run your Inference and Relay Nodes on the same machine at the same time, you need to:
* Change the default `FT_NODE_LISTENER_PORT` and `FT_RPC_SERVICE_PORT`. They have to be different from the Inference Node ports, which by default are `42042` and `42420` respectively.
* Define a unique `FT_ACCOUNT_PRIVATE_KEY`, it must be different from the account that you use with your Inference Node.
Read the '[Environment Setup](/docs/relay-env-setup)' page for details.
Note that **static public IP** is required.
'[Ports Availablity Verification](/docs/ports)' can help you check if the network will be able to see your node.
## 2. Launching Fortytwo P2P Relay
If restarting your node after relaunching the terminal/OS, don't forget that the following should be executed from the node repository folder, where your `.env` and `docker-compose.yml` are located.
To make sure that your repo is up to date, before each start, get the latest updates with the `git pull` command:
```bash theme={null}
git pull
```
Launch [ Docker ](https://docs.docker.com/get-started/get-docker/) and wait until its interface says "Engine running".
```bash theme={null}
docker compose build
```
```bash theme={null}
docker compose up -d
```
### How to Make Sure it Works?
If everything went successfully, you should now be able to open **Docker** application and see the `fortytwo-p2p-relay-docker` process running.
If you unwrap it and go to `fortytwo-relay` container, you can see the logging of the node running successfully. The node periodically tests its health and reports on your relay address status, like in this example:
```bash theme={null}
fortytwo-relay | UTC 20XX-XX-25 14:25:14.520081 INFO Check health
fortytwo-relay | UTC 20XX-XX-25 14:25:14.520106 INFO Relay address is public. Current address /ip4/X.XXX.XXX.XX/tcp/42042
```
The most common error you might encounter is an issue with closed ports:
```bash theme={null}
WARN Relay address status is unknown (attempt X/3). Please ensure that your node listener port is accessible from the outside.
ERROR Failed to determine NAT status after 3 attempts.
```
In this case, please refer to the '[Environment Setup](/docs/relay-env-setup)' page.
## 3. Operating Your Node
The node will remain fully operational until it is terminated by the user or the system restarts.
### Updating Fortytwo P2P Relay
The node **components update automatically** every time it is launched and while operational.
However, you need to **manually update the repository** to get the latest evniroment updates.
At every start, execture the following command.
```bash theme={null}
git pull
```
If running stable, check for the updates on the [Changelog page](/changelog). When you see `[|] Fortytwo P2P Relay` update available, stop your node, run the `git pull` command, and then restart the node. Here are the commands that will help you to compare your current commit version versus the remote version:
```bash theme={null}
git fetch
git log -1 origin/main --format="Remote: %h %ci"
git log -1 --format="Local: %h %ci"
```
### Stopping Fortytwo P2P Relay
To stop the running container, either stop it from the Docker interface, or execute the following command from the same folder where the `docker-compose.yml` is located:
```bash theme={null}
docker compose down
```
# Requirements
Source: https://docs.fortytwo.network/docs/relay-requirements
P2P
Fortytwo P2P Relay
## Web3 Account Requirements
Fortytwo P2P Relay Node requires an **EVM-compatible Web3 account** to verify node participation and to receive rewards.
Your Web3 account **should be different from your P2P Inference Node Web3 account** if you participate in both Inference and Relay activities at the same time.
## Internet Connection Requirements
This is **the most important part of operating your node successfully**.
The node performance is evaluated on the **uptime consistency**, and the **volume and quality of traffic throughput**.
Poor internet connection will result in poor performance.
Reliance on the same server providers and data centers as everybody else will result in high competition, leading to low performance and subsequently low gains in tokens.
* Public and Static IP
We recommend becoming a Relay Noderunner in your area. This will give you improved access to the global network and could make you a unique relay in your region, increasing your node's performance and rewards.
* Fast internet connection:
* Currently Recommended Minimum **500 Mbps**
* Recommended for Quality **8+ Gbps**
* High-traffic capacity with tolerant providers.
Please pay attention to the free traffic limits granted by your provider. Any traffic above these limits may incur additional expenses or restrict accessibility.
## OS Requirements
* Windows | Linux on **x86\_64 architecture**
* [ Docker ](https://docs.docker.com/get-started/get-docker/) installed
* [ Git ](https://git-scm.com/download/) installed
## Minimum Hardware Requirements
* RAM: **8 GiB**
* CPU Architecture **x86\_64**
* Clock speed **> 2.8 GHz**
# Support
Source: https://docs.fortytwo.network/docs/support
For [App Fortytwo ](https://app.fortytwo.network/) users
For questions about using and integrating the API into your projects
For questions about using and integrating Fortytwo MCP into agents or your projects
For Fortytwo P2P App, Fortytwo P2P CLI, and Fortytwo P2P Container Noderunners
For Fortytwo P2P Relay Noderunners
## Discord
Join our official [ Fortytwo Discord server ](https://discord.gg/fortytwo) to join the community and get support. The following channels may be helpful:
Join discussions on general issue-related topics.
Channel for P2P Inference Noderunners to submit P2P Inference Node bug reports.
P2P Relay Noderunners can join discussions or raise Relay-related issues.
# API Support
Source: https://docs.fortytwo.network/docs/support-api
Navigate to the main support page.
Contact our Discord support agent **MJ**
Send us a letter describing your issue or request
Look for the answer in the API section in FAQ
# App Fortytwo Support
Source: https://docs.fortytwo.network/docs/support-app-fortytwo
App Fortytwo
Support
Navigate to the main support page.
Contact our Discord support agent **MJ** in the #ai-agents-support channel.
## Default Configuration Files Location
Default installation paths are relative to your home directory.
`config.json` stores the currently used behavior and model data.
`identity.json` stores the currently active node's credentials.
Short path:
```bash Zsh theme={null}
~/.fortytwo
```
Full path:
```bash Zsh theme={null}
/Users/{username}/.fortytwo
```
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\.fortytwo
```
Full path example:
```bash theme={null}
C:\Users\{username}\.fortytwo
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\.fortytwo"
```
Short path:
```bash Bash theme={null}
~/.fortytwo
```
Full path:
```bash Bash theme={null}
/home/{username}/.fortytwo
```
# Inference Node Support
Source: https://docs.fortytwo.network/docs/support-inference
P2P
Fortytwo P2P App
Fortytwo P2P CLI
Fortytwo P2P Container
Report Issues
Find Logs
Export Logs
Default Installation Location
Navigate to the main support page.
## Reporting Your Issues
Join our `#tech-questions` channel in the official [ Fortytwo Discord server ](https://discord.gg/fortytwo) to join the discussion on all issue-related topics.
1. **Fortytwo P2P App** users can submit a bug report directly through the app.
2. **Fortytwo P2P CLI** and **Fortytwo P2P Container** users can submit a bug report through the `#bug-report` channel on the [ Fortytwo Discord server ](https://discord.gg/fortytwo).
### Reporting via Fortytwo P2P App
Fortytwo P2P App is the optimal way to submit a bug report. It is easier to use and will provide us with all the necessary information to solve your issue quickly.
**Only report your issues via the Fortytwo P2P App if you actually operate your node with it. Otherwise we will not get any relevant information on how your node was operated and what was causing an issue.**
When submitting a bug report, the system appends log files for our team to isolate and fix your issues quicker.
The following data is gathered when you submit a bug report:
* **App log** — helps us determine if the issue stems from the app functioning incorrectly.
* **Capsule log** — the capsule launches models on your node. This log helps us see if the issue is related to launching models, your system configuration or a particular model.
* **Protocol log** - this is the log of your interactions with the network. This log helps us understand if your issue is rooted in your node's interaction with the whole of the Fortytwo network.
**We receive only the latest and most critical data logged by the Fortytwo P2P App. Only the last `2000 lines` of each log are submitted.**
## Finding Log Files
Paths where your logs are stored:
```bash Zsh theme={null}
~/Fortytwo/storage/debug
```
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\Fortytwo\storage\debug
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\Fortytwo\storage\debug"
```
```bash Bash theme={null}
~/Fortytwo/storage/debug
```
To view logs as files, they have to be exported out of Docker.
The following should be executed from the node repository folder, where your `.env` and `docker-compose.yml` are located.
### View Logs
```bash theme={null}
docker compose logs -f -t --tail 100
```
Prints the last 100 lines of logs for all services, then continues streaming new ones.
Change `--tail` option to another value if required.
If you only want to see the logs of a particular process, replace `docker-compose-name.yml` with that process's name.
```bash theme={null}
docker compose -f docker-compose-name.yml logs -f -t --tail 100
```
### Export Logs
Logs can be exported to any directory, yet if you don't define a custom path, the log file gets generated in the **default location**.
**The path where your node is installed might differ from the default path if you altered it at the node installation step as defined on the '[Quick Start](/docs/quick-start)' page.**
`MACOS IS CURRENTLY NOT SUPPORTED`
```bash PowerShell theme={null}
docker compose logs -t > "ft_node_logs_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
```
If you only want to export the logs of a particular process, replace `docker-compose-name.yml` with that process's name.
```bash PowerShell theme={null}
docker compose -f docker-compose-name.yml logs -t > "ft_node_logs_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
```
```bash Bash theme={null}
docker compose logs -t > "ft_node_logs_$(date +'%Y%m%d_%H%M%S').txt"
```
If you only want to export the logs of a particular process, replace `docker-compose-name.yml` with that process's name.
```bash Bash theme={null}
docker compose -f docker-compose-name.yml logs -t > "ft_node_logs_$(date +'%Y%m%d_%H%M%S').txt"
```
**The path where your node is installed might differ from the default path if you altered it at the node installation step as defined on the '[Quick Start](/docs/quick-start)' page.**
On October 23, 2025, we've changed the name of the default folder from `Fortytwo` to `FortytwoCLI`. If you've installed your Fortytwo CLI before this date, your default path will differ. To access the folder, look for `Fortytwo` instead of `FortytwoCLI`.
```bash Zsh theme={null}
~/FortytwoCLI/fortytwo-p2p-inference-scripts-main/FortytwoNode/debug
```
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\FortytwoCLI\fortytwo-p2p-inference-scripts-main\FortytwoNode\debug
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\FortytwoCLI\fortytwo-p2p-inference-scripts-main\FortytwoNode\debug"
```
```bash Bash theme={null}
~/FortytwoCLI/fortytwo-p2p-inference-scripts-main/FortytwoNode/debug
```
## Default Installation Location
Default installation paths are relative to your home directory.
**The path where your node is installed might differ from the default path if you altered it at the node installation step as defined on the '[Quick Start](/docs/quick-start)' page.**
Short path:
```bash Zsh theme={null}
~/Fortytwo
```
Full path:
```bash Zsh theme={null}
/Users/{username}/Fortytwo
```
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\Fortytwo
```
Full path example:
```bash theme={null}
C:\Users\{username}\Fortytwo
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\Fortytwo"
```
Short path:
```bash Bash theme={null}
~/Fortytwo
```
Full path:
```bash Bash theme={null}
/home/{username}/Fortytwo
```
`MACOS IS CURRENTLY NOT SUPPORTED`
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\FortytwoContainer
```
Full path example:
```bash theme={null}
C:\Users\{username}\FortytwoContainer
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\FortytwoContainer"
```
Short path:
```bash Bash theme={null}
~/FortytwoContainer
```
Full path:
```bash Bash theme={null}
/home/{username}/FortytwoContainer
```
**The path where your node is installed might differ from the default path if you altered it at the node installation step as defined on the '[Quick Start](/docs/quick-start)' page.**
On October 23, 2025, we've changed the name of the default folder from `Fortytwo` to `FortytwoCLI`. If you've installed your Fortytwo CLI before this date, your default path will differ. To access the folder, look for `Fortytwo` instead of `FortytwoCLI`.
Short path:
```bash Zsh theme={null}
~/FortytwoCLI
```
Full path:
```bash Zsh theme={null}
/Users/{username}/FortytwoCLI
```
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\FortytwoCLI
```
Full path example:
```bash theme={null}
C:\Users\{username}\FortytwoCLI
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\FortytwoCLI"
```
Short path:
```bash Bash theme={null}
~/FortytwoCLI
```
Full path:
```bash Bash theme={null}
/home/{username}/FortytwoCLI
```
# FAQ
See the '[P2P Inference Nodes section in FAQ](/docs/faq#p2p-inference-nodes)'.
# MCP Support
Source: https://docs.fortytwo.network/docs/support-mcp
MCP
Fortytwo Prime
Support
Navigate to the main support page.
Contact our Discord support agent **MJ**
Send us a letter describing your issue or request
Look for the answer in the MCP section in FAQ
# Relay Node Support
Source: https://docs.fortytwo.network/docs/support-relay
P2P
Fortytwo P2P Relay
Report Issues
Find Logs
Export Logs
Default Installation Location
Navigate to the main support page.
## Reporting Your Issues
If you encounter any issues or have questions about Relay nodes:
* Join our [ Discord community ](https://discord.com/invite/fortytwo). Relay Noderunners have access to the `#relay-support` channel.
* The Relay Noderunner role is required to access the `#relay-support` channel and is assigned to you automatically if you specify your Discord username in your [Relay Application Form ](https://tally.so/r/9qN9Ap).
* If your role was not automatically assigned, contact our Community team on Discord.
* Use the `#tech-questions` channel to join the discussion on general issue-related topics.
## Finding Log Files
To view logs as files, they have to be exported out of Docker.
The following should be executed from the node repository folder, where your `.env` and `docker-compose.yml` are located.
### View Logs
```bash theme={null}
docker compose logs -f -t --tail 100
```
Prints the last 100 lines of logs for all services, then continues streaming new ones.
Change `--tail` option to another value if required.
### Export Logs
Logs can be exported to any directory, yet if you don't define a custom path, the log file gets generated in the **default location**.
**The path where your node is installed might differ from the default path if you altered it at the node installation step as defined on the '[Quick Start](/docs/relay-quick-start)' page.**
```bash Zsh theme={null}
docker compose logs -t > "ft_relay_node_logs_$(date +'%Y%m%d_%H%M%S').txt"
```
```bash PowerShell theme={null}
docker compose logs -t > "ft_relay_node_logs_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
```
```bash Bash theme={null}
docker compose logs -t > "ft_relay_node_logs_$(date +'%Y%m%d_%H%M%S').txt"
```
## Default Installation Location
Default installation paths are relative to your home directory.
**The path where your node is installed might differ from the default path if you altered it at the node installation step as defined on the '[Quick Start](/docs/relay-quick-start)' page.**
Short path:
```bash Zsh theme={null}
~/FortytwoRelay
```
Full path:
```bash Zsh theme={null}
/Users/{username}/FortytwoRelay
```
Paste into the address bar:
```bash theme={null}
%USERPROFILE%\FortytwoRelay
```
Full path example:
```bash theme={null}
C:\Users\{username}\FortytwoRelay
```
Path for PowerShell:
```bash theme={null}
cd "$HOME\FortytwoRelay"
```
Short path:
```bash Bash theme={null}
~/FortytwoRelay
```
Full path:
```bash Bash theme={null}
/home/{username}/FortytwoRelay
```
# FAQ
See the '[P2P Relay Nodes section in FAQ](/docs/faq#p2p-relay-nodes)'.
# Wallet and Account Management
Source: https://docs.fortytwo.network/docs/wallet-and-account-management
Fortytwo functions as a decentralized network of nodes. Fortytwo P2P App, Fortytwo P2P Container, and Fortytwo P2P CLI applications run the **Inference Nodes** in this network, while Fortytwo P2P Relay runs the **Relay Nodes** that aids the connectivity between the Inference Nodes. Participating nodes are identified with Web3 accounts.
*Main takeaways:*
* *Your node is associated with your Web3 account.*
* *Web3 authorization is required for rewards and reputation distribution across the network.*
* *Your node's Reputation is tied to your Web3 account.*
* *You remain in full control over your node/wallet at all times. To move your node to another OS or device, simply authorize in the Fortytwo P2P App of your choice on that device with your Web3 account.*
* *You can use your wallet outside the Fortytwo network and control it with Web3 wallet apps, for example [Phantom ](https://phantom.com/) or [MetaMask ](https://metamask.io/).*
## How does Node Identification Work?
For the network to identify your node, have it as an active participant and provide you with rewards, you need to authorize first.
We use Web3 accounts for authorization. This way, your node gets its unique ID by which is recognized by the network, it has its own reputation and can acquire rewards while remaining entirely under your control no matter what application or device you are using in the moment.
This way, we treat one node as one Web3 account.
* You can [create a new wallet](/docs/wallet-and-account-management#creating-a-new-account-in-fortytwo-clients) for your node directly within the Fortytwo P2P App and P2P CLI. You will have full ownership over this wallet, so make sure to save its credentials to retain access to it. This is a major difference from Web 2 accounts, as we will not be able to recover your access should you lose your credentials.
We recommend creating a new wallet for your node if you are new to Web3.
* Any **existing EVM Web3** wallet is compatible with the Fortytwo network. You can authorize in the Inference or Relay Nodes with an existing account by using your [private key or Secret Recovery Phrase](/docs/wallet-and-account-management#migrating-your-wallet-or-signing-up-with-an-existing-web3-account).
* A node can be [migrated between devices and applications](/docs/wallet-and-account-management#migrating-your-wallet-or-signing-up-with-an-existing-web3-account) using its unique Web3 wallet address credentials.
> For example, one Web3 wallet can be simultaneously used on two different machines within different Fortytwo applications (Fortytwo P2P CLI and Fortytwo P2P App for example). However, only one instance of your node will be able to participate in the network. See [this section of FAQ](/docs/faq#running-the-inference-nodes) for details.
Each node in the Fortytwo network has a unique predetermined name consisting of three words. You can see examples on the leaderboard on [Dashboard ](https://fortytwo.network/dashboard) page.
## The Node and Web3 Account Dependency
* You can run an unlimited number of nodes as long as it is **one node/wallet per one device**.
* **Each different node requires a unique Web3 wallet** to avoid ID collisions.
* You can install the same node (sign in with the same Web3 account) on multiple devices but can only run one instance of that node at any time. If running several nodes simultaneously under one account, only one node will perform at a time and it can lead to unexpected errors.
* As an exception, you can run both Inference and Relay Nodes on the same machine as long as each node uses **a unique wallet ID and unique ports**.
## What is a Web3 Account?
A Web3 account is a unique identifier that works using blockchain technology, allowing for function and control in a decentralized manner.
Since your node account is fundamentally a Web3 account, you need to know its 3 major identifiers:
Your node’s **public address** is primarily used for transactions, monitoring via blockchain explorers, determining leaderboard placements.
**Fortytwo** network requires it to:
* Send rewards for participation.
* Acknowledge your node's participation history, reputation, and balance and determine a node's reliability.
* **It is safe to share**: it functions similarly to bank credentials if anybody wants to send a transaction your way. However, keep in mind that anybody can see the entire history of transactions and earnings related to this wallet.
* Nobody can get access to your wallet with just your public address.
* Nobody can tie your wallet's public address to your identity until you acknowledge the ownership publicly. This way, your privacy depends on your own actions.
Your node’s **Secret Recovery Phrase** is a way to authenticate full access to your wallet. It is commonly a 12 or 24 word sequence.
**Fortytwo** network requires it as:
* One of the two sign in methods for your Web3 account/node. Fortytwo client uses the very first account on this wallet and generates a private key for it. The private key is then used as your node's signature on the blockchain. Secret Recovery Phrase is never stored or used aftewards.
It **can never be exported out of the node applications** because Fortytwo never stores is anywhere for security reasons.
* Secret Recovery Phrase provides access to a series of accounts that can be created under one wallet. Note, that when you create a new wallet with Fortytwo P2P App or P2P CLI, you create a wallet with one EVM account on it, which is used inside the Fortytwo network. However if you sign into your wallet with a wallet managment app, like [Phantom ](https://phantom.com/) or [MetaMask ](https://metamask.io/), you can add more accounts to it, be it in Ethereum network or other networks.
* **Never share it with anybody**. Treat it like a password. Keep it written down somewhere offline.
* **Whoever has access to it has full control over your entire wallet**.
* **If lost, your Secret Recovery Phrase cannot be recovered**, not even if you have saved your private key.
* It is best to securely keep both Secret Recovery Phrase and private key, as you have more ways to restore access to your assets.
Your node’s **private key** is another way to authenticate access to a single Web3 account. It is commonly exported and saved as a text file that holds a sequence of symbols similar to your public address.
**Fortytwo** network requires it as:
* One of the two sign in methods for your Web3 account/node. The private key is then used as your node's signature on the blockchain.
It **can be exported out of the node applications**.
* Private key provides access only to one exact Web3 account. This doesn't count as an entire wallet, and you will not be able to recover the wallet's Secret Recovery Phrase with it.
* **Never share it with anybody**. Treat it like a password. Keep it stored on an offline device for recovery purposes. Do not sync this file with cloud storage providers.
* If lost, it can only be recovered if you have the Secret Recovery Phrase for the wallet that holds this account in it.
* **Whoever has access to it has full control over this account**.
* It is best to securely keep both Secret Recovery Phrase and private key, as you have more ways to restore access to your assets.
## Creating New Web3 Account for a Node
You can create a new EVM compatible wallet in any Web3 wallet application that supports Etherium networks, for example [Phantom ](https://phantom.com/) or [MetaMask ](https://metamask.io/), or conveniently **create a new Web3 wallet directly in the Fortytwo P2P CLI or Fortytwo P2P App**.
When creating a new Web3 wallet outside of Fortytwo applications, note that only the first account in that wallet will be used at this time.
### Creating a New Account in Fortytwo P2P Applications
When starting the Fortytwo P2P App for the first time, you are prompted to either:
1. Create identity
2. Recover with recovery phrase
3. Recover with private key
To create a new account, click on the `Create identity` button.
While **Fortytwo** is in devnet phase, you will be prompted to enter your activation code to begin your participation. To get one, submit an application to get a chance to join the first wave of node operators: [Application Form ](https://tally.so/r/wQzVQk)
Put your activation code into the respective text field. Once it’s validated, click the `Create identity` button to proceed.
Once your identity is successfully created, the App will provide you with your **Secret Recovery Phrase**.
To see the phrase, click the `Reveal` button. Each word in the phrase is placed in a numbered box → **Write it down** and keep it secure, as it is used to recover your identity.
The App will then ask you to verify that you have written down the Phrase correctly before you move on — enter the words from the Phrase provided previously into the correspondingly numbered boxes.
IMPORTANT: You can only see your Secret Recovery Phrase at this stage. Make sure you wrote it down. It is never shown again or stored anywhere. Fortytwo doesn't have any information about your Secret Recovery Phrase and will not be able to help you if it is lost.
Next, the App will prompt you to export your **private key** outside of its directory → **export it to a secure offline device**. Once that is done, final confirmation screen is displayed and the node is ready to run.
Never share your Secret Recovery Phrase or private key with anyone.
`WALLET CREATION IS CURRENTLY NOT SUPPORTED`
When starting Fortytwo P2P CLI for the first time, you are prompted to either:
1. Create a new identity with an activation code,
or
2. Recover an existing identity with a recovery phrase.
To create a new account, **select option #1**.
While **Fortytwo** is in devnet phase, you will be prompted to enter your activation code to begin your participation. To get one, submit an application to get a chance to join the first wave of node operators: [Application Form ](https://tally.so/r/wQzVQk)
Your new account is now created.
The following information about your identity is provided in the `YOUR NEW IDENTITY CREATED` box within the terminal window:
* **Public address** of your node → Manually copy and store it to track your node's perfomance on [Dashboard ](https://fortytwo.network/dashboard) or other explorers. You can also use it to refill your node's balance. You can find it in the logs any time you restart your node.
* Your **Secret Recovery Phrase** → **Write it down** and keep it secure, as it is used to recover your identity.
IMPORTANT: You can only see your Secret Recovery Phrase at this stage. Make sure you wrote it down. It is never shown again or stored anywhere. Fortytwo doesn't have any information about your Secret Recovery Phrase and will not be able to help you if it is lost.
**If you skipped this step and forgot to write it down, we highly recommend you create a new account and write down your Secret Recovery Phrase.**
* Location of your **private key** on your computer → Go to the defined location and **copy the key file to a secure offline device**. Do not delete it from this folder as it is required for Fortytwo P2P CLI to function properly.
Never share your Secret Recovery Phrase or private key with anyone.
`WALLET CREATION IS CURRENTLY NOT SUPPORTED WITH FORTYTWO P2P RELAY`
## Finding Your Node's Public Address
*If you want to monitor your node's perfomance on the [Dashboard ](https://fortytwo.network/dashboard) or other explorers, or simply want to provide somebody with your node's credentials so that they can send assets your way, you need to know your node's [public address](/docs/wallet-and-account-management#public-address).*
Launch the Fortytwo P2P App.
Right click on the Fortytwo P2P App icon in the Tray/Menu Bar or in the Dock → Navigate to `Account` → click `Copy Wallet Address`.
Two options for the first step:
Look for the inference process that you are running. By default, should be called `fortytwo-p2p-inference-docker`.
If you launched in "Multi-node setup on a single machine", its name will depend on the name of your custom `docker-compose.yml`.
Unwrap it and go to `fortytwo-protocol` container.
When Capsule launches, `fortytwo-protocol` begins to post.
See '[**Quick Start section "Export Logs"**](/docs/quick-start#fortytwo-p2p-container)' for more.
*If your log file is empty, either there is a problem with the launch or protocol has not started yet. Try to export the log a bit later when Capsule has successfully downloaded and launched the AI model.*
Your public address is written **at the beginning** of the logs and at **every re-connection** with the network. Look for the following block of information:
```
Check current version
Latest version is vX.XX.X
Up to date
UTC 20XX-XX-XX 18:40:27.036628 INFO Fortytwo Protocol Node is starting up
UTC 20XX-XX-XX 18:40:27.036656 INFO Fortytwo Protocol Node current version: X.XX.X
<...>
UTC 20XX-XX-XX 23:32:35.728871 INFO Public key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
UTC 20XX-XX-XX 23:32:35.729190 INFO Operator Wallet Address: 0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```
Your wallet address is defined in the `Operator Wallet Address:` line and begins with `0x`.
Go through the standard CLI launch procedure, pick your desired model and launch your node.
After the Fortytwo logotype appears, look for the following block of information:
```
⏃ Starting Protocol...
Joining ::||
UTC 20XX-XX-XX 23:32:27.344073 INFO Fortytwo Protocol Node is starting up
UTC 20XX-XX-XX 23:32:27.344169 INFO Fortytwo Protocol Node current version: X.XX.X
<...>
UTC 20XX-XX-XX 23:32:35.728871 INFO Public key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
UTC 20XX-XX-XX 23:32:35.729190 INFO Operator Wallet Address: 0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```
Your wallet address is defined in the `Operator Wallet Address:` line and begins with `0x`.
Open **Docker** application and see the `fortytwo-p2p-relay-docker` process running.
If you unwrap it and go to `fortytwo-relay` container, you can see the logging of the node running successfully.
Your public address is written **at the beginning** of the logs and **at every re-connection** with the network. Look for the following block of information:
```
UTC 20XX-XX-25 12:25:29.769031 INFO Fortytwo Protocol Relay is starting up
UTC 20XX-XX-25 12:25:29.769052 INFO Fortytwo Protocol Relay current version: X.X.X
UTC 20XX-XX-25 12:25:29.769118 INFO Public key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
UTC 20XX-XX-25 12:25:29.769179 INFO Operator Wallet Address: 0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```
Your wallet address is defined in the `Operator Wallet Address:` line and begins with `0x`.
## Exporting Your Node ID, Your Web3 Credentials
*If you want to move your node to another device, transfer your node identity between appliactions, or want to access your account through third-party Web3 wallets, you will need either your [Secret Recovery Phrase](/docs/wallet-and-account-management#secret-recovery-phrase) or your [private key](/docs/wallet-and-account-management#private-key).*
If you have lost both the Secret Recovery Phrase and the private key your account can never be restored.
Your node’s **Secret Recovery Phrase can never be exported or extracted out of the node applications** because Fortytwo never stores is anywhere for security reasons.
If you have lost it but still have access to your node's private key, then it we recommended you create another account, write down the Secret Recovery Phrase, save your new private key, and transfer your funds to that account.
It is best to have secure access to both Secret Recovery Phrase and private key as this way you have more methods to restore access to your assets.
The private key is encrypted and should not be copied from the Finder/Explorer directly. It will appear as broken if you try to use it after copying this way.
Launch the Fortytwo P2P App.
Press the right mouse button on the Fortytwo P2P App icon on Menu Bar or on the Dock → Navigate to the option `Account` → `Export Private Key`.
Choose a directory to save the private key file in. Use a secure offline location. **Your private key is the text written inside this file**.
Do not synchronize this location to cloud storage.
Locate your **node installation folder**.
If you have trouble finding it, [refer to this FAQ entry](/docs/faq#where-is-my-inference-node-installed).
Inside it, find the `.env` file. Your private key is defined in it.
Locate your **node installation folder**.
If you have trouble finding it, [refer to this FAQ entry](/docs/faq#where-is-my-inference-node-installed).
Inside it, open the `FortytwoNode` subfolder.
Copy the file named `.account_private_key`.
It is a **hidden file** by default.
Platform-specific notes on how to reveal hidden files:
1. Open the folder in Finder.
2. Press `Command + Shift + .` to toggle hidden file visibility.
1. Open **File Explorer**.
2. Select the **View** tab from the top menu.
3. Click **Show** → **Hidden items**.
4. Hidden files and folders (including `.account_private_key`) will now be visible.
Save the `.account_private_key` to a secure offline location. **Your private key is the text written inside this file**.
Do not synchronize this location to cloud storage.
`Relay Nodes do not support generation of Web3 accounts.`
`Relay Noderunners already know their private keys.`
## Migrating Your Wallet or Signing In with an Existing Web3 Account
*Migrating your account between devices or applications follows the same procedure as signing in with an already existing Web3 account. For that you'll need your wallet's [Secret Recovery Phrase](/docs/wallet-and-account-management#secret-recovery-phrase) or your account's [private key](/docs/wallet-and-account-management#private-key).*
*If you are installing a new instance of the Fortytwo node and want to migrate your existing account to retain access to your previous identity and rewards, first you need to either already have access to your [Secret Recovery Phrase](/docs/wallet-and-account-management#secret-recovery-phrase) or your [private key](/docs/wallet-and-account-management#private-key) since you saved them when creating a new account, or you need to [export your credentials first](/docs/wallet-and-account-management#exporting-your-node-id%2C-your-web3-credentials).*
Authorization options:
When starting the Fortytwo P2P App for the first time, you are prompted to either:
1. Create identity
2. Recover with recovery phrase
3. Recover with private key
To recover with a Secret Recovery Phrase, click on the `Recover with recovery phrase` button.
You are now prompted to enter your Secret Recovery Phrase.
Type it separating each word with a single space and press Enter.
Currently, the account Fortytwo P2P CLI/Fortytwo P2P App imports when signing in with the Secret Recovery Phrase is the account which is the first by order in the wallet. So, though technically one wallet can have several accounts on it, only the first account is used at all times. Due to this limitation, each unique node requires a unique Web3 wallet.
If done correctly, the App should recognize and restore your account.
When starting the Fortytwo P2P App for the first time, you are prompted to either:
1. Create identity
2. Recover with recovery phrase
3. Recover with private key
To recover with a private key, click the `Recover with private key` button.
You are now prompted to either drop your private key into the highlighted area or click a button to navigate to the directory where your private key is stored.
If your application has already collapsed into the Menu Bar/System Tray state, it might be challenging to drag and drop your private key onto the app window. To make it easier, right click the application icon → select `Open in Window`.
Note that the private key file should not have a .txt or a similar text editor file extension. If you are experiencing issues, make sure that your file is named `.account_private_key` exactly.
If done correctly, the App should encrypt and securely store your private key, then recognize and restore your account.
See '[Quick Start](/docs/quick-start#fortytwo-p2p-container)' on the node '[Environment Setup](/docs/inference-env-setup)' guidance.
When starting Fortytwo P2P CLI for the first time, you are prompted to either:
1. Create a new identity with an activation code,
or
2. Recover an existing identity with a recovery phrase.
To create a new account, **select option #2**.
You are now prompted to enter your Secret Recovery Phrase.
Type it separating each word with a single space and press Enter.
Currently, the account Fortytwo P2P CLI/Fortytwo P2P App imports when signing in with the Secret Recovery Phrase is the account which is the first by order in the wallet. So, though technically one wallet can have several accounts on it, only the first account is used at all times. Due to this limitation, each unique node requires a unique Web3 wallet.
If done correctly, CLI should recognize and restore your existing account.
Locate your private key file. Copy it.
Locate your **new node installation folder**.
If you have trouble finding it, [refer to this FAQ entry](/docs/faq#where-is-my-inference-node-installed).
Inside it, open the `FortytwoNode` subfolder. Create it if it doesn’t exist.
Paste your prive key inside this folder.
Rename your file to `.account_private_key`.
Launch Fortytwo P2P CLI. If done correctly, it should recognize the provided identity.
See '[Quick Start](/docs/relay-quick-start)' on the node '[Environment Setup](/docs/relay-env-setup)' guidance.
**Your new node will now use the same account as before. No reactivation or new wallet generation is required.**
## Important Security Takeaways
* Do **not** share or expose your [private key](/docs/wallet-and-account-management#private-key). It grants full access to your account.
* Do **not** share or expose your [Secret Recovery Phrase](/docs/wallet-and-account-management#secret-recovery-phrase). It grants full access to your entire wallet.
* Never rely on having access to the private key alone. **Always have your Secret Recovery Phrase secured** or both.
* If you are operating nodes on multiple devices, each node must use a **separate Web3 account**.
# Related FAQ Entries
[How can I see how much FOR I have in my third-party wallet?](/docs/faq#how-can-i-see-the-amount-of-for-i-have-in-my-third-party-wallet)
# Core Concepts
Source: https://docs.fortytwo.network/docs/x402escrow-concepts
This section explains the primitives that make x402Escrow work: the escrow lifecycle, the roles involved, and the EIP-3009 signed authorization mechanism.
x402Escrow
## Escrow Lifecycle
Every escrow ultimately reaches one of two terminal states:
```
settle() release()
[empty] ------------------> [active] ------------------> [released]
|
|
| refundAfterTimeout()
+-----------------------> [refunded]
```
### States
| State | Storage | Meaning |
| ------------ | ---------------------- | ------------------------------------------------------------------ |
| **Empty** | `client == address(0)` | No escrow exists for this ID. |
| **Active** | `client != address(0)` | USDC is locked. Waiting for settlement or timeout. |
| **Released** | Deleted | Facilitator received payment; client received remainder. Terminal. |
| **Refunded** | Deleted | Client received full refund after timeout. Terminal. |
Once an escrow reaches a terminal state, its storage slot is cleared. The same `escrowId` cannot be reused — it is derived from `keccak256(client, nonce)`, where the nonce is a one-time EIP-3009 value.
## Roles
x402Escrow uses OpenZeppelin's AccessControl with three distinct roles:
| Role | Permissions | Typical holder |
| ------------------------------------ | ------------------------------------------------------------- | --------------------------------- |
| **Owner** | Authorize UUPS upgrades. Transfer ownership (two-step). | Multisig or governance contract. |
| **Admin** (`DEFAULT_ADMIN_ROLE`) | Grant/revoke roles. Adjust timeout window. | Operations team or multisig. |
| **Facilitator** (`FACILITATOR_ROLE`) | Call `settle()` and `release()`. Receives payment on release. | Service operator or relay server. |
### Why Roles Are Separated
* The **Owner** has the most dangerous capability (upgrading contract logic) but cannot touch escrowed funds.
* The **Admin** manages day-to-day configuration but cannot upgrade the contract.
* The **Facilitator** handles funds but cannot change configuration or upgrade logic.
This follows the principle of least privilege. The compromise of any single role does not grant full control.
## EIP-3009: Signed Authorization
x402Escrow does not use the standard ERC-20 `approve` + `transferFrom` pattern. Instead, it uses [EIP-3009 ](https://eips.ethereum.org/EIPS/eip-3009) — a signed authorization scheme supported natively by USDC token.
### How It Works
1. The client constructs and signs a `ReceiveWithAuthorization` message off-chain. This message specifies:
* **from**: the client address
* **to**: the escrow contract address (critical — prevents signature reuse)
* **value**: the maximum USDC to lock
* **validAfter / validBefore**: time window for the authorization
* **nonce**: unique per-authorization (prevents replay)
2. The facilitator submits this signature to `settle()`. The contract calls `receiveWithAuthorization()` on the USDC token, which verifies the signature and transfers funds atomically.
### Why EIP-3009 Over `approve`/`transferFrom`
| Property | approve + transferFrom | EIP-3009 |
| --------------------------- | ----------------------------------- | ------------------------------------ |
| Client transaction required | Yes (approve tx) | No |
| MEV frontrunning risk | High (anyone can call transferFrom) | None (only `to` address can execute) |
| Gas cost for the client | \~46k gas for approve | 0 (off-chain signature) |
| Nonce management | Token-level nonce | Per-authorization nonce |
| Replay protection | Allowance-based | Nonce-based, one-time use |
The `to` field in `ReceiveWithAuthorization` is set to the escrow contract address. Only the escrow contract (as `msg.sender == to`) can execute the transfer. This is a critical anti-MEV property — even if the signed data leaks, no other contract or EOA can use it.
## Escrow ID
Each escrow is identified by a deterministic ID:
```
escrowId = keccak256(abi.encodePacked(client, nonce))
```
This means:
* The same client with different nonces produces different escrow IDs.
* The escrow ID is known before the transaction is submitted (useful for off-chain tracking).
* Collision requires the same client to reuse a nonce, which EIP-3009 prevents at the token level.
## Storage Efficiency
Each active escrow occupies exactly one 32-byte storage slot:
```
+----------------------+-----------+-------------+
| client (20 bytes) | refundAt | amount |
| address | uint40 | uint56 |
+----------------------+-----------+-------------+
32 bytes total
```
* **uint40 refundAt**: Unix timestamp up to year 36,812. Sufficient for any practical timeout.
* **uint56 amount**: Supports up to approximately 72 billion USDC (72,057,594,037,927,935 micro-units). More than the entire USDC supply.
When an escrow is released or refunded, the slot is zeroed — reclaiming the storage gas refund.
## Timeout Mechanism
Each escrow stores its own `refundAt` timestamp, calculated at settlement time:
```
refundAt = block.timestamp + timeoutSecs
```
Key properties:
* **Per-escrow deadline**: Changing the global `timeoutSecs` via `setTimeout()` does not affect existing escrows. Only new escrows use the updated value.
* **Permissionless refund**: `refundAfterTimeout()` can be called by anyone — not just the client. Funds always go to the stored `client` address. This enables relayer-based gasless refunds.
* **Bounded range**: The admin can set `timeoutSecs` between 5 minutes and 24 hours.
## Payment Routing
When `release()` is called, the facilitator payment goes to `msg.sender` — not to a stored address. This is intentional:
* Multiple addresses can hold `FACILITATOR_ROLE`.
* The address that calls `release()` receives the payment.
* This enables facilitator rotation, load balancing, and hot-wallet separation without contract changes.
## Payment Flow
```
Client Facilitator x402Escrow USDC Token
| | | |
| 1. Sign EIP-3009 auth | | |
|---------------------->| | |
| | | |
| | 2. settle(signature) | |
| |--------------------->| |
| | | |
| | | 3. receiveWithAuth |
| | |--------------------->|
| | | |
| | | 4. USDC transferred |
| | |<---------------------|
| | | |
| | 5. escrowId returned | |
| |<---------------------| |
| | | |
| ... service executes ... | |
| | | |
| | 6. release(cost) | |
| |--------------------->| |
| | | |
| | 7. Payment to | |
| | facilitator | |
| |<---------------------| |
| | | |
| 8. Remainder refunded to client | |
|<----------------------+----------------------| |
| | | |
```
Constructs and signs an EIP-3009 `ReceiveWithAuthorization` message. No gas required. The signed payload specifies the from, to (escrow address), value (max USDC), validAfter/validBefore, and a unique nonce. The client sends this signature to the facilitator, typically via an `X-PAYMENT` HTTP header per the x402 protocol.
Submits the client's signature to the escrow contract with the EIP-3009 parameters.
The contract calls the USDC token to verify the client's signature and pull funds.
The token verifies the signature, checks that the nonce hasn't been used, and transfers funds from the client to the escrow contract. Atomic — if any check fails, the entire transaction reverts.
The contract validates the amount, computes `escrowId = keccak256(client, nonce)`, stores the escrow with `refundAt = block.timestamp + timeoutSecs`, and returns the ID to the facilitator.
*...service executes — the facilitator performs the metered work and tracks the actual cost...*
Provides the actual cost (`facilitatorAmount ≤ maxAmount`). The contract clears the escrow from storage.
The contract transfers `facilitatorAmount` to `msg.sender` (the calling facilitator).
The contract refunds `maxAmount - facilitatorAmount` to the stored client address.
### Timeout Refund
If the facilitator never calls `release()`:
```
Anyone x402Escrow
│ │
│ refundAfterTimeout(escrowId) │
│----------------------------->│
│ │
│ │--> Checks block.timestamp ≥ refundAt
│ │--> Transfers full amount to client
│ │
│ Refunded event │
│<-----------------------------│
```
* **Permissionless**: any address can trigger it. The client does not need to be online.
* **Funds always go to client**: the stored `client` address receives the refund regardless of who triggers it.
* **Default timeout**: 90 minutes (configurable by admin between 5 min and 24 hours).
### Typical x402 HTTP Integration
1. Agent sends HTTP request to a metered API
2. Server responds with HTTP 402 + payment requirements (price, token, escrow address)
3. Agent signs EIP-3009 authorization for the max amount
4. Agent re-sends the request with `X-PAYMENT` header containing the signature
5. Server (as facilitator) calls settle() to lock funds
6. Server executes the request
7. Server calls release() with the actual cost
8. Agent receives the HTTP response + any USDC remainder
# Contract Reference
Source: https://docs.fortytwo.network/docs/x402escrow-contract-reference
Complete API reference for x402Escrow: functions, events, errors, and storage types.
x402Escrow
API
**Contract**: `x402Escrow`
**Solidity**: `v0.8.22+`
**License**: MIT
**Inheritance**: Initializable, UUPSUpgradeable, Ownable2StepUpgradeable, AccessControlUpgradeable, ReentrancyGuard
## Constants
| Name | Type | Value | Description |
| ------------------ | --------- | ------------------------------- | ------------------------------------------ |
| `VERSION` | `uint256` | `1` | Contract version for upgrade tracking. |
| `FACILITATOR_ROLE` | `bytes32` | `keccak256("FACILITATOR_ROLE")` | Role identifier for facilitator addresses. |
## State Variables
| Name | Type | Visibility | Description |
| --------------- | ---------------------------- | ---------- | ------------------------------------------------------------ |
| `usdc` | `address` | `public` | USDC token address, set once at initialization. |
| `timeoutSecs` | `uint256` | `public` | Default timeout for new escrows (seconds). Range: 300–86400. |
| `activeEscrows` | `mapping(bytes32 => Escrow)` | `public` | Active escrows indexed by escrow ID. |
## Types
### Escrow (Internal Storage)
Packed into a single 32-byte storage slot.
```solidity theme={null}
struct Escrow {
address client; // 20 bytes — depositor address
uint40 refundAt; // 5 bytes — timestamp when refund becomes available
uint56 amount; // 7 bytes — USDC locked (up to ~72B USDC)
}
```
### EscrowView (Returned by getEscrow)
Full-width types for off-chain consumption.
```solidity theme={null}
struct EscrowView {
address client;
uint256 amount;
uint256 refundAt;
bool canRefund;
uint256 timeUntilRefund;
}
```
## Functions
### initialize
```solidity theme={null}
function initialize(
address _usdc,
address _facilitator,
address _admin,
address _owner
) external initializer
```
Initializes the proxy. Can only be called once.
**Parameters**
| Name | Type | Description |
| -------------- | --------- | ------------------------------------------------- |
| `_usdc` | `address` | USDC token address. Must be a contract. |
| `_facilitator` | `address` | Initial facilitator. Receives `FACILITATOR_ROLE`. |
| `_admin` | `address` | Initial admin. Receives `DEFAULT_ADMIN_ROLE`. |
| `_owner` | `address` | Contract owner. Authorizes UUPS upgrades. |
**Reverts**
* `ZeroAddress()` — if any parameter is `address(0)`.
* `NotContract()` — if `_usdc` has no code.
### settle
```solidity theme={null}
function settle(
address client,
uint256 maxAmount,
uint256 validAfter,
uint256 validBefore,
bytes32 nonce,
uint8 v,
bytes32 r,
bytes32 s
) external onlyRole(FACILITATOR_ROLE) nonReentrant returns (bytes32 escrowId)
```
Locks USDC in escrow using the client's EIP-3009 signed authorization.
**Parameters**
| Name | Type | Description |
| ------------- | ----------------------------- | ----------------------------------------------------- |
| `client` | `address` | Client wallet that signed the authorization. |
| `maxAmount` | `uint256` | Maximum USDC to lock (6 decimals). Must fit `uint56`. |
| `validAfter` | `uint256` | Earliest timestamp the authorization can be used. |
| `validBefore` | `uint256` | Latest timestamp the authorization can be used. |
| `nonce` | `bytes32` | Unique nonce for this authorization. |
| `v`, `r`, `s` | `uint8`, `bytes32`, `bytes32` | Client's ECDSA signature. |
**Returns**
| Name | Type | Description |
| ---------- | --------- | -------------------------------------------- |
| `escrowId` | `bytes32` | `keccak256(abi.encodePacked(client, nonce))` |
**Reverts**
* `InvalidAmount()` — if `maxAmount` is zero or exceeds `type(uint56).max`.
* `NotYetValid()` — if `block.timestamp < validAfter`.
* `TimeoutExpired()` — if `block.timestamp >= validBefore`.
* `EscrowAlreadyExists()` — if an active escrow with this ID already exists.
* `TransferMismatch()` — if the actual USDC received differs from `maxAmount`.
**Emits**
* `Deposited(escrowId, client, maxAmount)`
### release
```solidity theme={null}
function release(
bytes32 escrowId,
uint256 facilitatorAmount
) external onlyRole(FACILITATOR_ROLE) nonReentrant
```
Settles an active escrow. Pays the facilitator and refunds the remainder to the client.
**Parameters**
| Name | Type | Description |
| ------------------- | --------- | ----------------------------------------------------------------- |
| `escrowId` | `bytes32` | ID of the escrow to release. |
| `facilitatorAmount` | `uint256` | USDC to pay the facilitator. Must be `≤ escrow amount`. Can be 0. |
**Behavior**
* Payment goes to `msg.sender` (the calling facilitator), not a stored address.
* If `facilitatorAmount == 0`, the full amount returns to the client.
* If `facilitatorAmount == escrow.amount`, nothing returns to the client.
* Escrow storage is cleared before transfers.
**Reverts**
* `EscrowNotFound()` — if the escrow does not exist or was already settled/refunded.
* `InvalidAmount()` — if `facilitatorAmount > escrow.amount`.
**Emits**
* `Released(escrowId, msg.sender, facilitatorAmount, clientRefund)`
### refundAfterTimeout
```solidity theme={null}
function refundAfterTimeout(bytes32 escrowId) external nonReentrant
```
Refunds the full escrowed amount to the client after the timeout has passed. **Permissionless** — callable by any address.
**Parameters**
| Name | Type | Description |
| ---------- | --------- | --------------------------- |
| `escrowId` | `bytes32` | ID of the escrow to refund. |
**Behavior**
* The full amount transfers to the stored `client` address regardless of who calls this function.
* Escrow storage is cleared before the transfer.
**Reverts**
* `EscrowNotFound()` — if the escrow does not exist.
* `TimeoutNotReached()` — if `block.timestamp < escrow.refundAt`.
**Emits**
* `Refunded(escrowId, client, amount)`
### setTimeout
```solidity theme={null}
function setTimeout(uint256 _timeoutSecs) external onlyRole(DEFAULT_ADMIN_ROLE)
```
Updates the default timeout for **new** escrows. Does not affect existing escrows.
**Parameters**
| Name | Type | Description |
| -------------- | --------- | ------------------------------------------------------------------------- |
| `_timeoutSecs` | `uint256` | New timeout in seconds. Must be between 300 (5 min) and 86400 (24 hours). |
**Reverts**
* `InvalidTimeout()` — if outside the valid range.
**Emits**
* `TimeoutUpdated(_timeoutSecs)`
### getEscrow
```solidity theme={null}
function getEscrow(bytes32 escrowId) external view returns (EscrowView memory)
```
Returns the current state of an escrow.
**Parameters**
| Name | Type | Description |
| ---------- | --------- | -------------------------- |
| `escrowId` | `bytes32` | ID of the escrow to query. |
**Returns**: `EscrowView` with:
* `client` — depositor address (zero if the escrow doesn't exist).
* `amount` — USDC locked.
* `refundAt` — timestamp when refund becomes available.
* `canRefund` — `true` if `refundAfterTimeout()` can be called now.
* `timeUntilRefund` — seconds remaining until refund is available (0 if eligible).
## Events
### Deposited
```solidity theme={null}
event Deposited(bytes32 indexed escrowId, address indexed client, uint256 amount);
```
Emitted when USDC is locked via `settle()`.
### Released
```solidity theme={null}
event Released(
bytes32 indexed escrowId,
address indexed facilitator,
uint256 toFacilitator,
uint256 toClient
);
```
Emitted when an escrow is settled via `release()`.
### Refunded
```solidity theme={null}
event Refunded(bytes32 indexed escrowId, address indexed client, uint256 amount);
```
Emitted when an escrow is refunded via `refundAfterTimeout()`.
### TimeoutUpdated
```solidity theme={null}
event TimeoutUpdated(uint256 newTimeoutSecs);
```
Emitted when the admin changes the default timeout via `setTimeout()`.
## Errors
| Error | Thrown by | Condition |
| ----------------------- | ------------------------------- | ---------------------------------------------------------------- |
| `ZeroAddress()` | `initialize` | Any parameter is `address(0)`. |
| `NotContract()` | `initialize` | `_usdc` has no deployed code. |
| `EscrowNotFound()` | `release`, `refundAfterTimeout` | Escrow does not exist or has already been settled. |
| `EscrowAlreadyExists()` | `settle` | Escrow ID is already active. |
| `TimeoutNotReached()` | `refundAfterTimeout` | Current time is before `refundAt`. |
| `TimeoutExpired()` | `settle` | EIP-3009 authorization has expired. |
| `NotYetValid()` | `settle` | EIP-3009 authorization is not yet valid. |
| `InvalidAmount()` | `settle`, `release` | Amount is zero, exceeds `uint56`, or exceeds the escrow balance. |
| `InvalidTimeout()` | `setTimeout` | Timeout is outside the \[300, 86400] range. |
| `TransferMismatch()` | `settle` | Actual USDC received differs from expected. |
# Integration Guide
Source: https://docs.fortytwo.network/docs/x402escrow-integration-guide
How to integrate x402Escrow as a facilitator (service operator) or client (agent/payer).
x402Escrow
## Architecture Overview
```
+---------------+ HTTP 402 +---------------+
| Client / |<--------------------->| Facilitator / |
| AI Agent | X-PAYMENT header | Service API |
+-------+-------+ +-------+-------+
| |
| signs EIP-3009 | calls settle()
| authorization | / release()
| |
| +--------------+ |
+----------->| x402Escrow |<-----------+
| (on-chain) |
+------+-------+
|
+------+-------+
| USDC Token |
| (EIP-3009) |
+--------------+
```
## Facilitator Integration
The facilitator is the service operator — the side that accepts payment and delivers work.
### 1. Receive the Client's Payment Authorization
In the x402 flow, the client sends an HTTP request with an `X-PAYMENT` header containing the signed EIP-3009 authorization. Parse the header to extract:
```typescript theme={null}
interface PaymentAuthorization {
client: string; // client wallet address
maxAmount: bigint; // max USDC (6 decimals)
validAfter: bigint; // unix timestamp
validBefore: bigint; // unix timestamp
nonce: string; // bytes32
v: number;
r: string;
s: string;
}
```
### 2. Lock Funds with `settle()`
Call `settle()` to pull USDC from the client into escrow:
```typescript theme={null}
import { ethers } from "ethers";
const escrow = new ethers.Contract(ESCROW_ADDRESS, X402_ESCROW_ABI, facilitatorSigner);
const tx = await escrow.settle(
auth.client,
auth.maxAmount,
auth.validAfter,
auth.validBefore,
auth.nonce,
auth.v,
auth.r,
auth.s
);
const receipt = await tx.wait();
const depositedLog = receipt.logs.find(
(log) => log.address.toLowerCase() === ESCROW_ADDRESS.toLowerCase()
);
const escrowId = escrow.interface.parseLog(depositedLog).args.escrowId;
```
Store `escrowId` — you'll need it for release.
### 3. Execute the Service
Perform the metered work (AI inference, API calls, data processing, etc.) and track the actual cost.
### 4. Release with Actual Cost
```typescript theme={null}
const actualCost = ethers.parseUnits("2.50", 6); // actual USDC cost
const tx = await escrow.release(escrowId, actualCost);
await tx.wait();
// facilitator receives actualCost
// client receives (maxAmount - actualCost) automatically
```
If the service failed or no cost was incurred, release with zero:
```typescript theme={null}
await escrow.release(escrowId, 0); // full refund to client
```
### Error Handling
| Scenario | Action |
| ------------------------------------------ | ------------------------------------------------------------------------------------ |
| `settle()` reverts with `TransferMismatch` | The client's USDC balance may be insufficient, or a non-standard token is in use. |
| `settle()` reverts with `TimeoutExpired` | Authorization expired before you submitted it. Ask the client for a fresh signature. |
| `release()` reverts with `EscrowNotFound` | Escrow was already released or refunded (timeout). Check `getEscrow()` first. |
| Service crashes mid-execution | You have until `refundAt` to call `release()`. Monitor active escrows. |
## Client Integration
The client is the payer — typically an AI agent or application that consumes a metered service.
### 1. Sign the EIP-3009 Authorization
Construct and sign a `ReceiveWithAuthorization` message:
```typescript theme={null}
import { ethers } from "ethers";
const domain = {
name: "USD Coin", // USDC token name
version: "2", // USDC token version
chainId: 8453, // Base
verifyingContract: USDC_ADDRESS
};
const types = {
ReceiveWithAuthorization: [
{ name: "from", type: "address" },
{ name: "to", type: "address" },
{ name: "value", type: "uint256" },
{ name: "validAfter", type: "uint256" },
{ name: "validBefore", type: "uint256" },
{ name: "nonce", type: "bytes32" }
]
};
const message = {
from: clientAddress,
to: ESCROW_ADDRESS, // must be the escrow contract
value: ethers.parseUnits("10.00", 6), // max USDC to lock
validAfter: 0, // valid immediately
validBefore: Math.floor(Date.now() / 1000) + 300, // expires in 5 min
nonce: ethers.hexlify(ethers.randomBytes(32))
};
const signature = await clientSigner.signTypedData(domain, types, message);
const { v, r, s } = ethers.Signature.from(signature);
```
The `to` field must be the escrow contract address. This prevents anyone else from using your signature.
### 2. Send with the HTTP Request
Include the authorization in the `X-PAYMENT` header per the x402 protocol:
```typescript theme={null}
const response = await fetch("https://api.example.com/inference", {
method: "POST",
headers: {
"X-PAYMENT": JSON.stringify({
client: clientAddress,
maxAmount: message.value.toString(),
validAfter: message.validAfter.toString(),
validBefore: message.validBefore.toString(),
nonce: message.nonce,
v, r: r, s: s
}),
"Content-Type": "application/json"
},
body: JSON.stringify({ prompt: "..." })
});
```
### 3. Monitor the Escrow (Optional)
Check the escrow status on-chain:
```typescript theme={null}
const escrowId = ethers.keccak256(
ethers.solidityPacked(["address", "bytes32"], [clientAddress, message.nonce])
);
const view = await escrow.getEscrow(escrowId);
console.log({
amount: view.amount,
canRefund: view.canRefund,
timeUntilRefund: view.timeUntilRefund
});
```
### 4. Claim Timeout Refund (If Needed)
If the escrow was settled but the facilitator never called `release()`, claim a refund after the timeout:
```typescript theme={null}
if (view.canRefund) {
await escrow.refundAfterTimeout(escrowId);
// full amount returned to client
}
```
This is permissionless — any address can trigger it, and funds always go to the original client.
## Escrow ID Computation
The escrow ID is deterministic and can be computed off-chain before the transaction:
```
escrowId = keccak256(abi.encodePacked(client, nonce))
```
In ethers.js:
```typescript theme={null}
const escrowId = ethers.keccak256(
ethers.solidityPacked(["address", "bytes32"], [clientAddress, nonce])
);
```
In Python (web3.py):
```python theme={null}
from web3 import Web3
escrow_id = Web3.keccak(
Web3.to_bytes(hexstr=client_address) + nonce_bytes
)
```
## Event Monitoring
Subscribe to escrow events for off-chain tracking:
```typescript theme={null}
escrow.on("Deposited", (escrowId, client, amount) => {
console.log(`Escrow ${escrowId}: ${amount} USDC locked by ${client}`);
});
escrow.on("Released", (escrowId, facilitator, toFacilitator, toClient) => {
console.log(`Escrow ${escrowId}: ${toFacilitator} to facilitator, ${toClient} refunded`);
});
escrow.on("Refunded", (escrowId, client, amount) => {
console.log(`Escrow ${escrowId}: ${amount} USDC refunded to ${client}`);
});
```
# Overview
Source: https://docs.fortytwo.network/docs/x402escrow-overview
Programmable escrow for metered AI and agent services on Base and Monad.
x402Escrow
This documentation section covers the implementation available on GitHub.
Clone, experiment, and adapt it to your use case.
## Accept Payments for AI Inference
x402Escrow is a UUPS-upgradeable smart contract that locks USDC upfront using a signed off-chain authorization and then settles the actual cost when the job is complete. Unused funds return to the client automatically.
It implements the [x402 payment protocol ](https://www.x402.org/) that turns HTTP 402 “Payment Required” into a native on-chain settlement layer.
## Who Is This For?
* **Service operators (facilitators)** that run AI inference, MCP tool servers, or any metered API and want to get paid per request without invoices, subscriptions, or payment processors.
* **Agent builders (clients)** that need autonomous software agents to pay for services programmatically, without human approval for every transaction.
* **Protocol integrators** building on x402 who need a battle-tested escrow primitive with EIP-3009 support and timeout-based safety nets.
## Core Use Cases
x402Escrow is built specifically for consumption-based AI billing.
* AI services with usage-based, pay-per-token billing
* Services where the actual costs are unknown at request time
## How x402Escrow Works
The client signs an EIP-3009 authorization for the worst-case cost. No on-chain transaction required from the client.
When the job completes, the facilitator calls `release()` with the real cost. The client gets the difference back.
If the facilitator never settles, the client reclaims everything after the timeout. No admin intervention needed.
## The Problem It Solves
Traditional payment rails do not work for machine-to-machine commerce:
* Credit cards require human interaction and charge 2.9% + \$0.30 per transaction.
* Subscriptions force flat pricing on variable-cost workloads.
* Prepaid credits lock capital with no guarantee of refund.
* Direct token transfers offer no dispute resolution or overpayment protection.
AI agents consuming services need a payment pattern that is **autonomous**, **variable-cost**, and **trust-minimized**.
**x402Escrow provides such a payment layer.**
## x402Escrow Key Features
Clients sign off-chain; no approve+transfer dance, no MEV frontrunning.
Each escrow packs into 32 bytes. Gas-efficient by design.
Facilitator pays only what the service actually costs; remainder returns automatically.
Anyone can trigger a timeout refund. Enables gasless relayer patterns.
Contract logic can evolve; proxy state persists across upgrades.
Separate Owner, Admin, and Facilitator roles with least-privilege boundaries.
Maintains HTTP 402 semantics.
Uses standard headers (PAYMENT-REQUIRED, PAYMENT-SIGNATURE).
Only the settlement flow changes (escrow instead of direct payment).
Fully backward-compatible for clients that support escrow parameters.
An agent can accept a job via ERC-8183 and then use x402Escrow to pay for the inference it needs to complete that job. The two protocols operate at different layers of the same agentic commerce stack.
ERC-8183 answers:
*"Did the agent complete the job?"*
x402Escrow answers:
*"How many tokens were consumed to complete the job?"*
## Deployed Contracts
| Network | Address | Explorer |
| --------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Base** | `0x9562f50f73d8ee22276f13a18d051456d8d137a0` | [Basescan ](https://basescan.org/address/0x9562f50f73d8ee22276f13a18d051456d8d137a0) |
| **Monad** | `0x9562f50f73d8ee22276f13a18d051456d8d137a0` | [Monad Explorer ](https://monadscan.com/address/0x9562f50f73d8ee22276f13a18d051456d8d137a0) |
# Quick Start
Source: https://docs.fortytwo.network/docs/x402escrow-quick-start
Build, test, and deploy x402Escrow — locally or to production.
x402Escrow
Deploy
Prerequisites:
[Foundry ](https://book.getfoundry.sh/getting-started/installation) installed
[Git ](https://git-scm.com/download/) installed
## Clone and Build
```bash theme={null}
git clone https://github.com/Fortytwo-Network/fortytwo-x402Escrow.git
cd fortytwo-x402Escrow
forge install
forge build
```
## Run Tests
```bash theme={null}
forge test -vv
```
All 43 tests should pass, covering initialization, settlement, release, refunds, role management, upgrades, and edge cases.
## Check Gas Usage
```bash theme={null}
forge snapshot --check
```
Compares current gas usage against the committed baseline in `.gas-snapshot`.
## Supported Networks
| Network | Chain ID | USDC Address | Deployed Escrow |
| ----------------- | -------- | -------------------------------------------- | -------------------------------------------- |
| **Base** | 8453 | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | `0x9562f50f73d8ee22276f13a18d051456d8d137a0` |
| **Base Sepolia** | 84532 | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | `0x9562f50f73d8ee22276f13a18d051456d8d137a0` |
| **Monad** | 143 | `0x754704Bc059F8C67012fEd69BC8A327a5aafb603` | `0x9562f50f73d8ee22276f13a18d051456d8d137a0` |
| **Monad Testnet** | 10143 | `0x534b2f3A21130d7a60830c2Df862319e593943A3` | `0x9562f50f73d8ee22276f13a18d051456d8d137a0` |
## Environment Setup
```bash theme={null}
cp .env.example .env
```
```env theme={null}
PRIVATE_KEY=0x... # Deployer private key
USDC_ADDRESS=0x... # Network-specific USDC
FACILITATOR_ADDRESS=0x... # Initial facilitator
ADMIN_ADDRESS=0x... # Initial admin (DEFAULT_ADMIN_ROLE)
OWNER_ADDRESS=0x... # Contract owner (UUPS upgrade auth)
```
`.gitignore` excludes `.env` from commits. Never commit `.env` to version control.
## Deploy
The deployment script deploys two contracts:
1. **x402Escrow implementation** — the contract logic.
2. **ERC1967Proxy** — the proxy that delegates to the implementation and holds all state.
Start a local node:
```bash theme={null}
anvil
```
In a new terminal:
```bash theme={null}
source .env
forge script script/DeployX402Escrow.s.sol \
--rpc-url http://127.0.0.1:8545 \
--broadcast
```
```bash theme={null}
source .env
forge script script/DeployX402Escrow.s.sol \
--rpc-url base \
--broadcast \
--verify
```
```bash theme={null}
source .env
forge script script/DeployX402Escrow.s.sol \
--rpc-url monad \
--broadcast
```
```bash theme={null}
forge script script/DeployX402Escrow.s.sol \
--rpc-url base_sepolia \
--broadcast \
--verify
```
```bash theme={null}
forge script script/DeployX402Escrow.s.sol \
--rpc-url monad_testnet \
--broadcast \
--verify
```
The script outputs both the implementation and proxy addresses. **Use the proxy address** for all interactions.
## Post-Deployment Verification
```bash theme={null}
# Check USDC address
cast call "usdc()(address)" --rpc-url base
# Check timeout (should be 5400 = 90 min)
cast call "timeoutSecs()(uint256)" --rpc-url base
# Check facilitator role
cast call "hasRole(bytes32,address)(bool)" \
$(cast call "FACILITATOR_ROLE()(bytes32)" --rpc-url base) \
\
--rpc-url base
# Check admin role
cast call "hasRole(bytes32,address)(bool)" \
0x0000000000000000000000000000000000000000000000000000000000000000 \
\
--rpc-url base
# Check owner
cast call "owner()(address)" --rpc-url base
```
If deployed with `--verify`, the source code appears on Basescan. Otherwise, verify manually:
```bash theme={null}
forge verify-contract src/X402Escrow.sol:X402Escrow \
--rpc-url base \
--watch
```
## Role Management
```bash theme={null}
export ADMIN_KEY=0x... # Private key of the DEFAULT_ADMIN_ROLE holder
```
### Add a Facilitator
```bash theme={null}
cast send \
"grantRole(bytes32,address)" \
$(cast call "FACILITATOR_ROLE()(bytes32)" --rpc-url base) \
\
--private-key $ADMIN_KEY \
--rpc-url base
```
### Remove a Facilitator
```bash theme={null}
cast send \
"revokeRole(bytes32,address)" \
$(cast call "FACILITATOR_ROLE()(bytes32)" --rpc-url base) \
\
--private-key $ADMIN_KEY \
--rpc-url base
```
### Adjust Timeout
```bash theme={null}
cast send \
"setTimeout(uint256)" \
3600 \
--private-key $ADMIN_KEY \
--rpc-url base
```
Valid range: 300 (5 minutes) to 86400 (24 hours).
## Upgrade Procedure
x402Escrow uses the UUPS proxy pattern. To upgrade:
1. Deploy the new implementation contract.
2. Call `upgradeToAndCall()` on the proxy from the Owner address.
```bash theme={null}
export OWNER_KEY=0x... # Private key of the contract owner
# Deploy new implementation
forge create src/.sol: \
--rpc-url base \
--private-key $OWNER_KEY
# Upgrade proxy to new implementation
cast send \
"upgradeToAndCall(address,bytes)" \
\
0x \
--private-key $OWNER_KEY \
--rpc-url base
```
When deploying your contract, maintain storage layout compatibility. Do not reorder or remove existing state variables.
## Production Checklist
* Deploy with a hardware wallet or multisig as the Owner
* Use separate addresses for Owner, Admin, and Facilitator roles
* Verify contract source on block explorer
* Confirm USDC address is correct for the target network
* Confirm `timeoutSecs` is appropriate for your use case
* Set up event monitoring for `Deposited`, `Released`, and `Refunded`
* Test a full escrow cycle (settle -> release) on testnet before mainnet
* Ensure `.env` is listed in `.gitignore`
# Security Model
Source: https://docs.fortytwo.network/docs/x402escrow-security
x402Escrow is designed for adversarial environments. This section describes the threat model, protection mechanisms, and trust assumptions.
x402Escrow
## Trust Assumptions
| Party | Trusted to | Not trusted to |
| --------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Client** | Sign valid EIP-3009 authorizations. | Act honestly after signing (escrow protects against overpayment). |
| **Facilitator** | Call `settle()` and `release()` correctly. | Be available 24/7 (timeout refund protects against offline facilitators). |
| **Admin** | Configure reasonable timeouts. | Upgrade the contract (only Owner can). |
| **Owner** | Authorize safe upgrades. | Access escrowed funds directly. |
| **USDC token** | Implement EIP-3009 correctly. Transfer exact amounts (no fee-on-transfer). | — |
## Protection Mechanisms
### Reentrancy Protection
All state-changing functions that interact with external contracts (`settle`, `release`, `refundAfterTimeout`) are protected by:
1. **ReentrancyGuard** — OpenZeppelin's `nonReentrant` modifier prevents recursive calls.
2. **Checks-Effects-Interactions pattern** — escrow storage is cleared (effects) before any external token transfers (interactions).
### MEV Protection
EIP-3009 `ReceiveWithAuthorization` requires `msg.sender == to`. Since `to` is set to the escrow contract address, a mempool observer who extracts the signed authorization from a pending transaction cannot use it — only the escrow contract can execute the transfer.
### Fee-on-transfer Detection
After calling `receiveWithAuthorization()`, `settle()` verifies that the contract USDC balance increased by exactly `maxAmount`. If a token charges transfer fees (resulting in a smaller balance increase), the transaction reverts with `TransferMismatch()`.
This prevents a class of attacks where fee-on-transfer tokens would create escrows with less USDC than recorded, leading to insolvency on release.
### Access Control Boundaries
```
Owner --> _authorizeUpgrade() (UUPS upgrades only)
Admin --> setTimeout() (configuration only)
grantRole() / revokeRole()
Facilitator --> settle() (fund operations only)
release()
Anyone --> refundAfterTimeout() (permissionless safety net)
getEscrow()
```
No single role can both configure the contract and access funds. The Owner cannot call `release()`. The Facilitator cannot call `setTimeout()`. This limits the blast radius of any key compromise.
### Two-step Ownership Transfer
Ownership uses OpenZeppelin's `Ownable2Step`:
1. Current owner calls `transferOwnership(newOwner)`.
2. New owner calls `acceptOwnership()`.
This prevents accidental or irreversible ownership transfer to the wrong address.
### Per-escrow Deadlines
Each escrow stores its own `refundAt` timestamp at creation. Subsequent calls to `setTimeout()` do not modify existing escrows. This prevents an attack where an admin could extend timeouts to delay client refunds on active escrows.
### Input Validation
| Input | Validation | Error |
| ---------------------- | ----------------------------------- | ------------------------------------ |
| Addresses (initialize) | Must be non-zero | `ZeroAddress()` |
| USDC address | Must be a contract | `NotContract()` |
| Amount | Non-zero, fits `uint56` | `InvalidAmount()` |
| Timeout | 300 ≤ value ≤ 86400 | `InvalidTimeout()` |
| EIP-3009 window | `validAfter < now < validBefore` | `NotYetValid()` / `TimeoutExpired()` |
| Escrow existence | `client != address(0)` | `EscrowNotFound()` |
| Escrow uniqueness | No active escrow with the same ID | `EscrowAlreadyExists()` |
| Release amount | `facilitatorAmount ≤ escrow.amount` | `InvalidAmount()` |
## Attack Scenarios
### Facilitator Goes Offline
**Impact**: client funds are locked until timeout.
**Mitigation**: `refundAfterTimeout()` is permissionless. After `refundAt`, anyone (including a relayer or the client themselves) can trigger the refund. Default timeout is 90 minutes.
### Facilitator Overcharges
**Impact**: facilitator receives more than the fair cost.
**Mitigation**: the facilitator cannot withdraw more than `escrow.amount` (the client's signed maximum). The client controls their maximum exposure by choosing the `maxAmount` in the EIP-3009 signature.
### Facilitator Double-Releases
**Impact**: none.
**Mitigation**: `release()` clears the escrow before transferring. A second call reverts with `EscrowNotFound()`.
### Admin Sets Extreme Timeout
**Impact**: new escrows have very short or very long refund windows.
**Mitigation**: the timeout is bounded to \[5 minutes, 24 hours]. Existing escrows are unaffected.
### Signature Replay
**Impact**: funds locked twice from the same authorization.
**Mitigation**: EIP-3009 nonces are one-time use at the USDC token level. The escrow also checks `EscrowAlreadyExists` for the derived escrow ID.
### Malicious Upgrade
**Impact**: contract logic replaced with malicious code.
**Mitigation**: only the Owner (typically a multisig) can authorize upgrades via `_authorizeUpgrade()`. Two-step ownership transfer prevents accidental owner change.
## Upgradeability Considerations
x402Escrow uses the UUPS proxy pattern (ERC-1967). Key properties:
* **State persists across upgrades**: proxy storage is preserved when the implementation changes.
* **Storage layout must be compatible**: future versions must not reorder or remove existing storage variables.
* **Escrow struct is stable**: the packed `Escrow` struct occupies one slot. If the struct changes in a future version, a storage migration would be required.
* **Upgrade is atomic**: `upgradeToAndCall()` switches the implementation and optionally calls an initializer in one transaction.
## Recommendations for Production
1. **Use a multisig for Owner and Admin roles.** A single EOA controlling upgrades or role assignment is a single point of failure.
2. **Monitor `Deposited` and `Released` events.** Off-chain monitoring can detect anomalous patterns (e.g., releases without corresponding service activity).
3. **Set appropriate timeouts.** Shorter timeouts reduce client risk but give facilitators less time to settle. The default 90 minutes suits most API workloads.
4. **Rotate facilitator keys.** Since `release()` pays `msg.sender`, you can add new facilitator addresses and revoke old ones without affecting active escrows.