Inference API

Inference API provides an OpenAI-compatible interface for chat completions, streaming chat completions, server-side inference tools, embeddings, and model listing. Standard OpenAI-compatible SDKs and HTTP clients can connect to the API using Tempico endpoints and a Tempico API key. Server-side inference tools can perform web searches, inspect encoded or obfuscated data, validate and extract JSON, and query supported security-reputation sources on behalf of the model.

Authentication

All API requests require an API key. Bearer authentication is the recommended method. For compatibility, the API also supports x-api-key: <API_KEY> header.

Authorization: Bearer <API_KEY>
Server-side inference tool permissions

Server-side inference tools require API-key permission in addition to access to /v1/chat/completions.

The Code-analysis and system utilities permission uses the inference_tool:sys_utils scope to enable both sys_utils and json_utils, with no separate inference_tool:json_utils permission.

Full-access API keys using * authorize both tools automatically. Existing custom-scope keys without inference_tool:sys_utilsremain unchanged. Create a new key with the permission when access is required.

For custom API keys, select Code-analysis and system utilities while granting access to /v1/chat/completions.

List models

Returns available model IDs for the current account. Returned id values can be used as the model field in chat completion and embedding requests.

GET
https://api.tempico.com/v1/models
{
  "object": "list",
  "data": [
    {
      "id": "kimi-k2.7-code:1t",
      "object": "model",
      "created": 0,
      "owned_by": "tempicolabs",
      "context_window": 262144,
      "capabilities": [
        "chat"
      ],
      "max_output_tokens": 65536
    },
    {
      "id": "embeddinggemma:300m",
      "object": "model",
      "created": 0,
      "owned_by": "tempicolabs",
      "context_window": 2048,
      "capabilities": [
        "embeddings"
      ]
    }
  ]
}
FieldDescription
idModel ID used in API requests.
createdModel creation timestamp when available.
context_windowMaximum context length supported by the model, in tokens.
capabilitiesSupported API features for the model, such as chat or embeddings.
max_output_tokensMaximum output token limit when available.

Chat completions

Generates a model response from a conversation in OpenAI chat format. The endpoint supports standard JSON responses, streaming output, and server-side web search.

POST
https://api.tempico.com/v1/chat/completions
Web search

Server-side web search works as a tool available to the model during chat completion generation. For most chat models, web search is enabled by default. The model decides when search is needed and what query should be used.

Search behavior can be controlled through the prompt. System or user messages can define when search should be used, what sources to prefer, and when the model should answer without searching.

Set web_search to false to disable server-side search for a specific request.

curl https://api.tempico.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2.7-code:1t",
    "messages": [
      {
        "role": "system",
        "content": "You are a concise technical assistant."
      },
      {
        "role": "user",
        "content": "Search the web and summarize the current Python 3.13 release status."
      }
    ],
    "max_tokens": 800,
    "temperature": 0.2,
    "web_search": true,
    "web_search_options": {
      "search_context_size": "medium",
      "user_location": {
        "type": "approximate",
        "approximate": {
          "country": "US"
        }
      },
      "safesearch": "moderate"
    }
  }'
FieldDescription
modelModel that generated the response.
messagesConversation history sent to the model in OpenAI chat format.
max_tokensMaximum number of tokens the model can generate in the response.
web_searchEnables or disables server-side web search. Enabled by default for most models.
search_context_sizeAmount of search context passed to the model. Supported values are lowmedium, and high.
countryCountry code used as the location hint.
safesearchSearch safety preference passed to the search backend.
accept_languageLanguage preference for search results.
Example Response
{
  "id": "chatcmpl-0000000000000000",
  "object": "chat.completion",
  "created": 0,
  "model": "kimi-k2.7-code:1t",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The answer text appears here."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 120,
    "completion_tokens": 64,
    "total_tokens": 184
  }
}
FieldDescription
finish_reasonReason generation stopped, such as reaching a stop condition or token limit.
usageToken usage information for the request.
prompt_tokensNumber of input tokens processed by the model.
completion_tokensNumber of output tokens generated by the model.
total_tokensSum of input and output tokens.

Code-analysis and system utilities

Code-analysis and system utilities are bounded, non-executing tools available to the model during chat completion generation. They support static inspection and deterministic utility tasks such as inspecting escaped malware code, decoding layered payloads, validating JSON, calculating cryptographic digests, and working with timestamps.

For an API key authorized by inference_tool:sys_utils, both utilities are enabled by default. The model decides whether they are needed.

Set sys_utils to false to disable both sys_utils and json_utils for a request.

{
  "model": "kimi-k2.7-code:1t",
  "messages": [
    {
      "role": "user",
      "content": "Explain this Python function."
    }
  ],
  "sys_utils": false
}

Setting sys_utils to true without the required permission returns 403 Forbidden.

Clients should not add sys_utils or json_utils definitions to the tools array. Tempico injects and executes these managed tools server-side. The client receives a normal chat-completion response, while managed tool calls and intermediate results remain server-side.

Each managed utility can be invoked once during a completion and its continuation chain. One invocation can batch up to 16 ordered operations.

curl https://api.tempico.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2.7-code:1t",
    "messages": [
      {
        "role": "user",
        "content": "Without executing it, decode this PowerShell -EncodedCommand, explain the decoded content, and report its full-buffer SHA-256: VwByAGkAdABlAC0ATwB1AHQAcAB1AHQA"
      }
    ],
    "sys_utils": true,
    "max_tokens": 1200
  }'

sys_utils is optional in this example because authorized requests enable both utilities by default.

ToolOperationDescription
sys_utilsbytes_transformPerforms an explicit sequence of bounded byte transformations for static code and payload analysis.
sys_utilschecksumCalculates SHA-256 or SHA-512 over caller-supplied text or encoded bytes.
sys_utilshmacSigns or verifies data with HMAC-SHA-256 or HMAC-SHA-512.
sys_utilsuuid_v4Generates UUIDv4 identifiers.
sys_utilsrandom_tokenGenerates bounded hex or unpadded Base64URL random identifiers.
sys_utilsdatetimeGets the current time, parses timestamps, converts timezones, and performs fixed timedelta arithmetic.
sys_utilsdecimal_mathPerforms exact or explicitly rounded decimal arithmetic without evaluating expressions.
json_utilsdocumentValidates one complete JSON document or extracts values using RFC 6901 pointers.

Base64, UUID, checksum, and datetime are operations within sys_utils, not separate server-side tool names.

Static byte analysis

bytes_transform supports explicit transformation pipelines over UTF-8, Base64, Base64URL, or hexadecimal input.

Available transformations include:

  • Base64, Base64URL, and hexadecimal encoding or decoding
  • Strict percent decoding, where + remains a literal plus sign
  • UTF-8, UTF-16LE, UTF-16BE, and Latin-1 transcoding
  • C-style, JSON, JavaScript, and PowerShell escape decoding
  • Repeating-key XOR with an explicitly supplied key
  • gzip, zlib, and raw DEFLATE decompression

Example workflows include:

  • PowerShell Base64 to UTF-16LE to UTF-8
  • Base64 to raw DEFLATE to UTF-8
  • C-style escaped bytes to repeating-key XOR
  • Percent encoding to JavaScript escape decoding to Base64

Each transformation pipeline is explicit. The tool does not guess encodings, recursively decode content, search for XOR keys, execute code, or emulate a runtime.

Every successful byte-analysis result includes the complete byte count and SHA-256. It also includes entropy, printable-byte ratio, transformation sizes, and per-step SHA-256 values. SHA-512 can be requested when needed.

Large results are returned as clearly marked head and tail previews. Digests always cover the complete transformed buffer, not only the preview

Checksums, HMACs, and identifiers

Checksums support only SHA-256 and SHA-512. MD5, SHA-1, and arbitrary hash algorithms are not supported.

Checksums operate only on data supplied as UTF-8, Base64, Base64URL, or hexadecimal input. The tool cannot open filesystem paths, download URLs, or read stored malware samples.

Calculating a digest does not automatically query or submit it to the Malware Hash Registry. Hash reputation requires a separate, explicitly authorized hash_reputation operation.

HMAC supports signing and constant-time verification with SHA-256 or SHA-512. HMAC keys and messages are visible to the model and inference provider. Do not use this tool with long-lived API keys, platform credentials, or secrets that must remain hidden from the model.

uuid_v4 generates UUIDv4 identifiers. Random tokens are intended as random identifiers. They are not secret-custody objects and should not be used as passwords, API keys, or platform credentials.

Datetime and decimal arithmetic

Datetime operations support:

  • Current time, with UTC as the default
  • Strict RFC 3339 timestamps
  • Explicit Unix seconds or milliseconds
  • IANA timezones
  • Timezone conversion
  • Fixed timedelta arithmetic
  • Daylight-saving transitions

Ambiguous local times require an explicit fold selection. Nonexistent local times during daylight-saving transitions are rejected.

Decimal operations accept decimal strings instead of JSON floating-point numbers. Exact mode rejects non-terminating or irrational results. Rounded mode requires an explicit precision or scale and an explicit rounding rule. Mathematical expressions are not evaluated.

Strict JSON utilities

json_utils validates one complete RFC 8259 JSON document or extracts ordered values using RFC 6901 pointers.

Validation rejects:

  • Byte-order marks
  • Duplicate object keys
  • Trailing content
  • NaN and Infinity
  • Numeric overflow
  • Unpaired Unicode surrogates
  • Excessive nesting or document size

Extraction uses RFC 6901 JSON Pointer syntax. An empty pointer selects the document root. Missing values are distinguished from JSON null.

The tool does not scan prose for embedded JSON, repair malformed documents, evaluate JSONPath, validate JSON Schema, or execute extracted content.

Safety and trust

Decoded, decompressed, transformed, and extracted values remain attacker-controlled data. They must not be treated as model instructions, system messages, commands, links to follow, or authorization claims.

These utilities never provide:

  • Shell or subprocess execution
  • evalexec, compilation, or imports
  • Script runtimes or emulation
  • Filesystem or network access
  • Database or message-queue access
  • Archive extraction
  • User-provided regular-expression execution
  • XOR brute force or heuristic decoder guessing
  • Automatic malware submission or reputation lookup
Resource limits
LimitValue
Operations per tool invocation16
Byte pipelines per sys_utils invocation4
Steps per byte pipeline8
Decoded initial input per pipeline128 KiB
Aggregate decoded input per invocation256 KiB
Working or final byte buffer per pipeline1 MiB
Cumulative transformed bytes per invocation2 MiB
Default emitted result data16 KiB
Maximum emitted result data64 KiB
Maximum serialized tool result128 KiB
JSON document size128 KiB
JSON pointers per extraction32
Maximum JSON depth64
Maximum JSON nodes10,000
UUIDv4 identifiers per operation100
Random identifiers per operation16

Decompression is additionally limited to 128 times the compressed input size and a maximum of 1 MiB. Truncated streams, trailing compressed data, concatenated streams, and excessive expansion are rejected.

Context and token usage

There is no separate charge for using sys_utils or json_utils. Normal inference token usage still applies. When enabled, tool schemas and results occupy part of the model context. Applications that do not need these utilities should send:

{
  "sys_utils": false
}

This is particularly relevant for full-access API keys because * authorizes and enables both utilities by default.

Example Response
{
  "id": "chatcmpl-0000000000000000",
  "object": "chat.completion",
  "created": 0,
  "model": "kimi-k2.7-code:1t",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The answer text appears here."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 120,
    "completion_tokens": 64,
    "total_tokens": 184
  }
}
FieldDescription
finish_reasonReason generation stopped, such as reaching a stop condition or token limit.
usageToken usage information for the request.
prompt_tokensNumber of input tokens processed by the model.
completion_tokensNumber of output tokens generated by the model.
total_tokensSum of input and output tokens.

Image input

Models with image support accept Base64-encoded images in a user message. Provide the prompt and image as separate content parts:

curl https://api.tempico.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3:2.8t",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Describe this image."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "data:image/jpeg;base64,<BASE64_DATA>"
            }
          }
        ]
      }
    ]
  }'

Replace <BASE64_DATA> with the image’s Base64-encoded bytes without line breaks. The MIME type must match the file—for example, use data:image/png;base64,... for PNG images.

Additional images can be supplied as additional image_url content parts. Image support and limits depend on the selected model. Resize or compress large images before encoding because Base64 increases request size and a potential token usage.

Streaming chat completions

Returns a chat completion as a stream of Server-Sent Events. Each event contains a partial response chunk. The stream ends with data: [DONE].

POST
https://api.tempico.com/v1/chat/completions
curl https://api.tempico.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2.7-code:1t",
    "stream": true,
    "messages": [
      {
        "role": "user",
        "content": "Write a short Python example using requests."
      }
    ]
  }'
Example Stream Response
data: {
  "id": "chatcmpl-0000000000000000",
  "object": "chat.completion.chunk",
  "created": 0,
  "model": "kimi-k2.7-code:1t",
  "choices": [
    {
      "index": 0,
      "delta": {
        "role": "assistant"
      },
      "finish_reason": null
    }
  ]
}

data: {
  "id": "chatcmpl-0000000000000000",
  "object": "chat.completion.chunk",
  "created": 0,
  "model": "kimi-k2.7-code:1t",
  "choices": [
    {
      "index": 0,
      "delta": {
        "content": "import requests\n\n"
      },
      "finish_reason": null
    }
  ]
}

data: {
  "id": "chatcmpl-0000000000000000",
  "object": "chat.completion.chunk",
  "created": 0,
  "model": "kimi-k2.7-code:1t",
  "choices": [
    {
      "index": 0,
      "delta": {},
      "finish_reason": "stop"
    }
  ]
}

data: [DONE]
FieldDescription
streamEnables streaming mode when set to true. The response is returned as Server-Sent Events instead of one JSON object.
choicesArray of streamed output choices. For normal single-response generation, this usually contains one item.
indexPosition of the choice in the choices array.
deltaIncremental update for the assistant message. This object can contain role, content, or be empty in the final chunk.
finish_reasonIndicates why generation ended. The value is null while generation is still running.
data: [DONE]Final stream marker. No more chunks are sent after this event.

Embeddings

Embeddings convert text input into vectors for semantic search, similarity matching, clustering, and ranking.

POST
https://api.tempico.com/v1/embeddings
curl https://api.tempico.com/v1/embeddings \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "embeddinggemma:300m",
    "input": "Represent this text as a vector for semantic search."
  }'

Example Response

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0.0123,
        -0.0456,
        0.0789
      ]
    }
  ],
  "model": "embeddinggemma:300m",
  "usage": {
    "prompt_tokens": 12,
    "total_tokens": 12
  }
}
FieldDescription
inputText or array of texts used to create embeddings.
embeddingVector representation of the input text.
prompt_tokensNumber of input tokens processed by the model.
total_tokensTotal tokens counted for the request.

Pricing and Feature Availability

DATACENTER
LM1
Estonia
SG1

Singapore

USW2

USA

Infrastructure Units size

CPU

72 MHz

48 MHz

32 MHz

RAM

48 MB

48 MB

48 MB

Storage size

576 MB

576 MB

480 MB

IOPS

12 IOPS

12 IOPS

12 IOPS

Infrastructure Unit​ price

0.00074 €/h

0.00241 €/h

0.0033 €/h

PaaS ADD-ONS

Dedicated NAT gateway

0.03014 €/h

0.0399 €/h

0.0433 €/h

GPU RTX 5000 Ada

0.78 €/h

GPU RTX PRO 6000 Blackwell

1.31 €/h

Paid TLS certificate

From 16.50 €/year

Dedicated IPv4

7.23 €/month

4 €/month​

3.83 €/month​

Dedicated IPv6

Free

Varies

Varies

Dedicated IPv4 subnet​

Varies

Dedicated IPv6 subnet

Varies

CI/CD Add-ons

CI/CD runner

0.01628 €/h

Varies

Varies

Environment-dependent features

Stateful Firewall
TLS with Let's Encrypt
Web Application Firewall
Platform built-in logging
ARM CPUs
Anti-DDoS

Add-on

Add-on

Cloud-native services

Add-on

GPU-accelerated computing

Add-on

Custom PCI passtrough
Log storage

0.1 GB/month free,
2 €/GB/month optional expansion,
60 days max

Log ingestion

First 10 GB/month free,
then 0.06 €/GB/Month

Log Retrieval

1.50 €/GB/month