Talk to a model through your gateway
Paste your Penstoke key, pick a model, and have a conversation — streamed as it is written, with what each turn cost beside it. Every message is a real call on your own key and your own budget. Checking one endpoint instead? The playground takes a single request apart. No key yet? A trial needs no card.
Held in this page's memory and nowhere else. Sent straight to the gateway, never to penstoke.com. Reload and it is gone.
Change it for your own domain, your account's own address, or a deployment you run yourself. https only, except localhost.
Settingsauto · 1024 tokens · streaming
Free text until a key is pasted above. Then this becomes the list that key can actually reach.
Per answer.
Streaming shows the answer as it is written and is the only way to measure time to first token. It costs you two figures: a stream's headers are sent before the provider has finished, so there is no cost and no gateway latency in them. Turn it off and both come back, but you wait for the whole answer in silence.
System prompt · none
One per conversation, and it goes up with every turn. Changing it now changes every answer from here on — the ones already on screen were given under the old one, and they stay as they were said.
The conversationnothing sent yet
Ask it something
Every answer arrives with what it cost and how long it took, from the gateway that served it.
AI playground questions
- How is this different from the playground?
- They answer different questions. /playground is a request inspector: you pick one of the nine endpoints an API key reaches — across the AI, storage and push gateways — send a single request, and read the result apart header by header. /ai-playground is a conversation: only the chat endpoint, called repeatedly, with the answer streamed in and the figures for each turn under it. Use the first to find out whether a key, a scope or a path works; use this one to find out what talking to a model through the gateway actually feels like and costs. Both are public, both run in your browser on a key you paste, and neither stores anything.
- Is my API key stored anywhere?
- No. It is held in the page's memory for as long as the tab is open and nowhere else: not in localStorage, not in sessionStorage, never in the URL, and never sent to penstoke.com. Every request goes straight from your browser to the gateway host you name, cross-origin and without cookies, so the key reaches the gateway and nothing else. Reload the page and both the key and the conversation are gone. The curl block writes the key as $PENSTOKE_KEY rather than the pasted value, so a copied command carries no credential.
- Why does each turn of a conversation cost more than the last?
- Because a chat completion endpoint remembers nothing between calls. Every turn has to carry the entire conversation back up to the model — the system prompt, every question you have asked and every answer you have been given — so the request grows by two messages each exchange. Your tenth question might be four words long and still be the largest request of the session, and its prompt tokens are what you pay for. The page counts the messages it sent for each turn and totals the tokens and cost for the whole conversation, so you can watch it happen rather than take our word for it. The usual answers are to summarise older turns, drop them, or cache the prompt prefix where the provider supports it.
- Why is there no cost or latency figure on a streamed answer?
- Because at the moment those headers are written, neither figure exists. A streamed response's headers go out before the provider has said a word: the gateway cannot price a call whose tokens have not been counted or time a provider that has not finished, so it omits X-Gateway-Cost-Usd and X-Gateway-Latency-Ms rather than sending a zero that would read as free and instant. What you get instead is time to first token, which only a stream can give you. Turn the Stream toggle off and the call comes back as one JSON response with both figures present. That is the trade, and it is why the toggle exists rather than being decided for you.
- Which models can I talk to?
- Whichever ones your key is allowed to reach, which is a question only the gateway can answer. As soon as a key is entered the page calls GET /v1/models with it and offers exactly what comes back: the routing aliases you have defined, the provider models permitted on that endpoint, and auto for the endpoint's default. That call reaches no provider and costs nothing. A model configured without real provider credentials is marked, because a turn against it comes back stamped as a dry run — validated, priced and logged, with nothing sent upstream. If the list does not name what you want, the field takes free text: an alias, a provider-qualified id such as openai/gpt-4o-mini, or a bare model id.
- What happens if I stop an answer part way through?
- The page closes the connection from your browser and keeps the text that had already arrived, labelled as stopped. The provider generated that much and will bill you for it, and the gateway logs the turn as a client-closed stream — stopping a stream is not a refund. The partial answer stays in the conversation and goes up as part of the next turn's context, which is what continuing from a half-finished answer means. If you would rather it had not happened, edit your question and re-run from there, or regenerate the answer: both drop everything after that point.
One key, one conversation, and the real number at the end of it.
Start free trial14 days, no card. Make a key, bring it back here, and talk to a model through it. Want to check a single endpoint instead? The playground sends one request and takes the answer apart.