Skip to main content

FreeAI::Server::OpenAI — OpenAI API server based on built-in AI model scrapers.

OpenAI Server

Overview of the scraper

The scraper provides the ability to deploy your own OpenAI-compatible API server, which you can connect to from your applications (e.g., Cherry Studio, Cline, etc.) and scripts — both through the official OpenAI SDK and using standard HTTP requests. The scraper offers access to free and paid models that A-Parser scrapes.

List of supported models:

Connecting to Cherry Studio

  • Settings (upper right corner)
  • List of providers, at the very bottom "add"
  • Set an arbitrary name, Provider type must be OpenAI
  • Enter API Key (any key)
  • Enter the host (configured in FreeAI::Server::OpenAI), initially http://127.0.0.1:3000
  • The "Manage" button adds the necessary models
View connection video

connection to cherry studio

Connection via OpenAI SDK

Connection to FreeAI::Server::OpenAI via nodejs + openai sdk
Example code
import OpenAI from "openai";

(async function () {
const openai = new OpenAI({
baseURL: "http://127.0.0.1:3000/v1", //Link under which FreeAI::Server::OpenAI is hosted
apiKey: "123",
});

const completion = await openai.chat.completions.create({
model: "FreeAI::ChatGPT", //Model - this is the name of the scraper from the FreeAI::Server::OpenAI list, the list of supported models is in the "Overview of the scraper" section
messages: [{ role: "user", content: "Why is the sky blue?" }], //Request to the model
});

console.log(completion.choices[0].message.content); //Output of the response from the AI model
})();

Getting results via HTTP request

Connection to FreeAI::Server::OpenAI via nodejs http request
Example code
const resp = await fetch("http://127.0.0.1:3000/v1/chat/completions", {
method: "POST",
headers: {
Authorization: "Bearer 123",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "FreeAI::ChatGPT", //Model - this is the name of the scraper from the FreeAI::Server::OpenAI list, the list of supported models is in the "Overview of the scraper" section
messages: [{ role: "user", content: "Usage areas of nodejs" }], //Request to the model
}),
});

if (!resp.ok) {
const text = await resp.text();
throw new Error(`HTTP ${resp.status}: ${text}`);
}

const data = await resp.json();
console.log(data.choices?.[0]?.message?.content);

Possible settings

Parameter nameDefault valueDescription
Listen Host127.0.0.1IP address or hostname of the interface on which the service accepts inbound connections
Listen Port3000Port number on which the service accepts inbound connections
FreeAI::ChatGPT presetdefaultPreset for FreeAI::ChatGPT scraper
FreeAI::Copilot presetdefaultPreset for FreeAI::Copilot scraper
FreeAI::DeepAI presetdefaultPreset for FreeAI::DeepAI scraper
FreeAI::GoogleAI presetdefaultPreset for FreeAI::GoogleAI scraper
FreeAI::Kimi presetdefaultPreset for FreeAI::Kimi scraper
FreeAI::Perplexity presetdefaultPreset for FreeAI::Perplexity scraper