meraGPT
ModelsDocsPricingBlogSign inTry Restyler 1

docs

  • Overview
  • Authentication
  • Restyle
  • Chat completions
  • Models
  • Errors and limits

links

  • Playground
  • Your API keys
  • Email support

endpoint

POST /v1/chat/completions

OpenAI-compatible, so existing client code works by changing two lines. It is a shim over a model that is not a chat model, and the places where that shows are listed below rather than left for you to discover.

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MERAGPT_API_KEY"],
    base_url="https://meragpt.com/v1",
)

resp = client.chat.completions.create(
    model="text-restyler-1",
    messages=[{"role": "user", "content": draft}],
)
print(resp.choices[0].message.content)

Where it differs from OpenAI

  • Only the last user message is used. There is no conversation to carry. Earlier turns and any system message are ignored, because concatenating them would build a prompt the model never saw in training and would make the output worse, not richer.
  • temperature, top_p and other sampling parameters are accepted and ignored. Decoding is fixed at greedy with a repetition penalty. Sampling measured worse on both naturalness and preservation, and greedy without the penalty degenerates into repetition loops. Requests are not rejected for sending them, so OpenAI client defaults work; the response says so in its meragpt block.
  • Streaming is block-level, not token-level. Each SSE chunk carries a whole paragraph rather than a token. Documents fill in from the top, which is what the streaming is for, but a progress bar keyed to token counts will move in jumps.
  • n, tools, logprobs and response_format are not supported. They have no meaning for a single-task rewrite model.

Response

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1788000000,
  "model": "text-restyler-1",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "The restyled document." },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 58,
    "completion_tokens": 49,
    "total_tokens": 107
  },
  "meragpt": {
    "blocks_rewritten": 1,
    "blocks_total": 2,
    "cost_nano_usd": 9150,
    "sampling": "fixed (greedy); temperature and top_p are ignored"
  }
}

The meragpt object is an addition to the OpenAI shape. Clients that do not know about it ignore it.

Streaming

stream = client.chat.completions.create(
    model="text-restyler-1",
    messages=[{"role": "user", "content": draft}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

The final chunk carries usage and the meragpt block. If something fails after the stream has opened, the status code is already sent, so the failure arrives as a frame containing an error object, check for it rather than assuming every frame is a delta.

Prefer /v1/restyle

/v1/restyle does the same work and reports per block what it rewrote, what it skipped and why. The chat envelope has nowhere to put that.

meraGPT© 2026
ModelsPlaygroundDocsPricingFAQTermsPrivacyhello@meragpt.com