# Rotating IPs

Source: https://crabtalk.ai/docs/development/rotating-ips

> Request a rotating exit IP for a single HTTP fetch in a berm-lang service. The destination uses your existing fetch permissions.

Use `.rotating()` to ask for a pool exit IP on a single request. Declare the destination in `[http] fetch` as usual.

```toml
[http]
fetch = ["api.example.com"]
```

```rust
use berm_lang::http::Request;

let response = Request::new("GET", "https://api.example.com/items", &[], b"")
    .rotating()
    .send()?;
```

Local `crab dev` sends the request directly and logs a warning. Hosted rotation must be available on the deployment.

On a hosted deployment, rotating requests reserve Credit from the account that deployed the service. Usage and per-call cost include the request and response bytes handled by rotating egress. Insufficient Credit returns [E0095](/docs/errors/E0095). If hosted rotation is unavailable, the request returns [E0096](/docs/errors/E0096).
