Topic
cURL LLM API Cookbook
15 posts on curl llm api cookbook — part of api integration on the n4n AI blog.
Uploading files to an LLM API with curl multipart forms
Learn how to perform a curl multipart file upload llm api request from CLI with step-by-step examples for vision, documents, and errors.
Testing API key auth with curl before writing code
Learn how to curl test api key authentication against LLM endpoints before writing code. Step-by-step CLI checks for bearer tokens, error cases, and live calls.
Setting temperature and max_tokens in a curl request
Learn how to set curl temperature max_tokens parameters in LLM API requests with runnable examples and verification steps for OpenAI-compatible endpoints.
Sending images to a vision model with curl
Step-by-step guide to a curl vision model image request: encode images, build OpenAI-compatible JSON, post with curl, and verify multimodal LLM responses.
Retrying failed curl requests with exponential backoff
A practical curl retry exponential backoff script for bash: handle transient HTTP failures against LLM APIs with retries, jitter, and timeouts.
Piping curl streaming output into jq for parsing
Step-by-step guide to piping curl streaming output into jq for parsing LLM API Server-Sent Events: strip data prefixes, filter deltas, and test locally.
Debugging LLM API errors with curl -v
Use curl -v to debug LLM API errors by exposing raw HTTP requests, TLS issues, and provider responses—a practical how-to for engineers integrating models.
curl one-liners for checking LLM API rate limit headers
Practical curl rate limit headers one-liners to inspect LLM API throttling, quota, and reset times across OpenAI, Anthropic, and inference providers.
curl examples for function calling and tool use
Runnable curl function calling tool use examples for OpenAI-compatible LLM endpoints: define tools, send requests, parse tool_calls, and return results step by step.
curl examples for embeddings and vector search
Hands-on curl embeddings api examples for generating OpenAI-compatible embeddings and querying a vector store, with verifiable runnable steps.
Comparing OpenAI and Anthropic request bodies with curl
A practical head-to-head of curl OpenAI vs Anthropic request bodies: auth, message shape, streaming, cost model, limits, and ergonomics, with a comparison table and verdict.
Building a Postman collection from curl LLM examples
Practical guide to convert curl to Postman collection LLM API examples with ordered steps, runnable code, and verification tips for engineers.
Streaming chat completions from the command line with curl
Learn how to run curl streaming chat completions command line against an OpenAI-compatible API, parse SSE, and verify token streaming end to end.
curl headers every OpenAI-compatible API call needs
Practical guide to the curl headers every OpenAI-compatible API call needs, covering auth, content negotiation, routing, and streaming pitfalls.
Calling the OpenAI chat completions API with curl
Learn how to call the OpenAI chat completions API with curl: from API key setup to streaming, error handling, and verifying JSON responses via CLI.
More topics in api integration
- Function Calling Fundamentals27
- Structured Outputs & JSON Mode19
- Integrating GPT-5, Claude Opus 4.8, Gemini 3, Llama 4 & More via One API15
- Next.js AI Chat Integration (App Router + Vercel AI SDK)15
- FastAPI LLM Backend Integration14
- Go net/http LLM API Client14
- LangChain + OpenAI-Compatible Gateway Integration14
- Node.js OpenAI-Compatible SDK Integration14
- Python + OpenAI-Compatible SDK Integration14
- Rate Limits, Retries & Backoff Strategies14
- React Streaming Chat UI Patterns14
- Server-Sent Events (SSE) Streaming Deep Dive14