GGateYourWay API
Status RU Create key
HTTP API

API Reference

GateYourWay public inference contracts. Upstream details and internal routes remain private.

01

Endpoint index

GET/v1/models

List public models and prices. Authentication is optional; a key can extend the response with scopes available to it.

#
GET/v1/models/{model_id}

One model by public ID.

#
POST/v1/chat/completions

OpenAI-compatible chat, streaming, and function tools.

#
POST/v1/responses

OpenAI Responses-compatible input for Codex CLI and compatible clients.

#
POST/v1/messages

Anthropic Messages API with streaming, vision, and tool use.

#
POST/v1/images/generations

One image generation returned as b64_json.

#
GET/v1/cursor/models

Isolated Cursor model list containing gyw-opus-5.

#
POST/v1/cursor/chat/completions

Cursor bridge for Claude Opus 5 in Chat Completions format.

#
POST/v1/cursor/responses

Cursor bridge for Claude Opus 5 in Responses format.

#
02

POST /v1/chat/completions

Primary OpenAI-compatible endpoint for messages.

FieldTypeDescription
modelstringRequired public model ID.
messagesarrayMessage history in OpenAI format.
streambooleanEnables an SSE response.
toolsarrayFunction JSON Schemas when supported by the model.
json
{
  "model": "gpt-5.6-luna",
  "messages": [
    {"role": "system", "content": "Be concise."},
    {"role": "user", "content": "Explain SSE in one sentence."}
  ],
  "stream": true
}
json
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "gpt-5.6-luna",
  "choices": [{"index": 0, "message": {"role": "assistant", "content": "..."}}],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 24,
    "total_tokens": 42
  }
}
03

POST /v1/responses

Responses-compatible wire API for Codex CLI and clients that use input and response events.

json
{
  "model": "gpt-5.6-luna",
  "input": "Return the word OK.",
  "stream": true
}
04

POST /v1/messages

Anthropic-compatible Messages API. Requires x-api-key and anthropic-version.

json
{
  "model": "claude-opus-5",
  "max_tokens": 1024,
  "messages": [{"role": "user", "content": "Return the word OK."}],
  "stream": true
}
05

Cursor compatibility

The separate /v1/cursor base URL accepts only gyw-opus-5. Every other model ID is intentionally rejected.