# glim.sh LLM Chat Completions

> glim.sh LLM Chat Completions is a paid API for AI agents from glim.sh, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

OpenAI-compatible LLM chat completion endpoint supporting multiple frontier models with optional SSE streaming

## Facts

- Endpoint: POST https://glim.sh/api/v1/inference/v1/chat/completions?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Success rate: 0% of calls made through Zero
- Rating: 1.3 / 5 from 1 review
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-llm-chat-completions-bb5799d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6cwW_piDrJTGlYdWN-Bmi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glim-sh-llm-chat-completions-bb5799d5 -d '<json body>'
```

Example prompt: Using the glim.sh inference endpoint with Claude Sonnet 4.5, send this conversation and stream back the response: system message is 'You are a helpful assistant', user message is 'Explain quantum entanglement in two sentences', with temperature 0.7 and max 200 tokens.

## When to prefer this

Choose this endpoint when you need pay-per-call LLM inference without managing API keys or subscriptions across multiple providers. Ideal for AI agents that need access to frontier models (Claude, Grok, Gemini, Qwen) through a single OpenAI-compatible interface billed via USDC micropayments. Best when you want model flexibility without committing to a single provider contract.

## Known failure modes

- Invalid or unsupported model identifier returns 400 error
- Payment failure or insufficient USDC balance results in 402 Payment Required
- Exceeding max_tokens limit may truncate output
- Malformed messages array (missing role or content) returns validation error
- Temperature out of 0-2 range may cause rejection
- Model temporarily unavailable returns 503

## How this service works

LLM chat completion (OpenAI-compatible, streaming supported)

## Output

An OpenAI-compatible chat completion response containing the assistant's generated message, finish reason, and token usage statistics. When streaming is enabled, the response arrives as Server-Sent Events (SSE) with delta tokens.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "minLength": 1,
   "description": "Model identifier. Available: moonshotai/kimi-k2.5, minimax/minimax-m2.5, qwen/qwen-2.5-7b-instruct, anthropic/claude-sonnet-4.5, anthropic/claude-sonnet-4.6, anthropic/claude-opus-4.5, anthropic/claude-opus-4.6, minimax/minimax-m2.7, z-ai/glm-5, z-ai/glm-5-turbo, z-ai/glm-5.1, x-ai/grok-4.1-fast, x-ai/grok-4.20-beta, x-ai/grok-4.20-multi-agent-beta, x-ai/grok-4.1-fast:online, x-ai/grok-4.20-beta:online, x-ai/grok-4.20-multi-agent-beta:online, stepfun/step-3.5-flash, xiaomi/mimo-v2-pro, google/gemini-3.1-flash-lite-preview, google/gemini-3.1-pro-preview"
  },
  "tools": {
   "type": "array",
   "items": {},
   "description": "Tool definitions"
  },
  "top_p": {
   "anyOf": [
    {
     "type": "number"
    },
    {
     "type": "null"
    }
   ],
   "description": "Nucleus sampling"
  },
  "stream": {
   "type": "boolean",
   "description": "Enable SSE streaming"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role"
    ],
    "properties": {
     "role": {
      "type": "string",
      "description": "Message role"
     },
     "content": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "required": [
          "type"
         ],
         "properties": {
          "type": {
           "type": "string"
          }
         },
         "additionalProperties": {}
        }
       }
      ]
     }
    },
    "additionalProperties": {}
   },
   "minItems": 1,
   "description": "Chat messages"
  },
  "max_tokens": {
   "anyOf": [
    {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": -9007199254740991
    },
    {
     "type": "null"
    }
   ],
   "description": "Max tokens to generate"
  },
  "temperature": {
   "anyOf": [
    {
     "type": "number"
    },
    {
     "type": "null"
    }
   ],
   "description": "Sampling temperature (0-2)"
  },
  "max_completion_tokens": {
   "anyOf": [
    {
     "type": "integer",
     "maximum": 9007199254740991,
     "minimum": -9007199254740991
    },
    {
     "type": "null"
    }
   ],
   "description": "Max completion tokens (preferred over max_tokens)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-llm-chat-completions-bb5799d5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from glim.sh](https://www.zero.xyz/host/glim.sh/llms.txt)
