```python
import os
from groq import Groq

client = Groq(api_key=os.environ.get("GROQ_API_KEY"))

# Initial request - gets first page of batches
response = client.batches.list()
print("First page:", response)

# If there's a next cursor, use it to get the next page
if response.paging and response.paging.get("next_cursor"):
    next_response = client.batches.list(
        extra_query={
            "cursor": response.paging.get("next_cursor")
        }  # Use the next_cursor for next page
    )
    print("Next page:", next_response)
```

---

## Batch: Retrieve (js)