Developer API
Versioning, OpenAPI, and deprecation
Generate clients from the contract and detect compatible, breaking, and sunset changes.
Track the URL contract
The stable prefix is /api/v1. New optional fields, endpoints, and output enum values may be added within v1; breaking changes move to a new prefix.
# path typo: /message instead of /messages
curl https://oppermind.com/api/v1/message \
-H "Authorization: Bearer $OPPERMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"oppermind-lato-1","messages":[{"role":"user","content":"Hello"}]}'{
"error": {
"type": "invalid_request",
"code": "OPMD_ROUTE_404",
"message": "Unknown API endpoint. See https://oppermind.com/api/v1/docs"
}
}Read X-API-Version
The dated X-API-Version response header identifies the contract build. Log it with each request so changes can be correlated with behavior.
curl https://oppermind.com/api/v1/messages \
-H "Authorization: Bearer $OPPERMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"oppermind-lato-1","max_tokens":80,"messages":[{"role":"user","content":"One line: what does a bill of lading prove?"}]}' \
-i{
"id": "req_2b8e4d1a6f3c9e7b5a0d1f4c",
"model": "oppermind-lato-1",
"role": "assistant",
"content": [
{
"type": "text",
"text": "It proves the carrier received the goods and sets out the terms of their carriage."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 18,
"output_tokens": 19
}
}Use authenticated OpenAPI
GET /api/v1/openapi.json returns the OpenAPI 3.1 description to a valid API key. Use it for generated types, contract tests, Postman, or client scaffolding.
curl https://oppermind.com/api/v1/openapi.json \ -H "Authorization: Bearer $OPPERMIND_API_KEY" \ -o openapi.json
{
"openapi": "3.1.0",
"info": { "title": "Oppermind Developer API", "version": "2026-06-17", … },
"paths": { "/api/v1/messages": { … }, "/api/v1/images": { … }, "/api/v1/videos": { … }, … },
"components": {
"securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "opmd_sk_*" } },
"parameters": { "IdempotencyKey": { "name": "Idempotency-Key", "in": "header", … } },
"schemas": {
"MessageRequest": { … }, "MessageResponse": { … },
"ImageRequest": { … }, "ImageResponse": { … },
"VideoRequest": { … }, "VideoResult": { … },
"Error": { … }
}
}
}Monitor the changelog
GET /api/v1/changelog describes compatible changes, breaking-change rules, and deprecations. Use it in release review or CI rather than relying on memory.
curl https://oppermind.com/api/v1/changelog \ -H "Authorization: Bearer $OPPERMIND_API_KEY" \ | jq '.current_version, .deprecations'
{
"api": "Oppermind Developer API",
"current_version": "2026-06-17",
"versioning_policy": {
"scheme": "url-prefix",
"stable_prefix": "/api/v1/",
"what_counts_as_breaking": [ … ],
"what_is_non_breaking": [ … ]
},
"deprecation_policy": { "minimum_runway_days": 180, "signalling": [ … ], "enforcement": "…" },
"deprecations": [],
"entries": [
{ "version": "2026-06-17", "date": "2026-06-17", "changes": [ … ] },
{ "version": "2026-06-04", "date": "2026-06-04", "changes": [ … ] }
]
}Respond to deprecation headers
Deprecated endpoints emit Deprecation, Sunset, and a migration Link. The published policy provides at least 180 days of runway before the endpoint returns 410 Gone.
# illustrative: what a deprecated endpoint would return
curl https://oppermind.com/api/v1/messages \
-H "Authorization: Bearer $OPPERMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"oppermind-lato-1","max_tokens":60,"messages":[{"role":"user","content":"Hello"}]}' \
-i{
"id": "req_0d5a7f2c9b4e1a8d3c6f0b5e",
"model": "oppermind-lato-1",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello. How can I help today?"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 8,
"output_tokens": 9
}
}Practise this in Oppermind Academy
Follow the related tutorial or course and apply the concept to a real task.
