The Quick Start guide is designed to help users or developers quickly begin using the 4EVER AI RPC API by covering model costs with API keys. Whether you prefer using curl commands or the , this guide will walk you through the necessary steps to integrate and utilize the API effectively.
Getting Started
To get started with 4EVERLAND AI RPC API, follow these simple steps:
Obtain your from 4EVER AI RPC.
Review the Request documentation to familiarize yourself with all possible parameters and endpoints.
Choose your preferred method of integration: using curl commands or the OpenAI SDK.
API Example
Below is an example of how to make a request using the AI RPC:
typescript
fetch("https://ai.api.4everland.org/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_API_KEY}`,
"HTTP-Referer": `${YOUR_SITE_URL}`, // Optional
"X-Title": `${YOUR_SITE_NAME}`, // Optional
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "google/gemini-pro-1.5",//choose a model
"messages": [
{"role": "user", "content": "What is the meaning of life?"},
],
"top_p:" 1, //Optional parameter
"temperature:" 1, //Optional parameter
"repetition_penalty:" 1, //Optional parameter
})
});