Sentient AI
Make your First Request
Send your first request to Sentient AI and get a response before your coffee cools down.
Making an API request is as easy as it sounds like. All API endpoints use the POST method to ensure a consistent and structured interaction with the system. To get started, send a request with the required headers and body parameters to communicate with the AI model.
Note: Content type for all Endpoint is application/json.
Note: Content type for all Endpoint is application/json.
Authentication
To access the API, every request must include an authentication token in the headers. The API uses Bearer Token Authentication, meaning you need to provide a valid API key in the Authorization header.
Required Headers
Header | Description | Example Value |
---|---|---|
Content-Type | Specifies the format of the request body. Must be application/json | application/json |
Authorization | Bearer token used for authentication. Replace <API_KEY> with your actual API key. | Bearer <API_KEY> |
Example Headers
Rendering CodeMaking the Request
The base URL for all request endpoints is https://dev.flubel.com/api/. As mentioned above For all routes, you have to authenticate with the header Authorization.
The request can be sent via any language with no limitations.
Code
index.js
const fetch = require('node-fetch');
fetch('https://dev.flubel.com/api/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ',
},
body: JSON.stringify({
model: 'sentient-70B-V',
messages: [{ role: 'user', content: 'Write a limerick about the wonders of GPU computing.' }]
})
})
.then(res => res.json())
.then(data => console.log(data.choices[0].message))
.catch(error => console.error('Error:', error));
Once the code is executed you will in return get a JSON response. The latency depends on your network speed but is generally around 5 - 30 seconds.
The request must always include the method, headers, and body (JSON). Key parameters like model and prompt/messages are essential in the body, while the Authorization header is mandatory to authenticate your request. Ensuring these components are correctly structured is crucial for a successful API call.
The API must be active and Account health should be above 50% in order for the request to return a response of 200.
The request must always include the method, headers, and body (JSON). Key parameters like model and prompt/messages are essential in the body, while the Authorization header is mandatory to authenticate your request. Ensuring these components are correctly structured is crucial for a successful API call.
The API must be active and Account health should be above 50% in order for the request to return a response of 200.
PreviousStep 1 - Obtain API Key
On this Page
Making the Request
Authentication
Required Headers
Example Headers
Making the Request
Code