Quick Start Guide
Quickstart
Integrate Reliant in less than 10 minutes. You will need your API key — available in the dashboard Settings.
1
Install the SDK
Available for JavaScript/TypeScript and Python.
bash
# JavaScript / TypeScript
npm install reliant-js
# Python
pip install reliant-py
2
Initialize the client
Use your API key available in Settings.
typescript
import { Reliant } from 'reliant-js'
const reliant = new Reliant({
apiKey: 'rel_...', // your API key
baseUrl: 'https://reliant-production.up.railway.app',
})
python
from reliant import Reliant
client = Reliant(
api_key="rel_...", # your API key
base_url="https://reliant-production.up.railway.app"
)
3
Create a Schema
Define the output contract you expect from the LLM. You can do it via the Dashboard or in code.
typescript
const schema = await reliant.createSchema({
name: 'Contact Extraction',
slug: 'contact-extraction',
definition: {
type: 'object',
required: ['name', 'email'],
properties: {
name: { type: 'string' },
email: { type: 'string', format: 'email' },
phone: { type: 'string' },
},
},
safe_fallback: {
name: null,
email: null,
phone: null,
},
})
console.log(schema.id) // sch_abc123
4
Execute with reliability
Replace your direct LLM call with reliant.execute(). The output will always arrive in the correct format.
typescript
const result = await reliant.execute({
prompt: 'Extract data: John Smith, john@email.com, 11999999999',
schemaId: schema.id,
provider: 'anthropic',
model: 'claude-sonnet-4-20250514',
})
console.log(result.output)
// { name: 'John Smith', email: 'john@email.com', phone: '11999999999' }
console.log(result.metadata)
// {
// execution_id: 'exec_...',
// status: 'success',
// attempts: 1,
// latency_ms: 743,
// tokens_used: 218,
// }
5
Monitor in the Dashboard
Go to the Dashboard to see all executions, success rate, latency and tokens consumed in real time.
Tip: Use safe_fallback to define what to return when all retries fail. This ensures your application never breaks even in extreme scenarios.