🧬LLM API
Also known as Large Language Model API, Model API, AI API
A web service your code calls to get text back from a big AI model.
Think of it like
Think of it like ordering food by phone. You say what you want, and the kitchen sends it back.
Example
Jack's help app sends each customer question to the OpenAI API with a short system prompt. The reply comes back in about two seconds. It goes straight into the chat.
Why it matters
It puts the best models one web call away. You have no machines to buy or run.
Definition
Example code
json
{
"model": "model-name",
"max_tokens": 300,
"messages": [
{ "role": "user", "content": "Summarize this email." }
]
}Common mistake
Key takeaways
- 1Request and reply. Text in, text out.
- 2A secret key. Kept on the server.
- 3Paid per token. Every call costs.