We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

Quickstart

Getting started

Quickstart

Create an api14 API key, install the OpenAI SDK and send your first request to a model in under a minute, with copy-paste code.

Try it in the playground

Make your first request to api14 with the official OpenAI SDK. It takes three steps and about a minute.

Create an API key

Sign in and open API keys. Click Create key, give it a name and copy the key. Keys start with sk-api14- and are shown only once, store it somewhere safe, such as an environment variable:

export API14_API_KEY="sk-api14-..."

New accounts start with a small free USD balance on the Free plan, enough to try cheap models. Add funds or pick a plan on the pricing page whenever you need more.

Install the SDK

Use the official OpenAI SDK for your language. Nothing else is needed.

npm install openai
pip install openai

Other languages (Go, PHP, Java, C#, Ruby and Rust) are covered in the SDK guides, for example Go and C# /.NET.

Make a request

Point the client at https://api14.com/api/v1 and pass your key. This example streams the answer token by token:

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const stream = await client.chat.completions.create({
  "model": "openai/gpt-5-mini",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ],
  "stream": true
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

That's it, every other model works the same way. Change model to any id from the models page, for example anthropic/claude-sonnet-4.5 or google/gemini-2.5-flash.

Model ids use the provider/model format, for example openai/gpt-5-mini, and support variants like :free, :online and :nitro. See Model ids & variants.

Without streaming

Leave out stream to get the full answer in one JSON response:

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const result = await client.chat.completions.create({
  "model": "openai/gpt-5-mini",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

The response follows the OpenAI chat completion shape:

{
  "id": "gen-1759571234-abc123",
  "object": "chat.completion",
  "model": "openai/gpt-5-mini",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Requests fly,\nJSON returns..." },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 14, "completion_tokens": 21, "total_tokens": 35, "cost": 0.0000455 }
}

usage.cost is the price of the request in USD, the amount debited from your balance.

Next steps