Use the API with AI tools
Connect your Ur Next Door API key to Claude Code, Codex CLI or a ChatGPT custom GPT, and what Claude Desktop needs. Safety rules for agents that post as you.
An AI agent with your key can draft, illustrate, schedule and publish content for you. The API was designed for this: it has an OpenAPI document that agents can read, an llms.txt index of these docs, a clean Markdown copy of every page, and a ready system prompt.
Which tool, and how
| Tool | Works today? | How it calls the API | Guide |
|---|---|---|---|
| Claude Code (terminal, IDE or the Code tab of the Claude desktop app) | Yes | Runs curl with your key from an environment variable | Claude Code |
| Codex CLI | Yes, after you enable network access | Runs curl with your key from an environment variable | Codex CLI |
| ChatGPT custom GPT | Yes, with limits on images | GPT Actions, imported from the OpenAPI URL | ChatGPT Actions |
| Claude Desktop chat and claude.ai | Not yet | Needs an MCP server; an official one is on the roadmap | Claude Desktop |
| Your own agent or script | Yes | Any HTTP client | Reference |
Rules every agent should follow
These are built into the system prompt. Paste it into your tool so you do not have to repeat them:
- Read the key from
UND_API_KEY, never print it. The agent should never echo, log or write the key, and never put it in a URL. - Confirm before publishing. Public content goes out under your name. Ask the agent to show a preview and wait for your yes, unless you said otherwise.
- Upload images first, then use
data.url. See Upload images. - Look ids up, never invent them. Communities, categories, job options and places come from the lookups.
- Send an
Idempotency-Keyon every create, so a retry never posts twice. - Schedule in UTC with
Z, between 5 minutes and 180 days ahead, and say both times back to you. - Handle errors properly. On
422, fix the named fields. On429, waitRetry-Afterand report the remaining quota. - Finish with links. Return the
web_urlof everything created.
Give each agent its own key
Create one key per tool, with only the scopes it needs, and a short expiry. Then API analytics shows what each agent did, and you can revoke one without touching the others.
Next steps
- Claude Codeset the key, add a CLAUDE.md note, allow curl.
- Codex CLIset the key, AGENTS.md, and turn on network access.
- ChatGPT Actionsimport the OpenAPI URL and keep the GPT private.
- System promptthe copy-paste rules for any agent.
- Prompt recipesprompts that work well.
- Claude Desktopwhat it needs, and what to use meanwhile.
Last updated