中文

API documentation

Junji API currently supports text generation through OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages.

View request examples
OpenAI Base URLhttps://api.junji-tech.com/v1
Anthropic Base URLhttps://api.junji-tech.com
TransportHTTPS · JSON · SSE

Authentication

OpenAI-compatible clients use a Bearer token. Anthropic clients use X-API-Key. Do not send two different keys in the same request.

Authorization: Bearer jsk_live_your_key
X-API-Key: jsk_live_your_key

Endpoints

MethodPathPurpose
GET/v1/modelsList currently available models
POST/v1/chat/completionsOpenAI Chat Completions
POST/v1/responsesOpenAI Responses
POST/v1/messagesAnthropic Messages

Request scope

Generation requests use JSON and must include a currently listed model. The first release supports plain-text system, user, and assistant messages plus common sampling controls.

  • Maximum request body: 4 MiB.
  • Current output limit: 512 tokens.
  • Tools, multimodal content, structured output, stateful Responses, and Anthropic thinking are not yet supported. Unsupported input fails explicitly rather than silently degrading.

Streaming

Set stream: true to receive text/event-stream. Each endpoint emits its native SSE event structure; clients should consume the terminal event rather than treating a closed connection as successful completion.

Usage and billing

Accounts use prepaid CNY credit. The active model price is snapped when a request is admitted, then final cost is settled from the actual input and output token counts reported by compute. Usage statistics can take a few seconds to update.

HTTP status codes

400Invalid request or parameter
401Missing or invalid API key
402Insufficient balance
404Model unavailable
409Admission conflict
429Model currently busy
503Service temporarily unavailable