socket.help

Mock LLM endpoint

Return scripted assistant text through an OpenAI Chat Completions or Anthropic Messages endpoint, with optional SSE streaming.

Try the response

Create an endpoint, then preview the assistant message and protocol events here.

About Mock LLM endpoint

Create a scripted text-only stand-in using OpenAI Chat Completions or Anthropic Messages HTTP shapes. Preview ordinary JSON, paced SSE or a stream that ends before completion. Responses come from your configuration; token usage is estimated.

When to use it

Test model-client parsing, loading states and incomplete streams using a configured assistant response.

Mock LLM endpoint example
POST /api/mocks
{"name":"Scripted assistant","routes":[],"llm":{"provider":"openai","model":"socket-mock","text":"The test passed.","intervalMs":20}}

POST /mock/{id}/v1/chat/completions
{"model":"socket-mock","messages":[{"role":"user","content":"Hello"}],"stream":true}

How to use it

  1. Select the provider format and model label, then write the response text.
  2. Create a private or public endpoint and test its response in the preview.
  3. Point your SDK at the displayed base URL, send credentials in headers, and inspect calls.

Limits & privacy

Up to 8,192 characters, 128 text chunks, five seconds per stream and 16 concurrent streams. Does not execute models, tools, images, audio or reasoning. A mock resource starts with a one-hour lifetime and follows normal account quotas and lifecycle rules. Private credentials are separate from URLs. Use synthetic prompts because calls are captured for inspection.

Use this tool from the API reference or connect through the SDK, CLI, SSH, or MCP. Hosted calls share your plan allowances.