Xalora AI Docs
  • Getting Started
    • Welcome to Xalora
  • Agent Framework
    • Social Agents
  • Xalora Mesh
  • Ecosystem
    • Xalora Imagine
  • imaginaries NFT
  • Developer Reference
    • Integration Overview
  • Supported Models
  • Understanding Image Prompting
  • Using Xalora API with Eliza
  • REST API
    • Xalora Mesh API
  • Synchronous Request
  • Image Generation API
  • Xalora SDK
    • Introduction
  • Getting Started
  • Basic Image Generation
  • SmartGen
  • ComfyUI Workflow
  • FluxLora Workflow
  • Text2Video Workflow
  • LLM Gateway
    • Introduction
  • LLM Tool Calling
  • Embeddings
Powered by GitBook
On this page
  • ​Install
  • ​Authentication
  • ​Initialization

Getting Started

PreviousIntroductionNextBasic Image Generation

Last updated 7 days ago

Getting Started with Xalora API

Install

To get started with the Xalora SDK, you need to install it in your project. The SDK is available via npm, simply follow the instructions to set up the SDK and begin interacting with Xalora in no time.

Recommend using pnpm for installation.

  • npm

  • pnpm

  • yarn

  • bun

Copy

npm i xalora

Authentication

The Xalora API requires authentication using an API key. API keys are used to verify your identity when making requests to the API. Keep in mind the following important points:

  • Keep your API key secure! Your API key is sensitive information and should not be shared with others. It must never be exposed in client-side code or in any publicly accessible location (e.g., browser code, repositories).

  • Secure your key with backend services: It’s recommended to store your API key in a secure location such as environment variables or key management services (KMS) on your backend server.

Example Authentication Flow

To authenticate your application, you will need to pass the API key to the Xalora SDK in your code. Here’s how you can set up authentication:

Copy

import Xalora from 'xalora'

const xalora = new Xalora({
  apiKey: process.env['XALORA_API_KEY'], 
})

Initialization

​
​
​
​