>_
API

LLM API Playground

Send requests to OpenAI, Anthropic, DeepSeek, OpenRouter, Ollama or any OpenAI-compatible API with your own key. Watch streaming output, time to first token, usage, tool calls and structured output — and copy the request as curl.

Runs locally — your input never leaves this page.

Requests go directly from your browser to the provider you choose. codes.im never receives your prompt or API key.

Tools & structured output
 

How to use

  1. Pick a provider (or “Custom” for any OpenAI-compatible endpoint), check the base URL and model, and paste your API key.
  2. Write a system prompt and a user message, then press Send (⌘/Ctrl + Enter).
  3. Watch the reply stream in, with status, time to first token, total time, finish reason and token usage below.
  4. Open “Tools & structured output” to test function calling or a JSON Schema response. Switch to “Raw” to see the exact SSE events, or “curl” to copy the request (with the key masked).

FAQ

Where does my API key go?

Only to the provider you selected — the request is made directly by your browser. codes.im has no server that sees it. The key is kept in memory and, only if you tick “Remember in this tab”, in session storage, which is cleared when the tab closes.

Why does the request fail with a network error?

Usually CORS: the provider has to allow requests from a web page. Anthropic does when a special header is sent, which the tool adds automatically. If a provider or self-hosted gateway rejects browser requests, use the copied curl command instead. For a local Ollama, start it with OLLAMA_ORIGINS set to allow this site.

How do tools and structured output map between providers?

Paste tool definitions in either OpenAI or Anthropic format — they are converted automatically. A JSON Schema becomes response_format for OpenAI-compatible APIs and a forced respond tool for Claude.

Report a bug or suggest a feature →