Api Models Create 2

POST handler with superadmin-only field protection.

Strips superadmin-only fields from non-superadmin requests before delegating to OrganizationInjectionMixin.post() for org injection.

Authentication

AuthorizationBearer
JWT access token or Respan API key

Path parameters

model_namestringRequired

Request

This endpoint expects an object.
providerobjectRequired
model_namestringRequired1-255 characters
organizationinteger or nullRequired
projectstring or nullOptional>=1 character
affiliation_categoryenumOptional
  • custom - Custom
  • keywordsai - Keywordsai
is_managedbooleanOptional
is_called_by_custom_namebooleanOptional
base_model_namestringOptional<=255 characters
display_namestringOptional<=255 characters
speeddoubleOptional
max_context_windowintegerOptional-2147483648-2147483647
model_sizeintegerOptional-2147483648-2147483647
mmlu_scoredoubleOptional
mt_bench_scoredoubleOptional
big_bench_scoredoubleOptional
input_costdoubleOptional
output_costdoubleOptional
cache_hit_input_costdoubleOptional
cache_creation_input_costdoubleOptional
respan_discount_ratedouble or nullOptional
rate_limitintegerOptional-2147483648-2147483647
token_rate_limitintegerOptional-2147483648-2147483647
multilingualintegerOptional-2147483648-2147483647
streaming_supportintegerOptional-2147483648-2147483647
function_callintegerOptional-2147483648-2147483647
enforce_function_callintegerOptional-2147483648-2147483647
weightdoubleOptional
image_supportintegerOptional-2147483648-2147483647
orderintegerOptional-2147483648-2147483647
sdkstringOptional1-255 characters
foundation_model_namestringOptional<=255 characters
drop_paramslist of stringsOptional
overridden_fieldslist of stringsOptional
load_balance_backupsanyOptional
fallbacksanyOptional
deprecatedbooleanOptional
statusenumOptional
  • active - Active
  • deprecated - Deprecated
is_verifiedbooleanOptional

Whether the model’s pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary.

total_requestslongOptional-9223372036854776000-9223372036854776000
total_costdoubleOptional
total_tokenslongOptional-9223372036854776000-9223372036854776000
total_completion_tokenslongOptional-9223372036854776000-9223372036854776000
total_prompt_tokenslongOptional-9223372036854776000-9223372036854776000
avg_tpsdoubleOptional
sourceenumOptional

Source of truth for this model definition

  • hardcoded - Synced from Code
  • db - Database Only
model_typeenumOptional

Type of model: chat, embedding, or audio

  • chat - Chat
  • embedding - Embedding
  • audio - Audio
metadataobjectOptional

Flexible catalog metadata; known keys are documented, extras allowed.

foundation_modelinteger or nullOptional

Response

idintegerRead-only
providerobject
supported_paramsstringRead-only
model_namestring<=255 characters
is_byokbooleanRead-only
effective_discount_ratedoubleRead-only
projectstring or null
affiliation_categoryenum
  • custom - Custom
  • keywordsai - Keywordsai
is_managedboolean
is_called_by_custom_nameboolean
base_model_namestring<=255 characters
display_namestring<=255 characters
speeddouble
max_context_windowinteger-2147483648-2147483647
model_sizeinteger-2147483648-2147483647
mmlu_scoredouble
mt_bench_scoredouble
big_bench_scoredouble
input_costdouble
output_costdouble
cache_hit_input_costdouble
cache_creation_input_costdouble
respan_discount_ratedouble or null
rate_limitinteger-2147483648-2147483647
token_rate_limitinteger-2147483648-2147483647
multilingualinteger-2147483648-2147483647
streaming_supportinteger-2147483648-2147483647
function_callinteger-2147483648-2147483647
enforce_function_callinteger-2147483648-2147483647
weightdouble
image_supportinteger-2147483648-2147483647
orderinteger-2147483648-2147483647
sdkstring<=255 characters
foundation_model_namestring<=255 characters
drop_paramslist of strings
overridden_fieldslist of strings
load_balance_backupsany
fallbacksany
deprecatedboolean
statusenum
  • active - Active
  • deprecated - Deprecated
is_verifiedboolean

Whether the model’s pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary.

total_requestslong-9223372036854776000-9223372036854776000
total_costdouble
total_tokenslong-9223372036854776000-9223372036854776000
total_completion_tokenslong-9223372036854776000-9223372036854776000
total_prompt_tokenslong-9223372036854776000-9223372036854776000
avg_tpsdouble
sourceenum

Source of truth for this model definition

  • hardcoded - Synced from Code
  • db - Database Only
model_typeenum

Type of model: chat, embedding, or audio

  • chat - Chat
  • embedding - Embedding
  • audio - Audio
metadataobject

Flexible catalog metadata; known keys are documented, extras allowed.

foundation_modelinteger or null