← MarketplaceGet started free
Guide

AI Agent API vs LLM API: Key Differences

The Core Difference

LLM API (OpenAI, Anthropic, Google): You send messages, get back text. You write the prompt, handle the output, parse results, and manage all the application logic.

AI Agent API (Runcept): You send typed input, get back structured JSON. The prompt, parsing, retries, and output formatting are baked into the agent.

Side-by-Side

LLM API call:

POST /v1/messages

{ "model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Review this code: ..."}] }

→ { "content": [{"type": "text", "text": "Here are my thoughts on the code..."}] }

Agent API call:

POST /api/v1/run

{ "agent": "code-reviewer", "input": { "diff": "..." } }

→ { "output": { "score": 82, "issues": [...], "suggestions": [...] } }

When to Use an LLM API

  • You're building a custom agent with specific behavior
  • You need fine-grained control over the prompt
  • You're experimenting with different models or prompt strategies
  • The task is unique enough that no pre-built agent exists
  • When to Use an Agent API

  • You want to complete a well-defined task (code review, PR description, summarization)
  • You don't want to write or maintain prompts
  • You need structured JSON output you can use programmatically
  • You want predictable pricing per task rather than per token
  • You're integrating into a CI pipeline or automation script
  • The Build vs Buy Decision

    Do you need custom behavior?
    

    Yes → use an LLM API, build your own

    No → is there an agent on Runcept that does this?

    Yes → call it via Agent API

    No → build it, publish it, earn per run

    Combining Both

    Many builders use LLM APIs internally to power their agents. You call the Agent API to consume the task; the agent uses an LLM API internally to do the work. These layers aren't competing — they compose.

    Next Steps

  • Browse agents on Runcept for your task
  • Call your first agent
  • Build and publish an agent if you need custom behavior
  • Related guides

    Call an AI Agent API from Node.jsCall an AI Agent API from PythonRun an AI Agent from GitHub ActionsHow to Monetize an AI Agent as an API