Skip to content

AI & LLM

OpenAI mock API

Stateful OpenAI API replica: models, chat completions (tools, stored completions, streaming body), responses, embeddings, files, batches, moderations and signed Standard Webhooks events.

At a glance

Operations
388
Stateful operations
19
Stateful resources
7
Webhook events
3
Vendor API version
2.3.0
Verification
Spec-verified

How it works

Use OpenAI without calling OpenAI OpCo, LLC

Authorization: Bearer sk-MockApiKey0123456789

State

Resources that remember

Writes persist per caller, so a create followed by a read returns what you created.

ResourceOperations
Models2
Chat completions4
Responses3
Embeddings1
Files5
Batches4
Moderations1

Webhooks

Events your handlers can receive

Deliveries are signed with the svix scheme, so your verification code runs unchanged.

Coverage

388 operations

19 of them are stateful. The largest groups:

GroupOperations
Other operations368
Files5
Batches4
Chat completions4
Responses3
Models2

Verification

Spec-verified

Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.

1 operations cannot be checked against the specification.

Source and limits

License, source and limits

Each collection holds up to 1 MiB of objects per API key; writes beyond that are dropped (x-maxoperf-vs-state: capacity). Only the listed resources are stateful; the many other (incl. beta) operations answer with schema-valid stateless responses. Chat completions are deterministic mock replies ("Mock reply to: <last user message>", echoed in full, not truncated), usage is derived from character counts, and stream:true is rendered as one text/event-stream body (data: chunks then data: [DONE]) without timed chunks. Embeddings are constant unit vectors (1536 dims for text-embedding-3-small, 3072 for -large). File uploads above 1 MiB are rejected by the runtime with 413 (VS_MAX_BODY_BYTES) and file content downloads are a stub. Batches and background responses advance by elapsed time and send signed Standard Webhooks events (response.completed, batch.completed, batch.cancelled). Eval operations answer with fixed, schema-valid sample bodies (read-only). Unknown models answer 404 model_not_found except the literal id "string" (the stand-in id of spec-sampled requests). A batch cancelled before it completes still emits batch.completed after its delay. No real model inference or rate limiting.

MaxoPerf is not affiliated with, endorsed by, or sponsored by OpenAI OpCo, LLC. OpenAI is a trademark of its owner.