Browse documentation

Connect your model.

tlc is model agnostic. Keep your existing prompts, messages and response handling, and connect through the Transductor.

Your model, your application

Choose a model and API format supported by your connection. These examples use OpenAI-compatible chat completions; use the corresponding adapter for other API formats.

Your first request

Use the base URL and caller credential supplied for your setup. The example below uses the OpenAI-compatible chat-completions interface.

SettingValue
MODEL_BASE_URLYour gateway base URL, including /v1, without a trailing slash.
MODEL_API_KEYThe caller credential for that gateway.
YOUR_MODELReplace with a model supported by your configured provider.

These are example environment-variable names for your application. Keep credentials on your server.

curl "$MODEL_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $MODEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "YOUR_MODEL",
  "messages": [
    {
      "role": "user",
      "content": "Explain what this function does: function add(a, b) { return a + b; }"
    }
  ]
}'

Read the answer

For a text completion, read choices[0].message.content. Here is an illustrative response:

{
  "id": "example-completion",
  "object": "chat.completion",
  "model": "YOUR_MODEL",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "It returns the sum of a and b."
      },
      "finish_reason": "stop"
    }
  ]
}

Tool calls and streaming use their normal response formats. Your application continues its existing conversation or tool loop.

Continue

Connect your application · Request reference · API schema

The Transductor is in early access. Join the waitlist.