API Playground
Test the API directly in your browser with live examples
The API playground at /playground lets you test the Archipelag.io API directly in your browser with live, streaming responses.
Overview
The playground is designed for exploring the API before integrating it into your application. It shows the current number of online Islands and provides ready-to-copy code examples.
Chat mode
Enter a text prompt and see a live streaming response from the network. The response displays:
- Real-time token-by-token output
- Total token count
- Response timing
This is the same endpoint used by the chat interface and the REST API.
Image generation mode
Enter a text prompt to generate an image. The playground shows:
- Generation progress
- The completed image
- Credit cost for the request
Code examples
The playground generates ready-to-use code for your request in multiple languages. Toggle between:
| Language | Format |
|---|---|
| Python | Uses the archipelag SDK |
| JavaScript | Uses the @archipelag/sdk package |
| cURL | Direct HTTP requests |
Each example includes your API key (if signed in) and the exact parameters used. Click to copy any example.
Live host count
The playground header shows the current number of online Islands on the network. This gives you a sense of available capacity before sending requests.
Python SDK
Full Python SDK documentation
JavaScript SDK
Full JavaScript and React SDK documentation
