# AI Nexus Claude Documentation Source: `AI Nexus Product Documentation _ Models _ Anthropic _ Claude _ One Developer Portal.pdf` Extracted locally on 2026-06-26. ## Important Notice AI Nexus temporarily does not support the Anthropic Messages API. Users are asked to wait for updates because providers had to be changed on short notice due to governance regulations. AI Nexus is actively working on enabling the Messages API. Anthropic may restrict access to services by region. Users or their organizational units must verify whether country-specific access is permitted before using the service. ## Overview Claude is a family of AI assistants created by Anthropic. It is designed to be helpful, honest, and safe in conversations. Claude can answer questions, write and edit text, summarize documents, and help with coding in a natural chat-like way. Claude models are available in different sizes: - A fast lightweight model for simple tasks. - A balanced model for everyday use. - A more powerful model for complex reasoning and analysis. Claude is used in chatbots, research tools, and workplace assistants where reliability and clear, thoughtful responses matter. Claude models are often strong choices for coding tasks. ## Access Refer to the internal "How to get access to the models" documentation to get access. The documented endpoint is: ```text https://genai-nexus.api.corpinter.net ``` The service uses AWS Bedrock Runtime with an internal Nexus endpoint. ## Available Models | Model | Production | | --- | --- | | `claude-sonnet-4.6` | Yes | | `claude-opus-4.6` | Yes | | `claude-haiku-4.5` | Yes | AI Nexus recommends `claude-sonnet-4.6` as the cost-effective default. It largely matches or exceeds `claude-opus-4.6` on most benchmarks at lower cost. Use Opus only when the use case specifically requires Opus-level capabilities. ## Converse API Workaround AI Nexus uses Anthropic models provided by AWS Bedrock. Because the Anthropic Messages API is not currently supported, AI Nexus recommends using the AWS Converse API. ### Python Text Generation ```python import boto3 import os # export AWS_BEARER_TOKEN_BEDROCK=${your-bedrock-api-key} os.environ["AWS_BEARER_TOKEN_BEDROCK"] = "" client = boto3.client( service_name="bedrock-runtime", endpoint_url="https://genai-nexus.api.corpinter.net", region_name="nexus", # required but internally overridden ) response = client.converse( modelId="claude-sonnet-4", messages=[{"role": "user", "content": [{"text": "Hello"}]}], ) print(response["output"]["message"]["content"][0]["text"]) ``` ### HTTP Text Generation ```bash curl https://genai-nexus.api.corpinter.net/model//converse \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $NEXUS_API_KEY" \ -d '{ "model": "claude-sonnet-4", "messages": [ { "role": "user", "content": [{"text": "Hello, Claude"}] } ] }' ``` ## Streaming Responses Streaming returns partial output as soon as tokens or text deltas are produced. This lowers latency to first character and is useful for chat UIs, live drafting, assistants, and long answers. Core event types: - `contentBlockDelta`: contains a delta, usually `delta.text`, with newly generated text. - `messageStop`: signals the end of generation. Inspect `stopReason` if needed. - `contentBlockStart` / `contentBlockStop`: structural boundaries that can appear with tool use or multimodal output. - `metadata`: optional interim metadata such as token counts. - `error`: error event. The caller should abort the current display and handle retry or logging. ### Python Streaming ```python import boto3 import os # export AWS_BEARER_TOKEN_BEDROCK=${your-bedrock-api-key} os.environ["AWS_BEARER_TOKEN_BEDROCK"] = "" client = boto3.client( service_name="bedrock-runtime", endpoint_url="https://genai-nexus.api.corpinter.net", region_name="nexus", # required but internally overridden ) response = client.converse_stream( modelId="claude-sonnet-4", messages=[ { "role": "user", "content": [{"text": "What is the meaning of life?"}], } ], ) stream = response.get("stream") collected = [] for event in stream: if "contentBlockDelta" in event: delta = event["contentBlockDelta"]["delta"] text = delta.get("text") if text: collected.append(text) print(text, end="", flush=True) if "messageStop" in event: break ``` ### HTTP Streaming Raw HTTP streaming uses chunked transfer. This request initiates streaming generation and receives incremental chunks: ```bash curl -N \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $NEXUS_API_KEY" \ https://genai-nexus.api.corpinter.net/model//converse-stream \ -d '{ "model": "claude-sonnet-4", "messages": [ {"role": "user", "content": [{"text": "Say hello"}]} ] }' ``` Simplified request schema: ```http POST /model//converse-stream HTTP/1.1 Content-Type: application/json { "messages": [{ "role": "user", "content": [{ "text": "..." }]}], "inferenceConfig": { "maxTokens": 512, "temperature": 0.7, "topP": 0.9 }, "stopSequences": [""], "toolConfig": { "...": "..." }, "system": [{ "text": "System prompt" }], "additionalModelRequestFields": { "...": "..." } } ``` ## Image Understanding Images are passed through the `messages` parameter using an image content block. ### HTTP Image Example ```bash # Base64 encode the image into IMG_B64. # Use raw bytes, not a data URI. IMG_B64=$(base64 -i ./image.png | tr -d '\n') curl \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $NEXUS_API_KEY" \ https://genai-nexus.api.corpinter.net/model//converse \ -d '{ "model": "claude-sonnet-4", "messages": [ { "role": "user", "content": [ {"text": "Describe the image"}, { "image": { "format": "png", "source": {"bytes": "'$IMG_B64'"} } } ] } ] }' ``` ### Python Image Example ```python image_ext = image_filepath.split(".")[-1] with open(image_filepath, "rb") as f: image = f.read() messages = [ { "role": "user", "content": [ {"text": "Describe the image"}, { "image": { "format": image_ext, "source": { "bytes": image, }, } }, ], } ] ``` ## Implications for `nexus-claude-api` Claude Code expects Anthropic Messages API behavior, while AI Nexus currently documents Converse API behavior. The local proxy should therefore: - Expose an Anthropic-compatible `/v1/messages` endpoint locally. - Translate Anthropic Messages requests to Bedrock Converse requests. - Translate Bedrock Converse and Converse Stream responses back to Anthropic-compatible responses. - Use `AWS_BEARER_TOKEN_BEDROCK` or `NEXUS_API_KEY` as the outbound Nexus credential. - Avoid changing Claude Code workflows or requiring users to call Converse directly.