Logo
OpenAI API Documentation

ChatGPT API

Number of APIs: 64


Welcome to the OpenAI API Qodex Collection! This collection provides a comprehensive set of examples to help you get started with the OpenAI API. Easily walkthrough multiple usecases, API Capabilities, and OpenAI's assistant APIs.

Note: This isn't OpenAI's official collection. Learn how to contribute to this workspace and collections [here]

The OpenAI API provides a simple interface for developers to create an intelligence layer in their applications powered by OpenAI's state-of-the-art models. The [Chat Completions ] endpoint powers ChatGPT and provides a straightforward way to generate text responses.

Getting Started

To get started with working with OpenAI APIs, you need to first be authorized to access their APIs.

Step 1: Setup your account

Create an OpenAI account or sign in to an exisitng one.

Step 2: Fetch your API key

Next, navigate to the API keys page and click on the Create new secret key button.

Give your key a name, select a project, and configure all relevant permissions for this API key.

Create the secret key.

Once the Secret Key is created, copy it to your clipboard by clicking the copy button and select Done to close the open prompt.

Step 3: Configure the API Key in Qodex

Qodex provides you with a Vault that let's you store sensitive data locally. Data stored in this vault is not synced with Qodex Cloud and can only be accessed in your local Qodex Instance.

We recommend using [Qodex Vault] to store sensitive data.

Store your Secret Key in a Qodex Vault. A reference to a secret {{vault:openai-secret-key}}} has been added to the [collection authorization tab] as a Bearer token. You can use this variable name in your vault or update the variable in the authorization tab accordingly.

ChatGPT API Use Cases

  • [Text Generation]

  • [Function Calling]

  • Build a simple FAQ system

    • [Create Embeddings of FAQ Answers]
    • [Create Embedding of User Input]

ChatGPT API Capabilities

  • [Chat Completions]

  • [Embeddings]

  • Fine Tunning

    • [Upload Training File]
    • [Create a Fine Tuning Job]
    • [Enable Weights and Biases Integrations]
    • [List Fine Tuning Jobs]
    • [List Fine Tuning Events]
    • [List Fine Tuning Checkpoints]
    • [Retrieve Fine Tuning Jobs]
    • [Cancel Fine Tuning Jobs]
  • Batch API Requests

    • [Get Batches]
    • [Retrieve Batch]
    • [Cancel Batch]
    • [List Batch]
    • [Create Image Variation]
  • Files

    • [Upload Files]
    • [List Files]
    • [Retrieve File]
    • [Delete File]
    • [Retrieve File Contents]
  • Image Generation

    • [Generate Image]
    • [Create Image Edit]
  • Models

    • [List Models]
    • [Retrieve Models]
    • [Delete Fine Tuned Model]
  • [Moderations]

ChatGPT Assistants API

  • [Create Assistant]

  • [List Assistant]

  • [Retrieve Assistants]

  • [Modify Assistants]

  • [Delete Assistants]

  • Threads

    • [Create Thread]
    • [Retrieve Thread]
    • [Modify Thread]
    • [Delete Thread]
    • Messages

      • [Create Message in a Thread]
      • [List Messages in a Thread]
      • [Get Message in Thread]
      • [Modify Message in Thread]
      • [Delete Message in Thread]
    • Runs

      • [Create Thread and Run]
      • [Create Run]
      • [List Run]
      • [Get Run]
      • [Modify Run]
      • [Submit Tool Outputs]
      • [Cancel Run]
      • [List Run Steps]
      • [Get Run Steps]
      • [Create Thread]
      • [Retrieve Thread]
      • [Modify Thread]
      • [Delete Thread]
  • Vector Store

    • [Create Vector Store]
    • [List Vector Stores]
    • [Retrieve Vector Store]
    • [Modify Vector Store]
    • [Delete Vector Store]
    • Vectore Store Files

      • [Create Vectore Store File]
      • [List Vector Store File]
      • [Get Vector Store File]
      • [Delete Vector Store File]
      • Batches

        • [Vector Store File Batch]
        • [Get Vector Store File Batch]
        • [Cancel Vectore Store File Batch]
        • [List Vector Stores in a Files Batch]


1. ChaptGPT API - Use Cases-Build a Simple FAQ System - Embeddings API - Create Embedding of User Input

POST https://api.openai.com/v1/embeddings



2. ChatGPT API Capabilities-Chat Completions - Chat Completions

POST https://api.openai.com/v1/chat/completions



3. ChaptGPT API - Use Cases-ChatGPT - Function Calling - Chat Completions with Function Calling

POST https://api.openai.com/v1/chat/completions



4. ChatGPT API Capabilities-Embeddings - Embeddings

POST https://api.openai.com/v1/embeddings



5. ChatGPT API Capabilities-Fine Tuning - Enable Weights and Biases Integration

POST https://api.openai.com/v1/fine_tuning/jobs

ENDPOINTS