Skip to content

API reference

Use the i14 API to send prompts to models hosted by i14 and use their generated output in your application. This reference shows which endpoint to call, what to send, and how to read the response.

  1. Get access. Create an i14 API key in the i14 Platform once you have access. See how to get your key if you have a referral code or need to join the waitlist.
  2. Choose a model and endpoint. List the model IDs your key can use. Start with Chat Completions to send a list of messages and get an answer. If your application already uses Responses or Anthropic Messages, check that your model supports that endpoint before switching.
  3. Make a first request. Follow the Quickstart for a small Chat Completions request with cURL, PowerShell, or Python. You can also configure the OpenAI SDK for i14.
  4. Build on the first call. Stream output to display it as it arrives, let your application run functions on supported models, or send longer prompts and run requests in parallel.
Method and path Use it to
GET /v1/models Discover the model IDs available to your key.
POST /v1/chat/completions Generate an answer from a conversation as a list of messages.
POST /v1/completions Generate from a plain text prompt using the legacy OpenAI format.
POST /v1/responses Send input items and receive output items, which may include text or function calls. On i14, the server does not store responses.
POST /v1/messages Use the Anthropic Messages format on a supported model.
POST /v1/messages/count_tokens Count input tokens through the Anthropic format on a supported model.

A model ID returned by Models tells you that your key can access that model, not which endpoints or features it supports. OpenAI or Anthropic compatibility describes the formats on the routes above. It does not imply support for their other APIs, hosted tools, or stored conversations.

Use an API key from i14, not a key from OpenAI or Anthropic. Keep it on your server in an environment variable or secrets manager. Do not expose it in browser or mobile app code, or commit it to source control. For key creation and rotation, see Authentication.

Header When to send it
Authorization: Bearer YOUR_API_KEY The usual way to send your i14 key.
x-api-key: YOUR_API_KEY An alternative for clients that send the key in this header. Either header works on both OpenAI-compatible and Anthropic Messages routes. Send one per request.
Content-Type: application/json Send it with JSON request bodies.
X-Session-ID Optional on deployments that support session affinity. It does not store your conversation.

Use https://api.i14.ai/v1 as the OpenAI SDK base URL. For the Anthropic SDK use https://api.i14.ai, without /v1: that SDK adds it. The HTTP examples in this reference show the complete URLs.

Start with the HTTP status and error body. If you contact i14, include the endpoint, model ID, UTC time, and response x-request-id when present. Do not send your API key or prompt.

HTTP status What to check
400 Check the JSON, required fields, and whether the model accepts the requested endpoint and features.
401 Check that you sent a valid i14 key. See Authentication.
403 Check that the model ID is listed for your key.
413 Reduce the request size.
429 Reduce concurrent requests or retry after the indicated delay. Respect Retry-After when present.
502, 503, 504 The upstream service may be unavailable or timed out. Use bounded backoff for transient failures.

OpenAI-style errors contain an error object with a message and type. Check its code when present rather than parsing the message. The Messages routes return an Anthropic-style error object.

HTTP 200 does not guarantee a stream completed. Check the terminal event and in-stream errors before treating output as final.