Quick Start
This guide will help you make your first API call in 5 minutes. TK-NovaLink is fully compatible with the OpenAI API format.
Step 1: Register an Account
Visit the TK-NovaLink website and register a new account. After registration, log in to the console.
text
1. Visit https://tk-novalink.com/register
2. Enter a username and password to sign up
3. Log in and go to the consoleStep 2: Get Your API Key
After logging in, go to the Tokens page to get your API Key. The key starts with sk-. Keep it secure.
http
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxAPI Base URL
The TK-NovaLink API Base URL is as follows:
| Environment | Base URL |
|---|---|
| Production | https://api.tk-novalink.com/v1 |
| Backup | https://api-backup.tk-novalink.com/v1 |
Step 3: Make Your First Request
Use cURL to make your first API call:
bash
curl -X POST "https://api.tk-novalink.com/v1/chat/completions" \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"max_tokens": 1024
}'Python Example
python
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxx",
base_url="https://api.tk-novalink.com/v1"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
max_tokens=1024
)
print(response.choices[0].message.content)Node.js Example
javascript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-xxxxxxxx",
baseURL: "https://api.tk-novalink.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello!" },
],
max_tokens: 1024,
});
console.log(response.choices[0].message.content);PHP Example
php
<?php
require 'vendor/autoload.php';
use Orhanerday\OpenAi\OpenAi;
$open_ai = new OpenAi('sk-xxxxxxxx');
$open_ai->setBaseURL('https://api.tk-novalink.com/v1');
$complete = $open_ai->chat([
'model' => 'gpt-4o',
'messages' => [
['role' => 'system', 'content' => 'You are a helpful assistant.'],
['role' => 'user', 'content' => 'Hello!'],
],
'max_tokens' => 1024,
]);
echo $complete;Compatibility
TK-NovaLink is fully compatible with OpenAI API. Just replace base_url with https://api.tk-novalink.com/v1 to use existing OpenAI SDKs.
TK-NovaLink is fully compatible with the OpenAI API format. Simply replace base_url with https://api.tk-novalink.com/v1 to keep using your existing OpenAI SDKs and code.
Next
API Manual