OpenAI API

developers.openai.com ↗

Call OpenAI models and tools from an application through the developer API.

SI Score
80/100
Pricing
Pay-As-You-Go AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Required AI reading, not confirmed

Ask SI about OpenAI API

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the OpenAI API homepage

What it does

The OpenAI API exposes model capabilities to software through HTTP endpoints and official SDKs. Its quickstart focuses on creating an API key, storing it in an environment variable, and making a first Responses API call. Developers can use it to add text generation and other documented model capabilities to their own products rather than using the ChatGPT interface directly.

Make a small first request

The quickstart begins with an API key from the developer dashboard. It recommends keeping the key in an environment variable so an SDK can read it without putting the credential directly in source code. The documented JavaScript request has this shape:

const response = await client.responses.create({
 model: "gpt-6-astra",
 input: "Write a one-sentence bedtime story about a unicorn."
});
console.log(response.output_text);

Treat that as an example, not an executed request. Choose a model and request fields that match the application, then handle errors and output according to the API reference.

The API is a metered service, not an editor or a bundled ChatGPT plan. Official pricing lists rates by model and token type, with separate pricing for some tools and storage features. That makes model selection and input/output volume part of application design. Do not estimate cost from a single prompt; check the current model table and the particular tools the application calls.

Strengths

  • The quickstart demonstrates an API key, SDK client, and Responses API request.
  • Pricing documentation distinguishes models and token types.

Watch out for

  • API usage is billed by model and usage unit, so a workload’s cost depends on the requests and tools it sends.
  • Applications must protect API keys and handle the API response and errors themselves.

Best for

  • Adding model-backed text or tool workflows to a software product
  • Prototyping an API integration with an official SDK

Sources