How to Send Images to an LLM API: base64 vs URL (OpenAI & Anthropic)
Send an image to an LLM API with an image block in the user message: a public URL or inline base64. OpenAI and Anthropic formats, limits, billing, errors.
Blog
Troubleshooting guides, IP and privacy explainers, AI service updates and model watch — each backed by tools and data you can check yourself.
Send an image to an LLM API with an image block in the user message: a public URL or inline base64. OpenAI and Anthropic formats, limits, billing, errors.
Manage API keys across projects with one key per project and environment, clear names, scoped limits. Five steps, a naming template, and a rotation checklist.
A platform budget alone won't stop an overnight overspend. Use four layers: prepaid balance, budgets and alerts, per-project keys, and a code-level cap, with a Python example.
To count tokens in a text, estimate locally with tiktoken, then verify with the provider's count endpoint or the usage field. Includes Python code and a table.
A reply that stops mid-sentence usually means finish_reason is length (max_tokens on Anthropic). See the values, 4 causes, and Python continuation code.
max_tokens caps how long one reply can be, so bigger isn't better. Learn how it relates to the context window, which APIs require it, and how to pick a value.
RPM is requests per minute and TPM is tokens per minute; exceed either and you get throttled. Learn RPD, where to find your tier, and a 4-step estimate.
Don't trust a homepage percentage. Using AGI Plan's public hourly request data, learn to download the CSV, compute uptime by the 5xx rule, and know its limits.
Point Codex at AGI Plan by editing the base URL and an env var in config.toml. Includes a provider example, key setup, a 4-step check and where to look on errors.
Point Claude Code at AGI Plan by changing the base URL and API key. Env var and settings.json setups, verification, rollback, and common error fixes.
Claude Code has no separate fee; costs come from a Claude subscription or API usage. Compare the official subscription, the official API, and RMB gateways, plus 5 checks to run first.
Check which countries OpenAI supports on the official pages, not reposts. A 4-step check for ChatGPT and the API, plus what to do about region errors.
Getting logged out of Claude is rarely a ban. Check user reports and official status first, then cookies, extensions, clock and network, with a table.
Run a four-step, 5-minute network check before using AI: check your exit IP, test for DNS and WebRTC leaks, confirm service status, and measure latency.
A home IP on a blacklist often needs no panic. Use /ip to see which DNSBL listed it, then redial, call your ISP, or request delisting, and scan your devices.
A shared IP is one public address used by many people. See how NAT, CGNAT and public Wi-Fi share exits, how reputation lists log them, and how to check.
Pre-made Claude and ChatGPT accounts carry five risks: terms, suspension, data, payment, and unknown origin. Here are compliant alternatives and a checklist.
A bearer token is a header format, an API key is the credential itself. See which header OpenAI and Anthropic use, and how to debug a wrong one.
Windows curl JSON errors usually come from shell quoting. Get working cmd, PowerShell and Git Bash syntax, plus the safer -d @file.json method and next steps.
Call an LLM API without code: set up variables, an Authorization header and a JSON body in Postman or Apifox, then debug by status code, with an error table.
Test an API endpoint in 3 steps: check DNS and TLS, request /v1/models, then send a minimal chat call. Each result tells you if it's the network, auth, or model name.
Switch LangChain's endpoint with ChatOpenAI and ChatAnthropic: parameters, env vars, a 10-line check, and a 404/401 troubleshooting order.
Set the Anthropic SDK base_url by passing it to Anthropic() or using ANTHROPIC_BASE_URL. Includes a minimal example and how to debug a 404 from an extra /v1.
The core difference is the header: API_KEY sends x-api-key, AUTH_TOKEN sends Authorization: Bearer. When to use each, what conflicts, and a 5-step checklist.