API referenceModels
Create Model
Needs `write` on the workspace and on the model's provider, whose credential the model spends.
POST
/api/v1/modelsNeeds write on the workspace and on the model's provider, whose credential the model spends.
AuthorizationBearer <token>
A workspace API key (a13n_...)
In: header
Header Parameters
X-Workspace-ID?|
The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/models" \ -H "Content-Type: application/json" \ -d '{ "config": { "model_api": "string", "model_name": "string" }, "name": "string", "provider_id": "string" }'{ "catalog_ref": { "model": "string", "provider": "string" }, "config": { "characteristics": { "capabilities": [ "string" ], "compact_threshold": 0.9, "context_window_tokens": 1, "proactive_context_management_threshold": 0.65 }, "extra_body": { "property1": null, "property2": null }, "extra_headers": {}, "max_tokens": 1, "model_api": "string", "model_name": "string", "settings": { "property1": null, "property2": null }, "temperature": 0, "top_p": 1 }, "created_at": "2019-08-24T14:15:22Z", "created_by_id": "string", "description": "string", "enabled": true, "key": "string", "name": "string", "organization_id": "string", "pricing": { "context_window": 1, "model": "string", "provider": "string", "rules": [ { "constraint": { "end_time": "14:15:22Z", "kind": "always", "start_date": "2019-08-24", "start_time": "14:15:22Z", "weekdays": [] }, "max_input_tokens": 1, "prices": [ { "price": "string", "price_key": "string", "tiers": [] } ], "rule_id": "string", "service_tier": "string" } ], "source": "string", "source_revision": "string", "source_url": "http://example.com" }, "provider_id": "string", "updated_at": "2019-08-24T14:15:22Z", "updated_by_id": "string", "version": 0, "workspace_id": "string"}