Research · ICP
HTTPS outcalls
Last reviewed 2026-09-21Source: ICP Developer Docs — HTTPS outcalls and the HTTP interface specificationThe request and response model is described as documented; the behaviour of any particular external service is outside the network's control.
The consensus problem
A canister's state is replicated across the nodes of its subnet, and every node executes the same messages in the same order so that they reach the same state. An HTTP request breaks that assumption. If each node makes the request independently, the responses can differ — a load balancer routes them to different backends, a timestamp changes, a field is ordered differently — and the nodes then disagree about what the canister should do.
The documentation describes the network's solution as a two-part mechanism. First, the response is passed through a transform function that the canister supplies, whose job is to reduce the response to a deterministic value that all nodes will compute identically. Second, the request can be marked as non-replicated, in which case only one node makes the call and the result is treated as an input rather than as agreed state.
The documentation is explicit that the transform function is not optional in the replicated case. A response that includes a timestamp, a nonce or any other varying field will cause the nodes to disagree, and the call will fail. The transform is where the developer strips the varying parts and keeps only what the canister actually needs.
Replicated and non-replicated
In replicated mode, every node of the subnet makes the request and the responses are compared after transformation. If they agree, the result is used and the canister's state can depend on it. This is the mode for reading data that the canister will act on, and it is the mode that requires a transform function.
In non-replicated mode, a single node makes the request and the response is not subject to consensus. The documentation describes this as appropriate for requests whose result does not need to be agreed — sending a notification, posting to an external service, logging — and it is cheaper because only one node performs the work. The trade-off is that the response cannot be trusted as agreed state, and a canister that stores it is storing one node's view.
The documentation also notes that a non-replicated outcall is not free of cost and is not a way to bypass the network's model. It is a different trust assumption, not an exemption from it. The reverse-gas model page covers how outcalls are charged, including the dependence on request size and maximum response size.
The request and its limits
The documentation describes the request as carrying a URL, a method, headers and an optional body, and the response as carrying a status code, headers and a body. The canister specifies a maximum response size, and the call fails if the response exceeds it. That is a deliberate constraint: an unbounded response would let an external service consume an arbitrary amount of the network's resources.
The documentation lists the supported methods and notes that the request is made over HTTPS. It also describes the headers the network sets and the ones a canister may not override, which is relevant to any service that expects a particular user agent or authentication header. A canister that needs to authenticate to an external service must hold the credential itself, which means the credential is in the canister's state and visible to anyone who can read it.
That last point is the security consideration the documentation raises. A canister's state is not secret from the nodes that run it, and a canister that holds an API key is trusting the network's operators not to use it. For a service that issues per-application keys this is usually acceptable; for a credential that grants broad access it is not, and the documentation suggests keeping such credentials out of the canister.
What it enables
The feature is what lets a canister read data the network does not natively track. A price feed, a weather reading, a sports result, an exchange rate — none of these are on the Internet Computer, and all of them are reachable through an outcall. The documentation presents this as the general-purpose escape hatch for external data, in contrast to the chain integrations, which are purpose-built for specific blockchains.
The distinction between the two is worth keeping. A chain integration gives a canister a verified view of another blockchain through a system canister. An HTTPS outcall gives it whatever an external service chooses to return. The first has a defined trust model; the second has the trust model of the service being called, which the network cannot improve.
The documentation also describes the interaction with the on-chain AI services, which are reached the same way. A canister that calls a model endpoint is making an outcall, and the same determinism considerations apply to the response it gets back.
Sources and references
The request model, the transform function and the replicated and non-replicated modes are described from the Internet Computer's own documentation and from the published HTTP interface specification.
- HTTPS outcalls and the transform function. ICP Developer Docs, HTTPS outcalls: describes the request and response shape, the transform function and the replicated flag.
- The HTTP interface specification. Internet Computer, Internet Computer interface specification: specifies the http_request method, the request and response records, and the size limits.
- Cost and the maximum response size. ICP Developer Docs, Cycle costs: lists the outcall charge and its dependence on request size and maximum response size.
Related reading
- Research HubEvery dataset on the site, with methodology and provenance.
- Altcoin ResearchAltcoins measured against Bitcoin: design intent, consensus, execution, scaling and market structure.
- The ETH-BTC Correlation RecordHow the correlation is measured, how it behaves across windows, and where it breaks down.
- The ETH/BTC RatioWhat the ratio measures, how to read its trend, and why it is not a forecast.
- ETH During Bitcoin Bull PhasesAssociation within a common market factor, and what co-movement cannot establish.
- ETH During Bitcoin Bear PhasesDrawdown depth and duration compared over identical windows, and the limits of the comparison.