TS/JS
Installation
$ npm install jamaibase@latestUsage
Create API Client
Create an API client with baseURL:
import JamAI from "jamaibase";
const jamai = new JamAI({ baseURL: "http://localhost:5173/" });Create an API client with API key and project id:
import JamAI from "jamaibase";
const jamai = new JamAI({ apiKey: "jamai_apikey", projectId: "proj_id" });Create an API client with custom HTTP client:
import axios from "axios";
import JamAI from "jamaibase";
const httpClient = axios.create({
headers: {
Authorization: `Bearer ${credentials}`,
"Content-Type": "application/json"
}
});
const jamai = new JamAI({
baseURL: "https://api.jamaibase.com",
httpClient: httpClient
});Create an API client with max-retry and timeout:
Configure httpAgent / httpsAgent
Imports
Types
Using the Client
Constructor Parameters for APIClient Configuration
Parameter
Type
Description
Default Value
Required
SDK
Last updated
Was this helpful?