How can i get started with GPT-4.0 API

I’m invited to use GPT-4 API, I’ve created a new API key, but how can I know this API key is used for GPT-4 or 3.5?
Besides, what should I get started if I want to train my own model?
Appreciate any response.

Start by reading the docs here:

Wonderful! thanks Curt! I’ll try.

1 Like

I wrote a quick detailed guide here as well of how to do an API request using Javascript to Chat GPT-4 - let me know if helpful. See code example below:

const { Configuration, OpenAIApi } = require("openai");

  const configuration = new Configuration({
    apiKey: "<INSERT-API-KEY-HERE>",

  const openai = new OpenAIApi(configuration);

  const response = await openai.createChatCompletion({
    model: "gpt-4",
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Who won the world series in 2020?" },
      { role: "assistant", content: "The Los Angeles Dodgers." },
      { role: "user", content: "Where was it played?" },
    max_tokens: 50,
    n: 1,
    stop: null,
    temperature: 1,