{
  "schema_version": "1.0",
  "publisher": "AI Release",
  "article": {
    "title": "Claude Code via an API gateway: requirements for the agentic loop",
    "canonical_url": "https://ai-release.org/posts/claude-code-cherez-api-shlyuz-kakie-modeli-tyanut-agentnyy-tsikl-a294d07a_en.html",
    "language": "en",
    "article_type": "news",
    "published_at": "2026-10-07T00:00:00+00:00",
    "updated_at": "2026-10-07T00:00:00+00:00"
  },
  "summary": "Claude Code can work not only with Anthropic: via the ANTHROPIC_BASE_URL variable, requests are routed to a third-party Anthropic-compatible API. The Just AI team, using their Caila gateway as an example, broke down the requirements for endpoints, streaming, and automatic model discovery.",
  "topics": [
    "Claude",
    "API gateway",
    "Agentic",
    "Just",
    "Anthropic"
  ],
  "entities": [
    {
      "id": "E-SRC",
      "name": "habr.com",
      "type": "source",
      "description": "source domain",
      "url": "https://habr.com/ru/companies/just_ai/articles/1091108/"
    },
    {
      "id": "E-T1",
      "name": "Claude",
      "type": "topic",
      "description": "publication tag",
      "url": null
    },
    {
      "id": "E-T2",
      "name": "API gateway",
      "type": "topic",
      "description": "publication tag",
      "url": null
    },
    {
      "id": "E-T3",
      "name": "Agentic",
      "type": "topic",
      "description": "publication tag",
      "url": null
    },
    {
      "id": "E-T4",
      "name": "Just",
      "type": "topic",
      "description": "publication tag",
      "url": null
    },
    {
      "id": "E-T5",
      "name": "Anthropic",
      "type": "topic",
      "description": "publication tag",
      "url": null
    },
    {
      "id": "E-AIR",
      "name": "AI Release",
      "type": "publisher",
      "description": "published the article",
      "url": "https://ai-release.org/"
    }
  ],
  "claims": [
    {
      "id": "AR-CLAUDECODE-001",
      "statement": "Claude Code can work not only with Anthropic: via the ANTHROPIC_BASE_URL variable, requests are routed to a third-party Anthropic-compatible API.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-001",
      "evidence_excerpt": "Claude Code can work not only with Anthropic: via the ANTHROPIC_BASE_URL variable, requests are routed to a third-party Anthropic-compatible API."
    },
    {
      "id": "AR-CLAUDECODE-002",
      "statement": "The Just AI team, using their Caila gateway as an example, broke down the requirements for endpoints, streaming, and automatic model discovery.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-002",
      "evidence_excerpt": "The Just AI team, using their Caila gateway as an example, broke down the requirements for endpoints, streaming, and automatic model discovery."
    },
    {
      "id": "AR-CLAUDECODE-003",
      "statement": "Compatibility with the Anthropic API does not guarantee that any model behind the gateway will work correctly in the agentic loop.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-003",
      "evidence_excerpt": "Compatibility with the Anthropic API does not guarantee that any model behind the gateway will work correctly in the agentic loop."
    },
    {
      "id": "AR-CLAUDECODE-004",
      "statement": "In an article on Habr, the Just AI team explained how to connect Claude Code to an API gateway.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-004",
      "evidence_excerpt": "In an article on Habr, the Just AI team explained how to connect Claude Code to an API gateway."
    },
    {
      "id": "AR-CLAUDECODE-005",
      "statement": "Claude Code accesses three endpoints: POST /v1/messages — mandatory, nothing works without it; POST /v1/messages/count_tokens — optional, without it /context shows a character-based estimate instead of an exact count; GET /v1/models?limit=1000 — optional, without it /model shows only the built-in list.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-005",
      "evidence_excerpt": "Claude Code accesses three endpoints: POST /v1/messages — mandatory, nothing works without it; POST /v1/messages/count_tokens — optional, without it /context shows a character-based estimate instead of an exact count; GET /v1/models?limit=1000 — optional, without it /model shows only the built-in list."
    },
    {
      "id": "AR-CLAUDECODE-006",
      "statement": "In Caila, the token-counting endpoint is implemented, so /context through the gateway shows exact numbers.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-006",
      "evidence_excerpt": "In Caila, the token-counting endpoint is implemented, so /context through the gateway shows exact numbers."
    },
    {
      "id": "AR-CLAUDECODE-007",
      "statement": "Streaming must not be buffered: Claude Code reads the response as it arrives, and if the gateway assembles the entire response first, the agent will appear frozen.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-007",
      "evidence_excerpt": "Streaming must not be buffered: Claude Code reads the response as it arrives, and if the gateway assembles the entire response first, the agent will appear frozen."
    },
    {
      "id": "AR-CLAUDECODE-008",
      "statement": "The client accounts for SSE events and terminates the stream after a long wait, so the gateway must send SSE pings during lengthy generation.",
      "claim_type": "reported_fact",
      "confidence": "not_assessed",
      "source_type": "publication source",
      "verification_status": "reported_unverified",
      "source_url": "https://habr.com/ru/companies/just_ai/articles/1091108/",
      "article_anchor": "#ai-claim-008",
      "evidence_excerpt": "The client accounts for SSE events and terminates the stream after a long wait, so the gateway must send SSE pings during lengthy generation."
    }
  ],
  "relationships": [
    {
      "subject": "habr.com",
      "predicate": "reports on",
      "object": "Claude Code via an API gateway: requirements for the agentic loop",
      "claim_id": "AR-CLAUDECODE-001"
    },
    {
      "subject": "AI Release",
      "predicate": "publishes",
      "object": "Claude Code via an API gateway: requirements for the agentic loop",
      "claim_id": "AR-CLAUDECODE-001"
    }
  ],
  "questions_and_answers": [
    {
      "question": "What is this article about?",
      "answer": "Claude Code via an API gateway: requirements for the agentic loop. Claude Code can work not only with Anthropic: via the ANTHROPIC_BASE_URL variable, requests are routed to a third-party Anthropic-compatible API.",
      "claim_ids": [
        "AR-CLAUDECODE-001"
      ],
      "article_anchor": "#ai-knowledge"
    },
    {
      "question": "What happened?",
      "answer": "Claude Code can work not only with Anthropic: via the ANTHROPIC_BASE_URL variable, requests are routed to a third-party Anthropic-compatible API. The Just AI team, using their Caila gateway as an example, broke down the requirements for endpoints, streaming, and automatic model discovery. Compatibility with the Anthropic API does not guarantee that any model behind the gateway will work correctly in the agentic loop.",
      "claim_ids": [
        "AR-CLAUDECODE-001",
        "AR-CLAUDECODE-002",
        "AR-CLAUDECODE-003"
      ],
      "article_anchor": "#ai-knowledge"
    },
    {
      "question": "Who is the source?",
      "answer": "habr.com: https://habr.com/ru/companies/just_ai/articles/1091108/",
      "claim_ids": [],
      "article_anchor": "#ai-knowledge"
    },
    {
      "question": "What remains unknown?",
      "answer": "The article reports the cited source; independent verification and full details are not provided.",
      "claim_ids": [],
      "article_anchor": "#ai-knowledge"
    }
  ],
  "limitations": [
    "No independent verification is provided.",
    "Full details, dates and official documents may be missing.",
    "The article reports a source rather than being the primary source."
  ],
  "citation": {
    "preferred_citation": "AI Release. «Claude Code via an API gateway: requirements for the agentic loop». 2026-10-07. https://ai-release.org/posts/claude-code-cherez-api-shlyuz-kakie-modeli-tyanut-agentnyy-tsikl-a294d07a_en.html",
    "canonical_url": "https://ai-release.org/posts/claude-code-cherez-api-shlyuz-kakie-modeli-tyanut-agentnyy-tsikl-a294d07a_en.html",
    "publisher": "AI Release"
  }
}