Documentation

Learn how to integrate FineTune Studio into your applications

Quick Start

1

Create an Account

Sign up for a free account to get started.

2

Create a Model

Go to the Models page and create your first custom AI model with a system prompt.

3

Generate API Key

Create an API key from the API Keys page to authenticate your requests.

4

Make Your First Request

Use the API to send messages to your custom model.

Base URL

https://finetune-studio.onrender.com

Authentication

All API requests require authentication using your API key. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

API Endpoints

POST/api/chat/completions

Send a message to your custom AI model and receive a response.

Request Body:

{
  "model_name": "string",    // Your model name (e.g., "customer-support-bot")
  "messages": [
    {
      "role": "user",        // "user" or "assistant"
      "content": "string"    // Message content
    }
  ],
  "stream": false            // Optional: Enable streaming
}

Response:

{
  "id": "string",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "AI response here"
      }
    }
  ],
  "usage": {
    "total_tokens": 150
  }
}

Code Examples

cURL

curl -X POST https://finetune-studio.onrender.com/api/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "your-model-name",
    "messages": [
      {
        "role": "user",
        "content": "Hello, how can you help me?"
      }
    ]
  }'

Python

import requests

url = "https://finetune-studio.onrender.com/api/chat/completions"

headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

data = {
    "model_name": "your-model-name",
    "messages": [
        {"role": "user", "content": "Hello, how can you help me?"}
    ]
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

JavaScript (Fetch)

const url = 'https://finetune-studio.onrender.com/api/chat/completions';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model_name: 'your-model-name',
    messages: [
      { role: 'user', content: 'Hello, how can you help me?' }
    ]
  })
});

const data = await response.json();
console.log(data);

Node.js (Axios)

const axios = require('axios');

const url = 'https://finetune-studio.onrender.com/api/chat/completions';

const response = await axios.post(
  url,
  {
    model_name: 'your-model-name',
    messages: [
      { role: 'user', content: 'Hello, how can you help me?' }
    ]
  },
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  }
);

console.log(response.data);

Best Practices

Keep API Keys Secure

Never expose your API keys in client-side code or public repositories.

Use Environment Variables

Store API keys in environment variables, not in your code.

Handle Errors Gracefully

Always implement proper error handling for API requests.

Monitor Usage

Check your analytics dashboard regularly to track API usage and costs.

RAG - Custom Knowledge Base

Give your AI models custom knowledge by uploading documents. The system uses Retrieval Augmented Generation (RAG) to automatically find and use relevant information from your uploaded files.

Supported File Types

📄 PDF

Documents, manuals, reports

📝 TXT

Plain text, documentation

📊 CSV

Data tables, spreadsheets

How It Works

1

Upload Documents

Edit your model and upload PDF, TXT, or CSV files with your custom knowledge

2

Automatic Processing

Documents are split into chunks and converted to vector embeddings

3

Smart Retrieval

When users chat, relevant context is automatically retrieved and used

💡 Use Cases: Customer support FAQs, product documentation, API references, company policies, technical manuals, knowledge bases, and more!

Rate Limits

Starter Plan

₹0

5K requests/month

Pro Plan

₹5,999

1M requests/month

Enterprise

Unlimited

custom limits

Need Help?

If you have questions or need assistance, we're here to help!