Skip to content
Docs

Versioning and changes

How the ewpire API is versioned, what counts as a breaking change, how long an older version keeps working and how changes are announced.

Updated

The version of the ewpire API is part of its address. Every endpoint lives under /v1:

Base URL: https://ewpire.com/api/v1

There is one version, v1. No version header or date is sent with a request: the path is all of it.

What v1 is

  • Requests and answers follow the OpenAI chat completions format. Where ewpire differs is listed in Chat.
  • Every error has one shape, an error object with message, type, param and code, described in Errors.
  • An address under /v1 that does not exist answers 404 with the code not_found in that same shape.
  • A parameter the API does not support is refused with 400 unsupported_parameter, not ignored.

The endpoints, their parameters and their answers are also published as an OpenAPI 3.1 document at /openapi.json.

Changes that can appear without notice

Additive changes are made inside v1 and can appear at any time:

  • a new endpoint;
  • a new optional request parameter, or a new accepted value of an existing one;
  • a new field in an answer, a new response header, or a new error code under an existing status.

Write your client so that it ignores fields it does not know and handles an error code it does not know by its HTTP status.

Breaking changes

A change that would break a client written for v1 is not made inside v1: it gets a new version prefix, /v2, next to it. Breaking means removing or renaming a field, changing its type, making an optional parameter required, or changing what an existing parameter, status or error code means.

When a new version is published, the version before it keeps working for at least 90 days. From the day the new version is published until the older one stops answering:

  • every answer of the older version carries a Deprecation header and a Sunset header with the date it stops answering;
  • the change and that date are announced in the changelog and by e-mail to the owner and admins of every workspace with an active API key.

There is one exception: a change that closes a security hole can be made at once, inside the current version, when waiting would put customers or ewpire at risk. It is announced the same day, in the changelog and by e-mail.

The Terms of Service apply to the API as they do to the rest of ewpire.

What is not versioned

The model catalog is not part of the version. Models are added and removed, and their prices change, without a new version and without notice: a model can leave, for example when its developer retires it. auto is never removed. Read GET /models rather than hard-coding a list, and handle 404 model_not_found, or send "model": "auto". See Models.

The limits in these docs – requests per minute and the size of a request – can be adjusted without a new version as well. See Rate limits.

Where changes are announced

Changes to the API are listed by date in the changelog, together with changes to the rest of ewpire. A breaking change and the end of an older version are also announced by e-mail and in the answers' headers, as described under Breaking changes. The day each section of these docs last changed is printed under its title.