OpenAI API
openai · AI
APIs for sampling from and fine-tuning language models
Authentication
Sample Requests
Returns a list of files that belong to the user's organization.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/openai.com/1.2.0/files"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/openai.com/1.2.0/files",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/openai.com/1.2.0/files'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/openai.com/1.2.0/files"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/openai.com/1.2.0/files")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/openai.com/1.2.0/files";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));List your organization's fine-tuning jobs
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/openai.com/1.2.0/fine-tunes"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/openai.com/1.2.0/fine-tunes",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/openai.com/1.2.0/fine-tunes'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/openai.com/1.2.0/fine-tunes"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/openai.com/1.2.0/fine-tunes")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/openai.com/1.2.0/fine-tunes";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Lists the currently available models, and provides basic information about each one such as the owner and availability.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/openai.com/1.2.0/models"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/openai.com/1.2.0/models",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/openai.com/1.2.0/models'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/openai.com/1.2.0/models"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/openai.com/1.2.0/models")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/openai.com/1.2.0/models";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with OpenAI API?
OpenAI API is a AI API. Developers commonly use ai APIs for:
- adding natural language processing to your product
- generating images, text, or code with AI models
- building chatbots and virtual assistants
- running sentiment analysis on customer feedback
- powering recommendation and personalisation engines
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. OpenAI API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?