Mock behaviour
The response each platform returns in mock mode, and the headers that force a failure.
A mock response mirrors the provider's protocol, so parsing, streaming and error handling are exercised end to end without contacting the provider or consuming quota.
Responses by platform
| Platform | Non-streaming | Streaming |
|---|---|---|
| OpenAI, DeepSeek | A chat.completion body | chat.completion.chunk SSE events, terminated by data: [DONE] |
| Claude | A /v1/messages body | Named SSE events: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop |
| fal.ai (sync) | { images: [{ url }] } or { video: { url } } | SSE progress events, then the envelope |
| fal.ai (queue) | Submit, status, result and cancel, with the returned URLs rewritten to the /falqueue prefix | A status stream; status runs IN_QUEUE → IN_PROGRESS → COMPLETED |
| ByteDance Seedance | POST /contents/generations/tasks returns an id, and polling runs queued → running → succeeded, with the result at content.video_url | Not supported |
Response content
The text a mock returns comes from the key's mock configuration, set when the key was created. The request body is never echoed.
| Source | Behaviour |
|---|---|
custom | The configured text, returned verbatim |
random | The configured number of random tokens |
asset | An image or video uploaded to storage, returned as an absolute URL on this gateway's origin (https://<gateway>/api/mock-asset/<key>), matching the absolute-storage-URL shape the vendors return |
The model in a response is the one you sent — the mock neither guesses nor
substitutes a model name (including for models that have not been released). A
request without a model is rejected with 400 in the vendor's own error envelope,
the same as the real API, rather than answered with a placeholder name.
Media type
| Request path | Media type |
|---|---|
/chat/completions | text |
/images/generations | image |
| Anything else | The key's media type |
Simulated timing
Streaming and task responses are delayed to imitate the real thing:
| Stage | Duration |
|---|---|
| Text: time to first token | 350 ms |
| Text: interval between tokens | 18 ms |
| fal queue and Ark task: queued | 800 ms |
| fal queue and Ark task: running | 2 000 ms |
Headers that force a failure
| Header | Value | Effect |
|---|---|---|
x-mock-error | 100–599 | Returns that status with the platform's own error envelope |
x-mock-drop | 1 | Cuts the stream mid-flight, without the terminating event |
x-mock-drop | 0 | Never cuts the stream |
Without x-mock-drop, a stream is cut mid-flight, so reconnect logic is exercised
by default: a token stream truncates with a 6% chance, and a progress-reporting
media stream rolls its own chance at each step.
curl https://sluiceline.com/openai/chat/completions \
-H "Authorization: Bearer $SLUICELINE_MOCK_KEY" \
-H "x-mock-error: 429" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6-astra","messages":[{"role":"user","content":"hi"}]}'