logitsDocs

API reference

Point any OpenAI SDK at https://api.logits.com/v1 with your API key as a bearer token. Use the model catalog to inspect current availability.

Quickstart

Sign in to the console and create a key on the API keys page. The secret is shown once and cannot be recovered; if the key is restricted to specific models, allow the model you call.

First request
export API_KEY="logits_live_..."  # the key you created
curl https://api.logits.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek/deepseek-v4.1-flash", "messages": [{"role": "user", "content": "Hello"}]}'

These endpoints are on https://api.logits.com:

EndpointReturns
GET /v1/modelsThe catalog
GET /modelsThe detailed provider feed with per-modality pricing and supported parameters
POST /v1/filesUpload a batch input file
GET /v1/filesList batch files
GET /v1/files/:idRetrieve file metadata
GET /v1/files/:id/contentDownload file content
DELETE /v1/files/:idDelete a file
POST /v1/batchesCreate a batch
GET /v1/batchesList batches
GET /v1/batches/:idRetrieve a batch
POST /v1/batches/:id/cancelCancel a batch
DELETE /v1/batches/:idDeprecated; see Batch

In file and batch paths, :id is the corresponding file or batch ID. See the Batch API guide for the JSONL format and the upload → create → poll → download flow.

Compressed request bodies

POST /v1/chat/completions, /v1/responses and /v1/messages accept absent, identity, gzip or zstd in Content-Encoding. Keep Content-Type: application/json; only the request body is compressed. Most OpenAI and Anthropic SDKs do not compress automatically, so use an HTTP middleware or transport that compresses the serialized JSON.

The compressed wire body and the decoded JSON body are each limited to the existing request-body cap, 32 MiB by default (168 MiB for a Chat Completions request with videos; see video input below). Invalid or multiple codings return 415. Chat Completions and Responses use code unsupported_content_encoding; Messages returns its Anthropic invalid_request_error envelope without a code field. Corrupt streams return 400 invalid_compressed_body; either size cap returns 400 request_too_large. Messages returns both failures as an Anthropic invalid_request_error envelope without a code. Chunked uploads are supported, and zstd frames are limited to an 8 MiB window. Idempotency uses the decoded JSON bytes, so compressed and uncompressed forms of the same request have the same intent.

gzip -c request.json > request.json.gz
curl https://api.logits.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Content-Encoding: gzip" \
  --data-binary @request.json.gz

Models

ModelProvider contextMax outputNotes
moonshotai/kimi-k3.1-pro1,048,5761,048,576Reasoning, tools, vision, video. Sparse attention for cheaper long-context decode. The earlier kimi-k3.1-pro ID still works as an alias. The retired kimi-k3, kimi-k3-base and moonshotai/kimi-k3 IDs are not accepted and return model_not_found
logits/kimi-k3.1-pro-abliterated1,048,5761,048,576Reasoning, tools, vision, video. Also accepts kimi-k3.1-pro-abliterated as an alias; shares the same parameter support as moonshotai/kimi-k3.1-pro
deepseek/deepseek-v4.1-flash1,048,576393,216The earlier deepseek-v4.1-flash ID still works as an alias. Dated IDs, when listed in the catalog, are compatibility aliases and do not guarantee a particular serving snapshot
logits/deepseek-v4.1-flash-abliterated1,048,576393,216Reasoning, tools, vision, logprobs. Also accepts deepseek-v4.1-flash-abliterated as an alias; shares the same parameter support as deepseek/deepseek-v4.1-flash

Text requests up to 457,728 bytes are admitted on a byte estimate; larger ones are counted with the model's own tokenizer and admitted up to 4 MiB of request body when the counted prompt plus the requested output fits the 1,048,576-token context (dense English reaches roughly one million prompt tokens within that cap; JSON string escaping counts toward it). Check the model feed for the current limits.

Supported parameters

Parameterdeepseek/deepseek-v4.1-flashlogits/deepseek-v4.1-flash-abliteratedmoonshotai/kimi-k3.1-prologits/kimi-k3.1-pro-abliterated
temperatureSupported (0-2)Supported (0-2)Fixed, as Moonshot's API: 1 with reasoning on, 0.6 with reasoning off. Omit it; other values return HTTP 400Fixed, as Moonshot's API: 1 with reasoning on, 0.6 with reasoning off. Omit it; other values return HTTP 400
top_pSupportedSupportedFixed at 0.95: a value from 0.95 to 1, or none, runs at 0.95; any other value returns HTTP 400Fixed at 0.95: a value from 0.95 to 1, or none, runs at 0.95; any other value returns HTTP 400
max_tokens, max_completion_tokensSupportedSupportedSupportedSupported
stop (1,024 bytes each)Up to 16Up to 16Up to 5Up to 5
stream, stream_options.include_usageSupportedSupportedSupportedSupported
toolsSupportedSupportedSupportedSupported
tool_choiceauto, none, required, named functionauto, none, required, named functionauto, none; required: best effort; named function, as Moonshot's API: only with reasoning off (reasoning_effort: "none"), best effort; with reasoning on it returns HTTP 400auto, none; required: best effort; named function, as Moonshot's API: only with reasoning off (reasoning_effort: "none"), best effort; with reasoning on it returns HTTP 400
response_format (json_object, strict json_schema)SupportedSupportedPassed throughPassed through
logprobs, top_logprobs (0-20)SupportedSupportedPassed throughPassed through
reasoning_effortAll effortsAll effortsAll efforts; minimal runs as low, xhigh as max; default maxAll efforts; minimal runs as low, xhigh as max; default max
seed, frequency_penalty, presence_penalty, repetition_penalty, top_kApplied (seed 0 means unset)Applied (seed 0 means unset)IgnoredIgnored
nMust be 1Must be 1Must be 1Must be 1
storeMust be falseMust be falseMust be falseMust be false
  • temperature ranges are enforced, not clamped: a value outside the model's range returns HTTP 400 invalid_parameter.
  • Passed through: the model receives the parameter, but it is not yet qualified, so the provider feed does not declare it.
  • Ignored: accepted for SDK compatibility but not applied to the output.
  • Best effort: passed to the model without a retry, so a forced tool call is not guaranteed.
  • Reasoning efforts are none, minimal, low, medium, high, xhigh, max; none turns reasoning off. Every model also accepts include_reasoning and the OpenRouter-style reasoning: {effort, exclude} object.
  • Vision: image_url parts with public HTTPS or base64 PNG/JPEG/WebP/GIF/BMP/TIFF/PPM/HEIC (HEIF)/AVIF. Source inputs fit within the 32 MiB request body or the 12 MiB remote-source limit, with at most 12 MiB of each request besides its image data URLs; each prepared data URL must be under 5 MB, and prepared data URLs must total under 32 MiB. Larger sources and images above the model's max_pixels resize target are downscaled and re-encoded to fit, not rejected. Usage reports image_tokens.
  • Video (moonshotai/kimi-k3.1-pro and logits/kimi-k3.1-pro-abliterated only): video_url parts in user, system (without dynamic tools) or tool messages, {"url": "data:video/mp4;base64,..."} or the URL string itself, as base64 MP4, QuickTime (video/quicktime or video/mov) or WebM. HTTPS URLs and ms:// file IDs are not accepted. At most 4 videos per request, each at most 100 MiB and 10 minutes long. A request with videos may be up to 168 MiB; with its videos replaced by their frames it must fit the 32 MiB request body. Each video is sampled evenly over its whole length at up to 8 fps (never above its own frame rate), at most 480 frames per video and 512 per request, each frame at most 4,096 visual tokens. As in Moonshot's API, every 4 consecutive frames are pooled into one timestamped temporal chunk, and a video's frames share a budget of 655,360 patches before pooling, so one video costs at most about 40,960 visual tokens plus a few tokens per chunk for its timestamp; longer videos are sampled more sparsely. Video tokens are billed as image input tokens and reported in image_tokens. The audio track is ignored. /v1/models lists the bounds in video_input.

Usage, errors and rate limits

  • Usage: the OpenAI shape, with completion_tokens_details.reasoning_tokens and prompt_tokens_details.cached_tokens. Cached input is billed at the cached rate shown in the feed.
  • Errors: always {"error":{"message","type","code","param"}}. Unknown models return 404 model_not_found; unknown parameters return 400 naming the parameter.
  • Rate limits: rolling-minute per-account, per-model budgets enforced on requests, input tokens and output tokens (the router default is 600 requests, 8M input and 2M output per minute, with higher production budgets for flagship models; see the console Limits page or response headers for active limits). Responses after account/model quota admission carry x-ratelimit-limit/remaining headers for requests, input tokens and output tokens, plus x-ratelimit-reset; quota rejections add Retry-After. Validation failures and earlier rejections do not carry these headers.
  • Request IDs: every response carries X-Request-Id; quote it in support requests.
  • Long requests: a non-streaming request sends nothing until the whole answer is ready, and NAT gateways and firewalls on your network can drop a connection that stays idle for a few minutes (350 seconds on AWS NAT Gateway, 4 minutes by default on Azure, 10 minutes for the Google Cloud VPC firewall). The answer is then lost, often without an error. Use stream: true for requests that may run longer than a few minutes. Kimi K3.1 Pro and Kimi K3.1 Pro Abliterated streams keep the connection active every 15 seconds. If you must use non-streaming, enable TCP keepalive with an idle time of about 60 seconds and raise your client's request timeout.

On this page