Templates · AI

OpenAI API collection template

Responses, Chat Completions, embeddings, images and moderation with the OpenAI API.

What's inside

The main OpenAI endpoints: generate text with the Responses API or Chat Completions, create embeddings, generate an image, check content with moderation and list the models your key can use. Change model in the environment to try another one.

6 requests in 4 folders · Base URL https://api.openai.com/v1 · Bearer token

Set it up

  1. Open OpenAI API in Requestarium (or in the app: Import, Start from a template) and import it. You get the collection and a "OpenAI API" environment.
  2. Create a secret key at platform.openai.com/api-keys. Requests are billed to your OpenAI account.
  3. Fill in the environment, pick it in the environment menu and send the first request.

Environment variables

VariableWhat it is
openaiApiKeysecretSecret key, sk-…
modelModel for text requests; "List models" shows what your key can use.

Requests

Text

  • POST
    Create a response /responses

    The Responses API.

  • POST
    Create a chat completion /chat/completions

    Chat Completions with a system and a user message.

Embeddings and moderation

  • POST
    Create embeddings /embeddings

    A vector for search and clustering.

  • POST
    Moderate text /moderations

    Flags harmful content.

Images

  • POST
    Generate an image /images/generations

    Answers with a base64 image.

Models

  • GET
    List models /models

    Models your key can use; a quick way to check the key.