Api

Generate language model reply using agent prompts

  • ❓ Inputs: πŸ‘„ Language Intelligence Provider, πŸ”‘ API Key, πŸ€– agent template name, 🧠 model name and options, and πŸ†Ž context variables for that agent
  • πŸ€– Agent Instruction Templates: LangHub template or custom: question(query, chat_history), summarize-bullets(article), summarize(article), suggest-followups(chat_history, article), answer-cite-sources(context, chat_history, query), query-resolution(chat_history, query), knowledge-graph-nodes(query, article), summary-longtext(summaries)
  • 🧠 How Language Models Work: Language models learn from billions of text examples to

identify statistical patterns and structures across diverse sources, converting words into high-dimensional vectorsβ€”numerical lists that capture meaning and relationships between concepts. These mathematical representations allow models to understand that "king/queen" share properties and "Paris/France" mirrors "Tokyo/Japan" through their transformer architecture, a neural network backbone that processes information through multiple layers of analysis. The attention mechanism enables the system to dynamically focus on relevant parts of input text when generating each word, maintaining context like humans tracking conversation threads, while calculating probability scores across the entire vocabulary for each word position based on processed context. Rather than retrieving stored responses, models create novel text by selecting the most probable words given learned patterns, maintaining coherence across long passages while adapting to specific prompt nuances through deep pattern recognition.
Self-Attention: Each word creates three representations: Query (what it's looking for), Key (what it offers), and Value (its actual content). For example, in "The cat sat on the mat," the word "cat" has a Query vector that searches for actions, a Key vector that advertises itself as a subject, and a Value vector containing its semantic meaning as an animal. The attention mechanism calculates how much "cat" should focus on other words by comparing its Query with their Keys - finding high similarity with "sat" (the action) - then combines the corresponding Value vectors to create a contextualized representation where "cat" now understands it's the one doing the sitting.

πŸ‘„ Language Intelligence Providers (LIPs)

πŸ‘„ ProviderπŸ€– Model FamiliesπŸ“š DocsπŸ”‘ KeysπŸ’° ValuationπŸ’Έ Revenue (2024)πŸ’² Cost (1M Output)
XAIGrok, Grok VisionDocsKeys$80B$100M$15.00
GroqLlama, DeepSeek, Gemini, MistralDocsKeys$2.8B-$0.79
Ollamallama, mistral, mixtral, vicuna, gemma, qwen, deepseek, openchat, openhermes, codelama, codegemma, llava, minicpm, wizardcoder, wizardmath, meditrion, falconDocsKeys-$3.2M$0
OpenAIo1, o1-mini, o4, o4-mini, gpt-4, gpt-4-turbo, gpt-4-omniDocsKeys$300B$3.7B$8.00
AnthropicClaude Sonnet, Claude Opus, Claude HaikuDocsKeys$61.5B$1B$15.00
TogetherAILlama, Mistral, Mixtral, Qwen, Gemma, WizardLM, DBRX, DeepSeek, Hermes, SOLAR, StripedHyenaDocsKeys$3.3B$50M$0.90
PerplexitySonar, Sonar Deep ResearchDocsKeys$18B$20M$15.00
CloudflareLlama, Gemma, Mistral, Phi, Qwen, DeepSeek, Hermes, SQL Coder, Code LlamaDocsKeys$62.3B$1.67B$2.25
GoogleGeminiDocsKeys-~$400M$10.00

agent_arch_viz

agent_arch_viz2

POST
/agents
agent?string

πŸ€– Agent name - LangHub template or custom: question(query, chat_history), summarize-bullets(article), summarize(article), suggest-followups(chat_history, article) : string[], answer-cite-sources(context, chat_history, query), query-resolution(chat_history, query), knowledge-graph-nodes(query, article), summary-longtext(summaries)

Default"question"
Value in"question" | "summarize-bullets" | "summarize" | "suggest-followups" | "answer-cite-sources" | "query-resolution" | "knowledge-graph-nodes" | "summary-longtext"
providerstring

πŸ‘„ LIPs Language Intelligence Providers

Default"groq"
Value in"groq" | "openai" | "anthropic" | "together" | "xai" | "google" | "perplexity" | "ollama" | "cloudflare"
keystring

πŸ”‘ API key you provide for πŸ‘„ Language Intelligence Provider

model?string

πŸ€– Model name for πŸ‘„ Language Intelligence Provider, leave blank for default

Default"meta-llama/llama-4-maverick-17b-128e-instruct"
Value in"dall-e-3" | "whisper-1" | "sora-video-gen" | "palm2" | "tii-falcon-40b" | "cohere-command-rplus" | "sonar-pro" | "sonar" | "sonar-reasoning-pro" | "sonar-reasoning" | "sonar-deep-research" | "llama-3.1-sonar-small-128k-online" | "llama-3.1-sonar-large-128k-online" | "llama-3.1-sonar-huge-128k-online" | "deepseek-r1-distill-llama-70b" | "meta-llama/llama-4-maverick-17b-128e-instruct" | "meta-llama/llama-4-scout-17b-16e-instruct" | "llama-3.3-70b-versatile" | "llama-3.3-70b-specdec" | "llama-3.2-3b-preview" | "llama-3.2-11b-vision-preview" | "llama-3.2-90b-vision-preview" | "llama-3.1-70b-versatile" | "llama-3.1-8b-instant" | "mixtral-8x7b-32768" | "gemma2-9b-it" | "gpt-4o" | "gpt-4o-mini" | "gpt-4-turbo" | "gpt-4" | "gpt-3.5-turbo" | "claude-opus-4-20250514" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514-1106" | "claude-3-7-sonnet-20250219" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo" | "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo" | "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo" | "meta-llama/Meta-Llama-3-8B-Instruct-Turbo" | "meta-llama/Meta-Llama-3-70B-Instruct-Turbo" | "meta-llama/Llama-3.2-3B-Instruct-Turbo" | "meta-llama/Meta-Llama-3-8B-Instruct-Lite" | "meta-llama/Meta-Llama-3-70B-Instruct-Lite" | "meta-llama/Llama-3-8b-chat-hf" | "meta-llama/Llama-3-70b-chat-hf" | "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF" | "Qwen/Qwen2.5-Coder-32B-Instruct" | "microsoft/WizardLM-2-8x22B" | "google/gemma-2-27b-it" | "google/gemma-2-9b-it" | "databricks/dbrx-instruct" | "deepseek-ai/deepseek-llm-67b-chat" | "google/gemma-2b-it" | "Gryphe/MythoMax-L2-13b" | "meta-llama/Llama-2-13b-chat-hf" | "mistralai/Mistral-7B-Instruct-v0.1" | "mistralai/Mistral-7B-Instruct-v0.2" | "mistralai/Mistral-7B-Instruct-v0.3" | "mistralai/Mixtral-8x7B-Instruct-v0.1" | "mistralai/Mixtral-8x22B-Instruct-v0.1" | "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO" | "Qwen/Qwen2.5-7B-Instruct-Turbo" | "Qwen/Qwen2.5-72B-Instruct-Turbo" | "Qwen/Qwen2-72B-Instruct" | "togethercomputer/StripedHyena-Nous-7B" | "upstage/SOLAR-10.7B-Instruct-v1.0" | "meta-llama/Llama-Vision-Free" | "meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo" | "meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo" | "grok-beta" | "grok-vision-beta" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-flash-preview-04-17" | "gemini-2.0-flash-001" | "gemini-2.0-flash-lite-001" | "gemini-2.0-flash-live-preview-04-09" | "imagen-3.0-generate-002" | "imagen-3.0-fast-generate-001" | "meta-llama/Llama-3.3-70B" | "gemma-3" | "gemma-2" | "gemma"
html?boolean

πŸ“„ Format of response. true=HTML, false=Markdown

Defaulttrue
temperature?number

πŸ”₯ Controls response predictability:

  • 0 to 1.0: 🎯 More deterministic, predictable responses
  • 1.0 to 2.0: 🎨 More creative, varied responses
Default1
query?string

(context for some agents) Use query to answer

chat_history?string

(context for some agents) Chat history

article?string

(context for some agents) Article to summarize

Response Body

curl -X POST "https://loading/agents" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "groq",
    "key": "string"
  }'
{
  "content": "string",
  "extact": {}
}
{
  "error": "string"
}