API reference

77th Junction is OpenAI-compatible. Anything that works with the OpenAI API works here after you change the base URL and the key.

Quick start

Base URL
https://77thjunction.app/v1
curl https://77thjunction.app/v1/chat/completions \
  -H "Authorization: Bearer sk-77j-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "junction-forge",
    "messages": [
      {"role": "user", "content": "Write a haiku about midnight code"}
    ]
  }'

Authentication

Send your key in the Authorization header. Create and revoke keys in the dashboard. Keep keys secret: anyone with a key can spend your balance.

Authorization: Bearer sk-77j-…

Models

GET https://77thjunction.app/v1/models lists the models your key can use.

Model IDContextInput / 1MOutput / 1M
junction-swift

Fast · reads images · 262K context

256K$1.50$4.50
junction-forge

Coding & agent · 1M context

1M$4.50$7.50
junction-titan

Newest large model · 1M context

1M$4.50$7.50

Chat completions

POST https://77thjunction.app/v1/chat/completions, the same body as OpenAI: model, messages, stream, tools, temperature, max_tokens, response_format.

With stream: true you get server-sent events. Add "stream_options": {"include_usage": true} to receive the token counts in the last chunk.

Some models think before answering; that thinking streams as delta.reasoning and is billed as output.

Billing

Each request is charged after it finishes, for the exact tokens the model reports. Cached input tokens cost less. Failed requests are not charged. Requests are refused with 402 once the balance drops below one cent. You can set a spend limit on each key.

Errors

Errors use the OpenAI shape: {"error": {"message", "type", "code"}}.

StatusCodeMeaning
401invalid_api_keyMissing, wrong or revoked key.
402insufficient_quotaBalance is empty. Top up in Billing.
402key_limit_reachedThis key hit the spend limit you set on it.
403account_suspendedThe account was suspended.
404model_not_foundNo enabled model with that name.
429rate_limit_exceededMore than 120 requests a minute on one key.
502upstream_errorThe model failed. Nothing was charged.