Section 02 · API Methods

API Methods

Endpoint kami menggunakan standar yang kompatibel dengan OpenAI API, sehingga kamu bisa menggunakan library standar seperti openai-python atau langchain.

Base URL

https://offline.juxtalabs.io

List Models

GET/v1/models

Gunakan endpoint ini untuk mengecek status dan model apa saja yang sedang running di server.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Request

curl -X GET "https://offline.juxtalabs.io/v1/models" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

{
  "data": [
    {
      "id": "DeepSeek-V3.1"
    }
  ]
}

Chat Completions

POST/v1/chat/completions

Endpoint utama untuk berinteraksi dengan model LLM.

Headers

NameValue
Content-Typeapplication/json
api-keyAPI Key

Body

NameTypeDescription
modelstringModel Name
messageslist of objectsMessage Payload
temperaturefloatTemperature ( > 0 )
streamboolStreaming Mode

Request

curl -X POST "https://offline.juxtalabs.io/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "DeepSeek-V3.1",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ],
    "temperature": 0.7,
    "stream": false
  }'

Response

{
  "id": "resp-054e64b5578b4458b27fecccc76b43ae",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "<think>Hmm, user bertanya tentang ibu kota Indonesia. Ini...",
        "refusal": null,
        "tool_calls": null,
        "role": "assistant"
      }
    }
  ],
  "created": 1777803512,
  "model": "DeepSeek-V3.1",
  "object": "chat.completion",
  "usage": {
    "completion_tokens": 420,
    "prompt_tokens": 13,
    "total_tokens": 433,
    "completion_tokens_details": null,
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 0
    }
  }
}
Last updated · 2 days agoJuxta Labs · Jakarta