A managed API lets an application use a model hosted by an external provider. Choosing one over running an open-source model on your own infrastructure is a product, financial, and legal decision—not just a technical one. section 10.2 section 10.2.1
For production use, weigh the speed against the constraints:
- Fast start: access capable models with little effort, without managing GPUs, versioning, or software updates; prototypes can be ready in hours. section 10.2.1
- Variable cost: per-token charges can rise with traffic and long prompts or responses; usage-based pricing may not make the final bill clear in advance. section 10.2.1
- Provider reliance: an outage can take an AI feature offline, so account for availability alongside cost when choosing where the model runs. section 10.2
A chatbot response can cost more than a test prompt suggests
A customer asks for urgent help troubleshooting a premium analytics dashboard handling 75,000+ records. The detailed response uses 1,247 tokens and costs $0.32—a reminder that real user requests can be much longer than short test questions. section 10.2.1
import openai
client = openai.OpenAI(api_key="your-key-here")
response = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role": "user", "content": "Help me with my order"}]
)
print(response.choices[0].message.content)
A minimal OpenAI Python client example sends a chat-completion request and prints the model response. section 10.2.1
