Call Tradeics models through the OpenAI-compatible proxy at https://llm.tradeics.example.
The LLM API Reference right panel shows live HTTP request/response samples per endpoint. This guide adds copy-paste clients in multiple languages.
Base URL
| Use | URL |
|---|---|
| Proxy root | https://llm.tradeics.example |
OpenAI SDK base_url |
https://llm.tradeics.example/v1 |
| Chat | POST /v1/chat/completions |
| Models | GET /v1/models |
| Embeddings | POST /v1/embeddings |
Authenticate
export TRADEICS_LLM_API_KEY="sk-..."
Authorization: Bearer $TRADEICS_LLM_API_KEY
List models
curl https://llm.tradeics.example/v1/models \
-H "Authorization: Bearer $TRADEICS_LLM_API_KEY"
Chat completion — multi-language
Replace <model_id> with an id from /v1/models.
cURL
curl https://llm.tradeics.example/v1/chat/completions \
-H "Authorization: Bearer $TRADEICS_LLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model_id>",
"messages": [
{"role": "system", "content": "You help procurement teams evaluate B2B suppliers."},
{"role": "user", "content": "Summarize this RFQ in three bullets."}
],
"temperature": 0.2
}'
Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["TRADEICS_LLM_API_KEY"],
base_url="https://llm.tradeics.example/v1",
)
response = client.chat.completions.create(
model="<model_id>",
messages=[
{"role": "system", "content": "You help procurement teams evaluate B2B suppliers."},
{"role": "user", "content": "Draft three clarifying questions for this RFQ."},
],
)
print(response.choices[0].message.content)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TRADEICS_LLM_API_KEY,
baseURL: "https://llm.tradeics.example/v1",
});
const response = await client.chat.completions.create({
model: "<model_id>",
messages: [
{ role: "system", content: "You help procurement teams evaluate B2B suppliers." },
{ role: "user", content: "Turn this supplier email into a structured quote summary." },
],
});
console.log(response.choices[0].message.content);
Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body := map[string]any{
"model": "<model_id>",
"messages": []map[string]string{
{"role": "system", "content": "You help procurement teams evaluate B2B suppliers."},
{"role": "user", "content": "Score these three suppliers briefly."},
},
}
b, _ := json.Marshal(body)
req, _ := http.NewRequest("POST", "https://llm.tradeics.example/v1/chat/completions", bytes.NewReader(b))
req.Header.Set("Authorization", "Bearer "+os.Getenv("TRADEICS_LLM_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.Status)
}
PHP
<?php
$payload = [
"model" => "<model_id>",
"messages" => [
["role" => "system", "content" => "You help procurement teams evaluate B2B suppliers."],
["role" => "user", "content" => "Summarize this RFQ in three bullets."],
],
];
$ch = curl_init("https://llm.tradeics.example/v1/chat/completions");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("TRADEICS_LLM_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);
Java
var client = HttpClient.newHttpClient();
var json = """
{
"model": "<model_id>",
"messages": [
{"role": "system", "content": "You help procurement teams evaluate B2B suppliers."},
{"role": "user", "content": "Summarize this RFQ in three bullets."}
]
}
""";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://llm.tradeics.example/v1/chat/completions"))
.header("Authorization", "Bearer " + System.getenv("TRADEICS_LLM_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Ruby
require "net/http"
require "json"
require "uri"
uri = URI("https://llm.tradeics.example/v1/chat/completions")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV["TRADEICS_LLM_API_KEY"]}"
req["Content-Type"] = "application/json"
req.body = {
model: "<model_id>",
messages: [
{ role: "system", content: "You help procurement teams evaluate B2B suppliers." },
{ role: "user", content: "Summarize this RFQ in three bullets." }
]
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body
Embeddings
curl https://llm.tradeics.example/v1/embeddings \
-H "Authorization: Bearer $TRADEICS_LLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<embedding_model_id>",
"input": ["M8 hex bolt stainless", "hydraulic pump 5HP"]
}'
Production checklist
- Keep keys on the server only.
- Log model + latency — not secrets inside prompts.
- Treat model output as assistive before awarding POs or releasing payments.
- Use REST API V2 for masters and transactions; this LLM API for inference.
- Prefer MCP when an agent should operate on workspace data (not for high-volume batch inference).