{"openapi":"3.1.0","info":{"title":"OpenGateLLM","summary":"OpenGateLLM connect to your models. You can configure this swagger UI in the configuration file, like hide routes or change the title.","description":"[See documentation](https://github.com/etalab-ia/opengatellm/blob/main/README.md)","license":{"name":"MIT Licence","identifier":"MIT","url":"https://raw.githubusercontent.com/etalab-ia/opengatellm/refs/heads/main/LICENSE"},"version":"0.9.0"},"paths":{"/v1/admin/keys":{"post":{"tags":["Admin"],"summary":"Create Key","description":"Create a new key for a user.","operationId":"create_key_v1_admin_keys_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__infrastructure__fastapi__schemas__admin__keys__CreateKeyBody","description":"The key creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"400":{"description":"Key expiration timestamp cannot be greater than {max_expiration_days} days from now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Keys","operationId":"get_keys_v1_admin_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The user ID to filter keys by.","title":"User"},"description":"The user ID to filter keys by."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of keys to skip.","default":0,"title":"Offset"},"description":"Number of keys to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of keys to return.","default":10,"title":"Limit"},"description":"Maximum number of keys to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KeyStatus"},{"type":"null"}],"description":"Filter by key status. Omit to return all keys.","title":"Status"},"description":"Filter by key status. Omit to return all keys."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/keys/{key_id}":{"get":{"tags":["Admin"],"summary":"Get Key","operationId":"get_key_v1_admin_keys__key_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to get.","title":"Key Id"},"description":"The ID of the key to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Key","description":"Revoke an API key. A revoked key can no longer be used.","operationId":"delete_key_v1_admin_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to revoke.","title":"Key Id"},"description":"The ID of the key to revoke."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/organizations":{"post":{"tags":["Admin"],"summary":"Create Organization","operationId":"create_organization_v1_admin_organizations_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationBody","description":"The organization creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Organization {name} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Organizations","operationId":"get_organizations_v1_admin_organizations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of organizations to skip.","default":0,"title":"Offset"},"description":"Number of organizations to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of organizations to return.","default":10,"title":"Limit"},"description":"Maximum number of organizations to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/OrganizationSortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationsResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/organizations/{organization_id}":{"get":{"tags":["Admin"],"summary":"Get Organization","operationId":"get_organization_v1_admin_organizations__organization_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the organization to get.","title":"Organization Id"},"description":"The ID of the organization to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Organization {organization_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Organization","operationId":"delete_organization_v1_admin_organizations__organization_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the organization to delete.","title":"Organization Id"},"description":"The ID of the organization to delete."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Organization {organization_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Organization {organization_id} still has users and cannot be removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Organization","operationId":"update_organization_v1_admin_organizations__organization_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the organization to update.","title":"Organization Id"},"description":"The ID of the organization to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationBody","description":"The organization update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Organization {organization_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Organization {name} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/providers":{"post":{"tags":["Admin"],"summary":"Create Provider","operationId":"create_provider_v1_admin_providers_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProviderBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProviderResponse"}}}},"400":{"description":"Inconsistent max context length for {model_name}. Expected: {expected_length}. Actual: {actual_length}
Inconsistent vector size for {model_name}. Expected: {expected_size}. Actual: {actual_size}
Invalid model provider type {input_type} for {expected_type} router.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"424":{"description":"Model provider {name} not reachable ({status_code}): {detail}
Model provider {name} returned an invalid response: {detail}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model {name} not found.
Model router {router_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Model provider {model_name} for url {url} already exists for router {router_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Providers","operationId":"get_providers_v1_admin_providers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"router_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter providers by router ID.","title":"Router Id"},"description":"Filter providers by router ID."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of providers to skip.","default":0,"title":"Offset"},"description":"Number of providers to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of providers to return.","default":10,"title":"Limit"},"description":"Maximum number of providers to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ProviderSortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvidersResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/providers/{provider_id}":{"delete":{"tags":["Admin"],"summary":"Delete Provider","operationId":"delete_provider_v1_admin_providers__provider_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the provider to delete.","title":"Provider Id"},"description":"The ID of the provider to delete."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"404":{"description":"Model provider {provider_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Provider","operationId":"update_provider_v1_admin_providers__provider_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the provider to update.","title":"Provider Id"},"description":"The ID of the provider to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProviderBody","description":"The provider update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"400":{"description":"Inconsistent max context length for {model_name}. Expected: {expected_length}. Actual: {actual_length}
Inconsistent vector size for {model_name}. Expected: {expected_size}. Actual: {actual_size}
Invalid model provider type {input_type} for {expected_type} router.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Model provider {model_name} for url {url} already exists for router {router_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model router {router_id} not found.
Model provider {provider_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Provider","operationId":"get_provider_v1_admin_providers__provider_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the provider to get.","title":"Provider Id"},"description":"The ID of the provider to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model provider {provider_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/roles":{"post":{"tags":["Admin"],"summary":"Create Role","operationId":"create_role_v1_admin_roles_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleBody","description":"The role creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Role {role_name} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Roles","operationId":"get_roles_v1_admin_roles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of roles to skip.","default":0,"title":"Offset"},"description":"Number of roles to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of roles to return.","default":10,"title":"Limit"},"description":"Maximum number of roles to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolesResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/roles/{role_id}":{"patch":{"tags":["Admin"],"summary":"Update Role","operationId":"update_role_v1_admin_roles__role_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the role to update.","title":"Role Id"},"description":"The ID of the role to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleBody","description":"The role update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Role {role_name} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Role {role_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Role","operationId":"get_role_v1_admin_roles__role_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the role to get.","title":"Role Id"},"description":"The ID of the role to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Role {role_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Role","operationId":"delete_role_v1_admin_roles__role_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the role to delete.","title":"Role Id"},"description":"The ID of the role to delete."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Role {role_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Role {role_id} still has users and cannot be removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/routers":{"post":{"tags":["Admin"],"summary":"Create Router","operationId":"create_router_v1_admin_routers_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRouterBody","description":"The router creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouterResponse"}}}},"409":{"description":"Following aliases already exist: '{router_aliases}'
Router {router_name} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Routers","operationId":"get_routers_v1_admin_routers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of routers to skip.","default":0,"title":"Offset"},"description":"Number of routers to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of routers to return.","default":10,"title":"Limit"},"description":"Maximum number of routers to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutersResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/routers/{router_id}":{"get":{"tags":["Admin"],"summary":"Get Router","operationId":"get_router_v1_admin_routers__router_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"router_id","in":"path","required":true,"schema":{"type":"integer","description":"The router ID.","title":"Router Id"},"description":"The router ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouterResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model router {router_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Router","operationId":"delete_router_v1_admin_routers__router_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"router_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the router to delete (router ID, eg. 123).","title":"Router Id"},"description":"The ID of the router to delete (router ID, eg. 123)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouterResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model router {router_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Router","operationId":"update_router_v1_admin_routers__router_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"router_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the router to update (router ID, eg. 123).","title":"Router Id"},"description":"The ID of the router to update (router ID, eg. 123)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRouterBody","description":"The router update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouterResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model router {router_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"Following aliases already exist: '{router_aliases}'
Router {router_name} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users":{"post":{"tags":["Admin"],"summary":"Create User","operationId":"create_user_v1_admin_users_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserBody","description":"The user creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"409":{"description":"User {email} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Role {role_id}|{name} not found.
Organization {organization_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Users","operationId":"get_users_v1_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The ID of the role to filter the users by.","title":"Role Id"},"description":"The ID of the role to filter the users by."},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The ID of the organization to filter the users by.","title":"Organization Id"},"description":"The ID of the organization to filter the users by."},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email substring to filter the users by.","title":"Email"},"description":"Email substring to filter the users by."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of users to skip.","default":0,"title":"Offset"},"description":"Number of users to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of users to return.","default":10,"title":"Limit"},"description":"Maximum number of users to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UserSortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersResponse"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}":{"get":{"tags":["Admin"],"summary":"Get User","operationId":"get_user_v1_admin_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the user to get.","title":"User Id"},"description":"The ID of the user to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete User","operationId":"delete_user_v1_admin_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the user to delete.","title":"User Id"},"description":"The ID of the user to delete."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"User {user_id} still has routers and cannot be removed.
User {user_id} still has providers and cannot be removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update User","operationId":"update_user_v1_admin_users__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the user to update.","title":"User Id"},"description":"The ID of the user to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateRequest","description":"The user update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"404":{"description":"User {user_id}|{email} not found.
Role {role_id}|{name} not found.
Organization {organization_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"User {email} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid current password.
Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"User has no admin rights.
Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/transcriptions":{"post":{"tags":["Audio"],"summary":"Create Audio Transcription","operationId":"create_audio_transcription_v1_audio_transcriptions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_audio_transcription_v1_audio_transcriptions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionsResponse"}}}},"503":{"description":"Model is too busy, please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model {name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"429":{"description":"Token/request limit per minute/day exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Model has wrong type. Expected: {expected_type}. Actual: {actual_type}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"400":{"description":"Insufficient budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"413":{"description":"File size limit exceeded. Expected: {expected_size}. Actual: {size}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/login":{"post":{"tags":["Auth"],"summary":"Login","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginResponse"}}}},"401":{"description":"Invalid email or password.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sso/login":{"post":{"tags":["Auth"],"summary":"Sso Login","operationId":"sso_login_v1_auth_sso_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSsoLoginBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginResponse"}}}},"404":{"description":"Organization {organization_id}|{name} not found.
Role {role_id}|{name} not found.
User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"User {email} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Access denied, please contact your administrator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid SSO session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"503":{"description":"SSO provider is not available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Create Chat Completions","description":"Creates a model response for the given chat conversation.","operationId":"create_chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatCompletionsBody","description":"The chat completion request."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionResponse"},{"$ref":"#/components/schemas/ChatCompletionChunkResponse"}],"title":"Response Create Chat Completions V1 Chat Completions Post"}}}},"503":{"description":"Model is too busy, please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model {name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"429":{"description":"Token/request limit per minute/day exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Model has wrong type. Expected: {expected_type}. Actual: {actual_type}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"400":{"description":"Insufficient budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/embeddings":{"post":{"tags":["Embeddings"],"summary":"Create Embeddings","operationId":"create_embeddings_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbeddingsBody","description":"The embeddings creation request."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsResponse"}}}},"503":{"description":"Model is too busy, please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model {name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"429":{"description":"Token/request limit per minute/day exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Model has wrong type. Expected: {expected_type}. Actual: {actual_type}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"400":{"description":"Insufficient budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/health":{"get":{"tags":["Health"],"summary":"Get Health","description":"Get the health of the API.","operationId":"get_health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/models":{"get":{"tags":["Health"],"summary":"Get Health Models","description":"Get the health of the models.","operationId":"get_health_models_health_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/keys":{"post":{"tags":["Keys"],"summary":"Create Key","description":"Create a new API key for the authenticated user.","operationId":"create_key_v1_keys_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__infrastructure__fastapi__schemas__keys__CreateKeyBody","description":"The key creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"400":{"description":"Key expiration timestamp cannot be greater than {max_expiration_days} days from now.
Key name {name} is reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Keys"],"summary":"Get Keys","description":"Get all your keys.\n\nOmit `status` to list every key. Use `active`, `expired`, or `revoked` to filter.","operationId":"get_keys_v1_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of keys to skip.","default":0,"title":"Offset"},"description":"Number of keys to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of keys to return.","default":10,"title":"Limit"},"description":"Maximum number of keys to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KeyStatus"},{"type":"null"}],"description":"Filter by key status. Omit to return all keys.","title":"Status"},"description":"Filter by key status. Omit to return all keys."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/keys":{"post":{"tags":["Keys"],"summary":"Create Key","description":"Create a new API key for the authenticated user.","operationId":"create_key_v1_me_keys_post","deprecated":true,"security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__infrastructure__fastapi__schemas__keys__CreateKeyBody","description":"The key creation request."}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"400":{"description":"Key expiration timestamp cannot be greater than {max_expiration_days} days from now.
Key name {name} is reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Keys"],"summary":"Get Keys","description":"Get all your keys.\n\nOmit `status` to list every key. Use `active`, `expired`, or `revoked` to filter.","operationId":"get_keys_v1_me_keys_get","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of keys to skip.","default":0,"title":"Offset"},"description":"Number of keys to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of keys to return.","default":10,"title":"Limit"},"description":"Maximum number of keys to return."},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortField","description":"Field to sort by.","default":"id"},"description":"Field to sort by."},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order.","default":"asc"},"description":"Sort order."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KeyStatus"},{"type":"null"}],"description":"Filter by key status. Omit to return all keys.","title":"Status"},"description":"Filter by key status. Omit to return all keys."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"get":{"tags":["Keys"],"summary":"Get Key","description":"Get one of your API keys by ID.","operationId":"get_key_v1_keys__key_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to get.","title":"Key Id"},"description":"The ID of the key to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Keys"],"summary":"Update Key","description":"Update an API key name.","operationId":"update_key_v1_keys__key_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to update.","title":"Key Id"},"description":"The ID of the key to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKeyBody","description":"The key update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Keys"],"summary":"Delete Key","description":"Revoke an API key. A revoked key can no longer be used.","operationId":"delete_key_v1_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to revoke.","title":"Key Id"},"description":"The ID of the key to revoke."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/keys/{key_id}":{"get":{"tags":["Keys"],"summary":"Get Key","description":"Get one of your API keys by ID.","operationId":"get_key_v1_me_keys__key_id__get","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to get.","title":"Key Id"},"description":"The ID of the key to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Keys"],"summary":"Update Key","description":"Update an API key name.","operationId":"update_key_v1_me_keys__key_id__patch","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to update.","title":"Key Id"},"description":"The ID of the key to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKeyBody","description":"The key update request."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Keys"],"summary":"Delete Key","description":"Revoke an API key. A revoked key can no longer be used.","operationId":"delete_key_v1_me_keys__key_id__delete","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the key to revoke.","title":"Key Id"},"description":"The ID of the key to revoke."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyResponse"}}}},"404":{"description":"Key {key_id} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me":{"get":{"tags":["Me"],"summary":"Get Me","description":"Get my user information.","operationId":"get_me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Me"],"summary":"Update Me","description":"Update information about the current user.","operationId":"update_me_v1_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeBody","description":"The user update request."}}},"required":true},"responses":{"204":{"description":"Successful Response"},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"User {email} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid current password.
Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/info":{"get":{"tags":["Me"],"summary":"Get Me","description":"Get my user information.","operationId":"get_me_v1_me_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Me"],"summary":"Update Me","description":"Update information about the current user.","operationId":"update_me_v1_me_info_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeBody","description":"The user update request."}}},"required":true},"responses":{"204":{"description":"Successful Response"},"404":{"description":"User {user_id}|{email} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"409":{"description":"User {email} already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid current password.
Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v1/models":{"get":{"tags":["Models"],"summary":"Get Models","description":"Lists the currently available models and provides basic information.","operationId":"get_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/models/{model}":{"get":{"tags":["Models"],"summary":"Get Model","description":"Get a model by name and provide basic information.","operationId":"get_model_v1_models__model__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","description":"The name of the model to get.","title":"Model"},"description":"The name of the model to get."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"404":{"description":"Model {name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ocr":{"post":{"tags":["OCR"],"summary":"Create Ocr","description":"Extracts text from files using Mistral Document AI pipeline","operationId":"create_ocr_v1_ocr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOCRBody","description":"The OCR creation request."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OCRResponse"}}}},"503":{"description":"Model is too busy, please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model {name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"429":{"description":"Token/request limit per minute/day exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Model has wrong type. Expected: {expected_type}. Actual: {actual_type}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"400":{"description":"Insufficient budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/organizations/me":{"get":{"tags":["Organizations"],"summary":"Get My Organization","description":"Get the organization of the authenticated user.","operationId":"get_my_organization_v1_organizations_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"404":{"description":"Organization {organization_id}|{name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/rerank":{"post":{"tags":["Rerank"],"summary":"Create Rerank","operationId":"create_rerank_v1_rerank_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRerankBody","description":"The rerank creation request."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankResponse"}}}},"503":{"description":"Model is too busy, please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"404":{"description":"Model {name} not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"429":{"description":"Token/request limit per minute/day exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Model has wrong type. Expected: {expected_type}. Actual: {actual_type}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"400":{"description":"Insufficient budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/usage":{"get":{"tags":["Usage"],"summary":"Get Usages","description":"Get daily usage buckets for the current user.","operationId":"get_usages_v1_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of usage buckets to skip.","default":0,"title":"Offset"},"description":"Number of usage buckets to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of usage buckets to return.","default":10,"title":"Limit"},"description":"Maximum number of usage buckets to return."},{"name":"start_time","in":"query","required":true,"schema":{"type":"integer","description":"Start time as Unix timestamp.","title":"Start Time"},"description":"Start time as Unix timestamp."},{"name":"end_time","in":"query","required":true,"schema":{"type":"integer","description":"End time as Unix timestamp.","title":"End Time"},"description":"End time as Unix timestamp."},{"name":"endpoint","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EndpointUsage"},{"type":"null"}],"description":"The endpoint to get usage for.","title":"Endpoint"},"description":"The endpoint to get usage for."},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Router name to filter usage by.","title":"Model"},"description":"Router name to filter usage by."},{"name":"key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Key ID to filter usage by.","title":"Key Id"},"description":"Key ID to filter usage by."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagesResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/usage":{"get":{"tags":["Usage"],"summary":"Get Usages","description":"Get daily usage buckets for the current user.","operationId":"get_usages_v1_me_usage_get","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of usage buckets to skip.","default":0,"title":"Offset"},"description":"Number of usage buckets to skip."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of usage buckets to return.","default":10,"title":"Limit"},"description":"Maximum number of usage buckets to return."},{"name":"start_time","in":"query","required":true,"schema":{"type":"integer","description":"Start time as Unix timestamp.","title":"Start Time"},"description":"Start time as Unix timestamp."},{"name":"end_time","in":"query","required":true,"schema":{"type":"integer","description":"End time as Unix timestamp.","title":"End Time"},"description":"End time as Unix timestamp."},{"name":"endpoint","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EndpointUsage"},{"type":"null"}],"description":"The endpoint to get usage for.","title":"Endpoint"},"description":"The endpoint to get usage for."},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Router name to filter usage by.","title":"Model"},"description":"Router name to filter usage by."},{"name":"key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Key ID to filter usage by.","title":"Key Id"},"description":"Key ID to filter usage by."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagesResponse"}}}},"401":{"description":"Invalid authentication scheme.
Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"403":{"description":"Your account has expired. Please contact support to renew your account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics":{"get":{"tags":["Monitoring"],"summary":"Get Metrics","operationId":"get_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"Annotation":{"properties":{"type":{"type":"string","const":"url_citation","title":"Type"},"url_citation":{"$ref":"#/components/schemas/AnnotationURLCitation"}},"additionalProperties":true,"type":"object","required":["type","url_citation"],"title":"Annotation","description":"A URL citation when using web search."},"AnnotationURLCitation":{"properties":{"end_index":{"type":"integer","title":"End Index"},"start_index":{"type":"integer","title":"Start Index"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"}},"additionalProperties":true,"type":"object","required":["end_index","start_index","title","url"],"title":"AnnotationURLCitation","description":"A URL citation when using web search."},"AudioTranscriptionLanguage":{"type":"string","enum":["af","afrikaans","albanian","am","amharic","ar","arabic","armenian","as","assamese","az","azerbaijani","ba","bashkir","basque","be","belarusian","bengali","bg","bn","bo","bosnian","br","breton","bs","bulgarian","burmese","ca","cantonese","castilian","catalan","chinese","croatian","cs","cy","czech","da","danish","de","dutch","el","en","english","es","estonian","et","eu","fa","faroese","fi","finnish","flemish","fo","fr","french","galician","georgian","german","gl","greek","gu","gujarati","ha","haitian","haitian creole","hausa","haw","hawaiian","he","hebrew","hi","hindi","hr","ht","hu","hungarian","hy","icelandic","id","indonesian","is","it","italian","ja","japanese","javanese","jw","ka","kannada","kazakh","khmer","kk","km","kn","ko","korean","la","lao","latin","latvian","lb","letzeburgesch","lingala","lithuanian","ln","lo","lt","luxembourgish","lv","macedonian","malagasy","malay","malayalam","maltese","mandarin","maori","marathi","mg","mi","mk","ml","mn","moldavian","moldovan","mongolian","mr","ms","mt","my","myanmar","ne","nepali","nl","nn","no","norwegian","nynorsk","oc","occitan","pa","panjabi","pashto","persian","pl","polish","portuguese","ps","pt","punjabi","pushto","ro","romanian","ru","russian","sa","sanskrit","sd","serbian","shona","si","sindhi","sinhala","sinhalese","sk","sl","slovak","slovenian","sn","so","somali","spanish","sq","sr","su","sundanese","sv","sw","swahili","swedish","ta","tagalog","tajik","tamil","tatar","te","telugu","tg","th","thai","tibetan","tk","tl","tr","tt","turkish","turkmen","uk","ukrainian","ur","urdu","uz","uzbek","valencian","vi","vietnamese","welsh","yi","yiddish","yo","yoruba","yue","zh"],"title":"AudioTranscriptionLanguage"},"AudioTranscriptionsResponse":{"properties":{"id":{"type":"string","title":"Id","description":"A unique identifier for the audio transcription."},"text":{"type":"string","title":"Text","description":"The transcription text."},"model":{"type":"string","title":"Model","description":"The model used to generate the transcription."},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/Segment"},"type":"array"},{"type":"null"}],"title":"Segments","description":"Diarized segments, only set when `response_format=diarized_json`."},"usage":{"$ref":"#/components/schemas/Usage","description":"Usage information for the request."}},"additionalProperties":true,"type":"object","required":["id","text","model"],"title":"AudioTranscriptionsResponse"},"AudioTranscriptionsResponseFormat":{"type":"string","enum":["json","text","diarized_json","srt","verbose_json","vtt"],"title":"AudioTranscriptionsResponseFormat"},"AuthLoginBody":{"properties":{"email":{"type":"string","maxLength":254,"minLength":1,"title":"Email","description":"The user email."},"password":{"type":"string","maxLength":72,"minLength":1,"title":"Password","description":"The user password."}},"additionalProperties":true,"type":"object","required":["email","password"],"title":"AuthLoginBody"},"AuthLoginResponse":{"properties":{"object":{"type":"string","const":"key","title":"Object","description":"Type of the object.","default":"key"},"id":{"type":"integer","title":"Id","description":"ID of the key."},"name":{"type":"string","title":"Name","description":"Name of the key."},"value":{"type":"string","title":"Value","description":"Value of the key."},"user_id":{"type":"integer","title":"User Id","description":"ID of the user that owns the key."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"Time of expiration, as Unix timestamp. If None, the key never expires."},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"revoked":{"type":"boolean","title":"Revoked","description":"Whether the key has been revoked."}},"additionalProperties":true,"type":"object","required":["id","name","value","user_id","created","revoked"],"title":"AuthLoginResponse"},"AuthSsoLoginBody":{"properties":{"sub":{"type":"string","minLength":1,"title":"Sub","description":"Subject identifier from the OIDC id_token."},"iss":{"type":"string","minLength":1,"title":"Iss","description":"Issuer identifier from the OIDC id_token."},"exp":{"type":"integer","title":"Exp","description":"Expiration timestamp (seconds since epoch) from the OIDC id_token."},"claims":{"additionalProperties":true,"type":"object","title":"Claims","description":"OIDC claims from the identity provider access token /userinfo endpoint."}},"additionalProperties":true,"type":"object","required":["sub","iss","exp"],"title":"AuthSsoLoginBody"},"BasicAuth":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"additionalProperties":true,"type":"object","required":["username","password"],"title":"BasicAuth"},"Body_create_audio_transcription_v1_audio_transcriptions_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The audio file object (not file name) to transcribe, in one of these formats: mp3 or wav."},"model":{"type":"string","title":"Model","description":"ID of the model to use. Call `/v1/models` endpoint to get the list of available models, only `automatic-speech-recognition` model type is supported."},"language":{"anyOf":[{"$ref":"#/components/schemas/AudioTranscriptionLanguage"},{"type":"null"}],"description":"The language of the output audio. If the output language is different than the audio language, the audio language will be translated into the output language. Output language must be supplied in ISO-639-1 format (e.g. en, fr) format."},"prompt":{"type":"string","title":"Prompt","description":"An optional text to tell the model what to do with the input audio.","default":""},"response_format":{"$ref":"#/components/schemas/AudioTranscriptionsResponseFormat","description":"The format of the transcript output: `json` (default), `text`, `diarized_json` to return per-segment speaker labels, `srt` or `vtt` for subtitle formats.","default":"json"},"temperature":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Temperature","description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.","default":0.0}},"type":"object","required":["file","model"],"title":"Body_create_audio_transcription_v1_audio_transcriptions_post"},"ChatCompletionAudio":{"properties":{"id":{"type":"string","title":"Id"},"data":{"type":"string","title":"Data"},"expires_at":{"type":"integer","title":"Expires At"},"transcript":{"type":"string","title":"Transcript"}},"additionalProperties":true,"type":"object","required":["id","data","expires_at","transcript"],"title":"ChatCompletionAudio","description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio)."},"ChatCompletionChunkResponse":{"properties":{"id":{"type":"string","title":"Id"},"choices":{"items":{"$ref":"#/components/schemas/openai__types__chat__chat_completion_chunk__Choice"},"type":"array","title":"Choices"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"object":{"type":"string","const":"chat.completion.chunk","title":"Object"},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default","flex","scale","priority"]},{"type":"null"}],"title":"Service Tier"},"system_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Fingerprint"},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}],"description":"Usage information, sent on the last chunk of the stream."}},"additionalProperties":true,"type":"object","required":["id","choices","created","model","object"],"title":"ChatCompletionChunkResponse"},"ChatCompletionMessage":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal"},"role":{"type":"string","const":"assistant","title":"Role"},"annotations":{"anyOf":[{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array"},{"type":"null"}],"title":"Annotations"},"audio":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionAudio"},{"type":"null"}]},"function_call":{"anyOf":[{"$ref":"#/components/schemas/FunctionCall"},{"type":"null"}]},"tool_calls":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionMessageFunctionToolCall"},{"$ref":"#/components/schemas/ChatCompletionMessageCustomToolCall"}]},"type":"array"},{"type":"null"}],"title":"Tool Calls"}},"additionalProperties":true,"type":"object","required":["role"],"title":"ChatCompletionMessage","description":"A chat completion message generated by the model."},"ChatCompletionMessageCustomToolCall":{"properties":{"id":{"type":"string","title":"Id"},"custom":{"$ref":"#/components/schemas/Custom"},"type":{"type":"string","const":"custom","title":"Type"}},"additionalProperties":true,"type":"object","required":["id","custom","type"],"title":"ChatCompletionMessageCustomToolCall","description":"A call to a custom tool created by the model."},"ChatCompletionMessageFunctionToolCall":{"properties":{"id":{"type":"string","title":"Id"},"function":{"$ref":"#/components/schemas/Function"},"type":{"type":"string","const":"function","title":"Type"}},"additionalProperties":true,"type":"object","required":["id","function","type"],"title":"ChatCompletionMessageFunctionToolCall","description":"A call to a function tool created by the model."},"ChatCompletionResponse":{"properties":{"id":{"type":"string","title":"Id"},"choices":{"items":{"$ref":"#/components/schemas/openai__types__chat__chat_completion__Choice"},"type":"array","title":"Choices"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"object":{"type":"string","const":"chat.completion","title":"Object"},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default","flex","scale","priority"]},{"type":"null"}],"title":"Service Tier"},"system_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Fingerprint"},"usage":{"$ref":"#/components/schemas/Usage","description":"Usage information for the request."}},"additionalProperties":true,"type":"object","required":["id","choices","created","model","object"],"title":"ChatCompletionResponse"},"ChatCompletionTokenLogprob":{"properties":{"token":{"type":"string","title":"Token"},"bytes":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bytes"},"logprob":{"type":"number","title":"Logprob"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogprob"},"type":"array","title":"Top Logprobs"}},"additionalProperties":true,"type":"object","required":["token","logprob","top_logprobs"],"title":"ChatCompletionTokenLogprob"},"ChoiceDelta":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"function_call":{"anyOf":[{"$ref":"#/components/schemas/ChoiceDeltaFunctionCall"},{"type":"null"}]},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal"},"role":{"anyOf":[{"type":"string","enum":["developer","system","user","assistant","tool"]},{"type":"null"}],"title":"Role"},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChoiceDeltaToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls"}},"additionalProperties":true,"type":"object","title":"ChoiceDelta","description":"A chat completion delta generated by streamed model responses."},"ChoiceDeltaFunctionCall":{"properties":{"arguments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arguments"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","title":"ChoiceDeltaFunctionCall","description":"Deprecated and replaced by `tool_calls`.\n\nThe name and arguments of a function that should be called, as generated by the model."},"ChoiceDeltaToolCall":{"properties":{"index":{"type":"integer","title":"Index"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"function":{"anyOf":[{"$ref":"#/components/schemas/ChoiceDeltaToolCallFunction"},{"type":"null"}]},"type":{"anyOf":[{"type":"string","const":"function"},{"type":"null"}],"title":"Type"}},"additionalProperties":true,"type":"object","required":["index"],"title":"ChoiceDeltaToolCall"},"ChoiceDeltaToolCallFunction":{"properties":{"arguments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arguments"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","title":"ChoiceDeltaToolCallFunction"},"ChoiceLogprobs":{"properties":{"content":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"type":"array"},{"type":"null"}],"title":"Content"},"refusal":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"type":"array"},{"type":"null"}],"title":"Refusal"}},"additionalProperties":true,"type":"object","title":"ChoiceLogprobs","description":"Log probability information for the choice."},"CreateChatCompletionsBody":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages","description":"A list of messages comprising the conversation so far."},"model":{"type":"string","minLength":1,"title":"Model","description":"ID of the model to use. Call `/v1/models` endpoint to get the list of available models, only `text-generation` model type is supported."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.","default":false}},"additionalProperties":true,"type":"object","required":["messages","model"],"title":"CreateChatCompletionsBody"},"CreateEmbeddingsBody":{"properties":{"model":{"type":"string","minLength":1,"title":"Model","description":"ID of the model to use. Call `/v1/models` endpoint to get the list of available models, only `text-embeddings-inference` model type is supported."},"input":{"anyOf":[{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array","minItems":1},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"minLength":1},{"type":"null"}],"title":"Input","description":"Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (call `/v1/models` endpoint to get the `max_context_length` by model) and cannot be an empty string."},"encoding_format":{"$ref":"#/components/schemas/EncodingFormat","description":"The format of the output embeddings.","default":"float"}},"additionalProperties":true,"type":"object","required":["model"],"title":"CreateEmbeddingsBody"},"CreateOCRBody":{"properties":{"document":{"anyOf":[{"$ref":"#/components/schemas/DocumentURLChunk"},{"$ref":"#/components/schemas/ImageURLChunk"}],"title":"Document","description":"Document to run OCR on."},"document_annotation_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Annotation Prompt","description":"Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided."},"model":{"type":"string","title":"Model","description":"The model to use for the OCR, call `/v1/models` endpoint to get the list of available models, only `image-to-text` model type is supported."}},"additionalProperties":true,"type":"object","required":["document","model"],"title":"CreateOCRBody"},"CreateOrganizationBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the organization.","examples":["my-org"]}},"additionalProperties":true,"type":"object","required":["name"],"title":"CreateOrganizationBody"},"CreateProviderBody":{"properties":{"type":{"$ref":"#/components/schemas/ProviderType","description":"Model provider type."},"url":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Url","description":"Model provider API url. The url must only contain the domain name (without `/v1` suffix for example). Depends of the model provider type, the url can be optional (Albert, OpenAI)."},"key":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Key","description":"Model provider API key."},"basic_auth":{"anyOf":[{"$ref":"#/components/schemas/BasicAuth"},{"type":"null"}],"description":"Model provider basic authentication."},"timeout":{"type":"integer","title":"Timeout","description":"Timeout for the model provider requests, after user receive an 503 error (model is too busy).","default":300},"model_name":{"type":"string","title":"Model Name","description":"Model name from the model provider."},"model_hosting_zone":{"$ref":"#/components/schemas/HostingZone","description":"Model hosting zone using ISO 3166-1 alpha-3 code format (e.g., `WOR` for World, `FRA` for France, `USA` for United States). This determines the electricity mix used for carbon intensity calculations. For more information, see https://ecologits.ai","default":"WOR"},"model_total_params":{"type":"integer","minimum":0.0,"title":"Model Total Params","description":"Total params of the model in billions of parameters for carbon footprint computation. For more information, see https://ecologits.ai","default":0},"model_active_params":{"type":"integer","minimum":0.0,"title":"Model Active Params","description":"Active params of the model in billions of parameters for carbon footprint computation. For more information, see https://ecologits.ai","default":0},"router_id":{"type":"integer","title":"Router Id","description":"ID of the model to create the provider for (router ID, eg. 123)."}},"additionalProperties":true,"type":"object","required":["type","model_name","router_id"],"title":"CreateProviderBody"},"CreateProviderResponse":{"properties":{"id":{"type":"integer","title":"Id","description":"Provider ID."},"router_id":{"type":"integer","title":"Router Id","description":"ID of the router that owns the provider."},"user_id":{"type":"integer","title":"User Id","description":"ID of the user that owns the provider."},"type":{"$ref":"#/components/schemas/ProviderType","description":"Provider type."},"url":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Url","description":"Provider API url. The url must only contain the domain name (without `/v1` suffix for example)."},"key":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Key","description":"Provider API key."},"basic_auth":{"anyOf":[{"$ref":"#/components/schemas/BasicAuth"},{"type":"null"}],"description":"Provider basic authentication."},"timeout":{"type":"integer","maximum":3600.0,"minimum":1.0,"title":"Timeout","description":"Timeout for the provider requests, after user receive an 500 error (model is too busy)."},"model_name":{"type":"string","minLength":1,"title":"Model Name","description":"Model name from the model provider."},"model_hosting_zone":{"$ref":"#/components/schemas/HostingZone","description":"Model hosting zone using ISO 3166-1 alpha-3 code format (e.g., `WOR` for World, `FRA` for France, `USA` for United States). This determines the electricity mix used for carbon intensity calculations. For more information, see https://ecologits.ai","default":"WOR","examples":["WOR"]},"model_total_params":{"type":"integer","minimum":0.0,"title":"Model Total Params","description":"Total params of the model in billions of parameters for carbon footprint computation. If not provided, the active params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai","default":0},"model_active_params":{"type":"integer","minimum":0.0,"title":"Model Active Params","description":"Active params of the model in billions of parameters for carbon footprint computation. If not provided, the total params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai","default":0},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created","description":"Time of creation, as Unix timestamp."},"updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated","description":"Time of last update, as Unix timestamp."}},"additionalProperties":true,"type":"object","required":["id","router_id","user_id","type","timeout","model_name"],"title":"CreateProviderResponse"},"CreateRerankBody":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"The search query to use for the reranking. `query` and `prompt` cannot both be provided."},"documents":{"items":{"type":"string","minLength":1},"type":"array","title":"Documents"},"model":{"type":"string","minLength":1,"title":"Model","description":"The model to use for the reranking, call `/v1/models` endpoint to get the list of available models, only `text-classification` model type is supported."},"top_n":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Top N","description":"The number of top results to return. If set to None, all results will be returned."}},"additionalProperties":true,"type":"object","required":["query","documents","model"],"title":"CreateRerankBody"},"CreateRoleBody":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"Name of the role.","examples":["my-role"]},"permissions":{"anyOf":[{"items":{"$ref":"#/components/schemas/PermissionType"},"type":"array"},{"type":"null"}],"title":"Permissions","description":"List of permissions."},"limits":{"anyOf":[{"items":{"$ref":"#/components/schemas/Limit"},"type":"array"},{"type":"null"}],"title":"Limits","description":"List of limits."}},"additionalProperties":true,"type":"object","title":"CreateRoleBody"},"CreateRouterBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the model router.","examples":["model-router-1"]},"type":{"$ref":"#/components/schemas/RouterType","description":"Type of the model router. It will be used to identify the model router type.","examples":["text-generation"]},"aliases":{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","title":"Aliases","description":"Aliases of the model. It will be used to identify the model by users.","examples":[["model-alias","model-alias-2"]]},"load_balancing_strategy":{"$ref":"#/components/schemas/RouterLoadBalancingStrategy","description":"Routing strategy for load balancing between providers of the model. It will be used to identify the model type.","default":"shuffle"},"cost_prompt_tokens":{"type":"number","minimum":0.0,"title":"Cost Prompt Tokens","description":"Cost of a million prompt tokens (decrease user budget)","default":0.0},"cost_completion_tokens":{"type":"number","minimum":0.0,"title":"Cost Completion Tokens","description":"Cost of a million completion tokens (decrease user budget)","default":0.0}},"additionalProperties":true,"type":"object","required":["name","type"],"title":"CreateRouterBody"},"CreateUserBody":{"properties":{"email":{"type":"string","maxLength":254,"minLength":1,"title":"Email","description":"The user email."},"name":{"anyOf":[{"type":"string","maxLength":254,"minLength":1},{"type":"null"}],"title":"Name","description":"The user name."},"password":{"type":"string","maxLength":72,"minLength":6,"title":"Password","description":"The user password."},"role_id":{"type":"integer","title":"Role Id","description":"The role ID."},"organization_id":{"type":"integer","title":"Organization Id","description":"The organization ID."},"budget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget","description":"The budget."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"The expiration timestamp."},"priority":{"type":"integer","minimum":0.0,"title":"Priority","description":"The user priority. Higher value means higher priority.","default":0}},"additionalProperties":true,"type":"object","required":["email","password","role_id","organization_id"],"title":"CreateUserBody"},"Custom":{"properties":{"input":{"type":"string","title":"Input"},"name":{"type":"string","title":"Name"}},"additionalProperties":true,"type":"object","required":["input","name"],"title":"Custom","description":"The custom tool that the model called."},"DocumentURLChunk":{"properties":{"document_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Name","description":"The filename of the document."},"document_url":{"type":"string","title":"Document Url","description":"The URL of the document."},"type":{"type":"string","const":"document_url","title":"Type","description":"The type of the document.","default":"document_url"}},"additionalProperties":true,"type":"object","required":["document_url"],"title":"DocumentURLChunk"},"Embedding":{"properties":{"embedding":{"items":{"type":"number"},"type":"array","title":"Embedding"},"index":{"type":"integer","title":"Index"},"object":{"type":"string","const":"embedding","title":"Object"}},"additionalProperties":true,"type":"object","required":["embedding","index","object"],"title":"Embedding","description":"Represents an embedding vector returned by embedding endpoint."},"EmbeddingsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Embedding"},"type":"array","title":"Data"},"model":{"type":"string","title":"Model"},"object":{"type":"string","const":"list","title":"Object","description":"The type of object returned.","default":"list"},"usage":{"$ref":"#/components/schemas/Usage","description":"Usage information for the request."},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"A unique identifier for the request."}},"additionalProperties":true,"type":"object","required":["data","model"],"title":"EmbeddingsResponse"},"EncodingFormat":{"type":"string","enum":["float","base64"],"title":"EncodingFormat"},"EndpointUsage":{"type":"string","enum":["/v1/audio/transcriptions","/v1/chat/completions","/v1/embeddings","/v1/ocr","/v1/rerank","/v1/search"],"title":"EndpointUsage"},"Function":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"additionalProperties":true,"type":"object","required":["arguments","name"],"title":"Function","description":"The function that the model called."},"FunctionCall":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"additionalProperties":true,"type":"object","required":["arguments","name"],"title":"FunctionCall","description":"Deprecated and replaced by `tool_calls`.\n\nThe name and arguments of a function that should be called, as generated by the model."},"HTTPExceptionModel":{"properties":{"status_code":{"type":"integer","title":"Status Code"},"detail":{"type":"string","title":"Detail"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"}},"type":"object","required":["status_code","detail"],"title":"HTTPExceptionModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HostingZone":{"type":"string","enum":["ABW","AFG","AGO","AIA","ALA","ALB","AND","ARE","ARG","ARM","ASM","ATA","ATF","ATG","AUS","AUT","AZE","BDI","BEL","BEN","BES","BFA","BGD","BGR","BHR","BHS","BIH","BLM","BLR","BLZ","BMU","BOL","BRA","BRB","BRN","BTN","BVT","BWA","CAF","CAN","CCK","CHE","CHL","CHN","CIV","CMR","COD","COG","COK","COL","COM","CPV","CRI","CUB","CUW","CXR","CYM","CYP","CZE","DEU","DJI","DMA","DNK","DOM","DZA","ECU","EGY","ERI","ESH","ESP","EST","ETH","FIN","FJI","FLK","FRA","FRO","FSM","GAB","GBR","GEO","GGY","GHA","GIB","GIN","GLP","GMB","GNB","GNQ","GRC","GRD","GRL","GTM","GUF","GUM","GUY","HKG","HMD","HND","HRV","HTI","HUN","IDN","IMN","IND","IOT","IRL","IRN","IRQ","ISL","ISR","ITA","JAM","JEY","JOR","JPN","KAZ","KEN","KGZ","KHM","KIR","KNA","KOR","KWT","LAO","LBN","LBR","LBY","LCA","LIE","LKA","LSO","LTU","LUX","LVA","MAC","MAF","MAR","MCO","MDA","MDG","MDV","MEX","MHL","MKD","MLI","MLT","MMR","MNE","MNG","MNP","MOZ","MRT","MSR","MTQ","MUS","MWI","MYS","MYT","NAM","NCL","NER","NFK","NGA","NIC","NIU","NLD","NOR","NPL","NRU","NZL","OMN","PAK","PAN","PCN","PER","PHL","PLW","PNG","POL","PRI","PRK","PRT","PRY","PSE","PYF","QAT","REU","ROU","RUS","RWA","SAU","SDN","SEN","SGP","SGS","SHN","SJM","SLB","SLE","SLV","SMR","SOM","SPM","SRB","SSD","STP","SUR","SVK","SVN","SWE","SWZ","SXM","SYC","SYR","TCA","TCD","TGO","THA","TJK","TKL","TKM","TLS","TON","TTO","TUN","TUR","TUV","TWN","TZA","UGA","UKR","UMI","URY","USA","UZB","VAT","VCT","VEN","VGB","VIR","VNM","VUT","WLF","WOR","WSM","YEM","ZAF","ZMB","ZWE"],"title":"HostingZone"},"ImageURL":{"properties":{"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"The detail of the image."},"url":{"type":"string","title":"Url","description":"The URL of the image."}},"additionalProperties":true,"type":"object","required":["url"],"title":"ImageURL"},"ImageURLChunk":{"properties":{"image_url":{"anyOf":[{"$ref":"#/components/schemas/ImageURL"},{"type":"string"}],"title":"Image Url","description":"The URL of the image to OCR."},"type":{"type":"string","const":"image_url","title":"Type","description":"The type of the image.","default":"image_url"}},"additionalProperties":true,"type":"object","required":["image_url"],"title":"ImageURLChunk"},"KeyResponse":{"properties":{"object":{"type":"string","const":"key","title":"Object","description":"Type of the object.","default":"key"},"id":{"type":"integer","title":"Id","description":"ID of the key."},"name":{"type":"string","title":"Name","description":"Name of the key."},"value":{"type":"string","title":"Value","description":"Value of the key."},"user_id":{"type":"integer","title":"User Id","description":"ID of the user that owns the key."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"Time of expiration, as Unix timestamp. If None, the key never expires."},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"revoked":{"type":"boolean","title":"Revoked","description":"Whether the key has been revoked."}},"additionalProperties":true,"type":"object","required":["id","name","value","user_id","created","revoked"],"title":"KeyResponse"},"KeyStatus":{"type":"string","enum":["active","expired","revoked"],"title":"KeyStatus"},"KeysResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of keys."},"offset":{"type":"integer","title":"Offset","description":"Offset of the keys list."},"limit":{"type":"integer","title":"Limit","description":"Limit of the keys list."},"data":{"items":{"$ref":"#/components/schemas/KeyResponse"},"type":"array","title":"Data","description":"List of keys."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"KeysResponse"},"Limit":{"properties":{"router_id":{"type":"integer","title":"Router Id","description":"The router ID."},"type":{"$ref":"#/components/schemas/LimitType","description":"The limit type."},"value":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Value","description":"The limit value."}},"additionalProperties":true,"type":"object","required":["router_id","type"],"title":"Limit"},"LimitType":{"type":"string","enum":["tpm","tpd","rpm","rpd"],"title":"LimitType"},"MeResponse":{"properties":{"object":{"type":"string","const":"userInfo","title":"Object","description":"The user info object type.","default":"userInfo"},"id":{"type":"integer","title":"Id","description":"The user ID."},"email":{"type":"string","title":"Email","description":"The user email."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The user name."},"organization_id":{"type":"integer","title":"Organization Id","description":"The user organization ID."},"budget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget","description":"The user budget. If None, the user has unlimited budget."},"permissions":{"items":{"$ref":"#/components/schemas/PermissionType"},"type":"array","title":"Permissions","description":"The user permissions."},"limits":{"items":{"$ref":"#/components/schemas/Limit"},"type":"array","title":"Limits","description":"The user rate limits."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"The user expiration timestamp. If None, the user will never expire."}},"additionalProperties":true,"type":"object","required":["id","email","organization_id","permissions","limits"],"title":"MeResponse"},"Model":{"properties":{"object":{"type":"string","const":"model","title":"Object","description":"Type of the object.","default":"model"},"id":{"type":"string","title":"Id","description":"The model identifier, which can be referenced in the API endpoints."},"type":{"$ref":"#/components/schemas/RouterType","description":"The type of the model, which can be used to identify the model type.","examples":["text-generation"]},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","description":"Aliases of the model. It will be used to identify the model by users.","examples":[["model-alias","model-alias-2"]]},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"owned_by":{"type":"string","title":"Owned By","description":"The organization that owns the model."},"max_context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Context Length","description":"Maximum amount of tokens a context could contains. Makes sure it is the same for all models."},"costs":{"$ref":"#/components/schemas/ModelCosts","description":"Costs of the model."}},"additionalProperties":true,"type":"object","required":["id","type","created","owned_by"],"title":"Model"},"ModelCosts":{"properties":{"prompt_tokens":{"type":"number","minimum":0.0,"title":"Prompt Tokens","description":"Cost of a million prompt tokens (decrease user budget)","default":0.0},"completion_tokens":{"type":"number","minimum":0.0,"title":"Completion Tokens","description":"Cost of a million completion tokens (decrease user budget)","default":0.0}},"additionalProperties":true,"type":"object","title":"ModelCosts"},"ModelsResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/Model"},"type":"array","title":"Data","description":"List of models."}},"additionalProperties":true,"type":"object","required":["data"],"title":"ModelsResponse"},"OCRImageObject":{"properties":{"bottom_right_x":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bottom Right X","description":"X coordinate of bottom-right corner of the extracted image"},"bottom_right_y":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bottom Right Y","description":"Y coordinate of bottom-right corner of the extracted image"},"id":{"type":"string","title":"Id","description":"Image ID for extracted image in a page"},"image_annotation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Annotation","description":"Annotation of the extracted image in json str"},"image_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Base64","description":"Base64 string of the extracted image"},"top_left_x":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Left X","description":"X coordinate of top-left corner of the extracted image"},"top_left_y":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Left Y","description":"Y coordinate of top-left corner of the extracted image"}},"additionalProperties":true,"type":"object","required":["id"],"title":"OCRImageObject"},"OCRPageDimensions":{"properties":{"dpi":{"type":"integer","title":"Dpi","description":"Dots per inch of the page-image"},"height":{"type":"integer","title":"Height","description":"Height of the image in pixels"},"width":{"type":"integer","title":"Width","description":"Width of the image in pixels"}},"additionalProperties":true,"type":"object","required":["dpi","height","width"],"title":"OCRPageDimensions"},"OCRPageObject":{"properties":{"dimensions":{"anyOf":[{"$ref":"#/components/schemas/OCRPageDimensions"},{"type":"null"}],"description":"The dimensions of the PDF Page's screenshot image"},"footer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footer","description":"The footer of the page, returned when extract_footer is enabled"},"header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header","description":"The header of the page, returned when extract_header is enabled"},"hyperlinks":{"items":{"type":"string"},"type":"array","title":"Hyperlinks","description":"The hyperlinks extracted from the page.","default":[]},"images":{"items":{"$ref":"#/components/schemas/OCRImageObject"},"type":"array","title":"Images","description":"List of all extracted images in the page."},"index":{"type":"integer","title":"Index","description":"The page index in a pdf document starting from 0"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"The markdown string response of the page"},"tables":{"items":{"$ref":"#/components/schemas/OCRTableObject"},"type":"array","title":"Tables","description":"The tables extracted from the page, in the requested table_format.","default":[]}},"additionalProperties":true,"type":"object","required":["images","index"],"title":"OCRPageObject"},"OCRResponse":{"properties":{"document_annotation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Annotation","description":"Formatted response in the request_format if provided in json str"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The ID of the OCR request."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The model used to generate the OCR."},"pages":{"items":{"$ref":"#/components/schemas/OCRPageObject"},"type":"array","title":"Pages","description":"List of OCR info for pages."},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}],"description":"Usage information for the request."},"usage_info":{"anyOf":[{"$ref":"#/components/schemas/OCRUsage"},{"type":"null"}],"description":"Usage information for the request."}},"additionalProperties":true,"type":"object","required":["pages"],"title":"OCRResponse"},"OCRTableObject":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"The content of the extracted table, in the requested table format"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"The format of the extracted table: 'markdown' or 'html'"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Table ID for the extracted table in a page"}},"additionalProperties":true,"type":"object","title":"OCRTableObject"},"OCRUsage":{"properties":{"doc_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Doc Size Bytes","description":"Document size in bytes"},"pages_processed":{"type":"integer","title":"Pages Processed","description":"Number of pages processed"}},"additionalProperties":true,"type":"object","required":["pages_processed"],"title":"OCRUsage"},"OrganizationResponse":{"properties":{"object":{"type":"string","const":"organization","title":"Object","description":"Type of the object.","default":"organization"},"id":{"type":"integer","title":"Id","description":"ID of the organization."},"name":{"type":"string","title":"Name","description":"Name of the organization."},"users":{"type":"integer","title":"Users","description":"Number of users in the organization."},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"updated":{"type":"integer","title":"Updated","description":"Time of last update, as Unix timestamp."}},"additionalProperties":true,"type":"object","required":["id","name","users","created","updated"],"title":"OrganizationResponse"},"OrganizationSortField":{"type":"string","enum":["id","name","created","updated"],"title":"OrganizationSortField"},"OrganizationsResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of organizations."},"offset":{"type":"integer","title":"Offset","description":"Offset of the organizations list."},"limit":{"type":"integer","title":"Limit","description":"Limit of the organizations list."},"data":{"items":{"$ref":"#/components/schemas/OrganizationResponse"},"type":"array","title":"Data","description":"List of organizations."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"OrganizationsResponse"},"PermissionType":{"type":"string","enum":["admin","read_metric","provide_models"],"title":"PermissionType"},"PromptTokensDetails":{"properties":{"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0}},"additionalProperties":true,"type":"object","title":"PromptTokensDetails"},"ProviderResponse":{"properties":{"object":{"type":"string","const":"provider","title":"Object","description":"Type of the object.","default":"provider"},"id":{"type":"integer","title":"Id","description":"provider ID."},"router_id":{"type":"integer","title":"Router Id","description":"ID of the router that owns the provider."},"user_id":{"type":"integer","title":"User Id","description":"ID of the user that owns the provider."},"type":{"$ref":"#/components/schemas/ProviderType","description":"Provider type."},"url":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Url","description":"provider API url. The url must only contain the domain name (without `/v1` suffix for example)."},"timeout":{"type":"integer","title":"Timeout","description":"Timeout for the provider requests, after user receive an 500 error (model is too busy)."},"model_name":{"type":"string","minLength":1,"title":"Model Name","description":"Model name from the model provider."},"model_hosting_zone":{"$ref":"#/components/schemas/HostingZone","description":"Model hosting zone using ISO 3166-1 alpha-3 code format (e.g., `WOR` for World, `FRA` for France, `USA` for United States). This determines the electricity mix used for carbon intensity calculations. For more information, see https://ecologits.ai","default":"WOR","examples":["WOR"]},"model_total_params":{"type":"integer","minimum":0.0,"title":"Model Total Params","description":"Total params of the model in billions of parameters for carbon footprint computation. If not provided, the active params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai","default":0},"model_active_params":{"type":"integer","minimum":0.0,"title":"Model Active Params","description":"Active params of the model in billions of parameters for carbon footprint computation. If not provided, the total params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai","default":0},"max_context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Context Length","description":"Maximum amount of tokens a context could contains, probed on the provider API. It is the same for all the providers of a router."},"vector_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vector Size","description":"Dimension of the vectors, probed on the provider API for embeddings models only. It is the same for all the providers of a router."},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created","description":"Time of creation, as Unix timestamp."},"updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated","description":"Time of last update, as Unix timestamp."}},"additionalProperties":true,"type":"object","required":["id","router_id","user_id","type","timeout","model_name"],"title":"ProviderResponse"},"ProviderSortField":{"type":"string","enum":["id","model_name","created"],"title":"ProviderSortField"},"ProviderType":{"type":"string","enum":["albert","openai","mistral","tei","vllm"],"title":"ProviderType"},"ProvidersResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of providers."},"offset":{"type":"integer","title":"Offset","description":"Offset of the providers list."},"limit":{"type":"integer","title":"Limit","description":"Limit of the providers list."},"data":{"items":{"$ref":"#/components/schemas/ProviderResponse"},"type":"array","title":"Data","description":"List of providers."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"ProvidersResponse"},"RerankResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of object.","default":"list"},"id":{"type":"string","title":"Id","description":"A unique identifier for the request."},"results":{"items":{"$ref":"#/components/schemas/RerankResult"},"type":"array","title":"Results","description":"The list of reranked texts."},"model":{"type":"string","title":"Model","description":"The model used to generate the reranking."},"usage":{"$ref":"#/components/schemas/Usage","description":"Usage information for the request."}},"additionalProperties":true,"type":"object","required":["id","results","model"],"title":"RerankResponse"},"RerankResult":{"properties":{"relevance_score":{"type":"number","title":"Relevance Score","description":"The relevance score of the reranked text."},"index":{"type":"integer","title":"Index","description":"The index of the reranked text."}},"additionalProperties":true,"type":"object","required":["relevance_score","index"],"title":"RerankResult"},"RoleResponse":{"properties":{"object":{"type":"string","const":"role","title":"Object","description":"Type of the object.","default":"role"},"id":{"type":"integer","title":"Id","description":"ID of the role."},"name":{"type":"string","title":"Name","description":"Name of the role."},"permissions":{"items":{"$ref":"#/components/schemas/PermissionType"},"type":"array","title":"Permissions","description":"List of permissions."},"limits":{"items":{"$ref":"#/components/schemas/Limit"},"type":"array","title":"Limits","description":"List of limits."},"users":{"type":"integer","title":"Users","description":"Number of users assigned to the role."},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"updated":{"type":"integer","title":"Updated","description":"Time of last update, as Unix timestamp."}},"additionalProperties":true,"type":"object","required":["id","name","permissions","limits","users","created","updated"],"title":"RoleResponse"},"RolesResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of roles."},"offset":{"type":"integer","title":"Offset","description":"Offset of the roles list."},"limit":{"type":"integer","title":"Limit","description":"Limit of the roles list."},"data":{"items":{"$ref":"#/components/schemas/RoleResponse"},"type":"array","title":"Data","description":"List of roles."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"RolesResponse"},"RouterLoadBalancingStrategy":{"type":"string","enum":["shuffle","least_busy"],"title":"RouterLoadBalancingStrategy"},"RouterResponse":{"properties":{"object":{"type":"string","const":"router","title":"Object","description":"Type of the object.","default":"router"},"id":{"type":"integer","title":"Id","description":"ID of the router."},"name":{"type":"string","title":"Name","description":"Name of the router."},"user_id":{"type":"integer","title":"User Id","description":"ID of the user that owns the router."},"type":{"$ref":"#/components/schemas/RouterType","description":"Type of the model router. It will be used to identify the model router type.","examples":["text-generation"]},"aliases":{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","title":"Aliases","description":"Aliases of the model. It will be used to identify the model by users.","examples":[["model-alias","model-alias-2"]]},"load_balancing_strategy":{"$ref":"#/components/schemas/RouterLoadBalancingStrategy","description":"Routing strategy for load balancing between providers of the model. It will be used to identify the model type.","examples":["least_busy"]},"cost_prompt_tokens":{"type":"number","title":"Cost Prompt Tokens","description":"Cost of a million prompt tokens (decrease user budget)"},"cost_completion_tokens":{"type":"number","title":"Cost Completion Tokens","description":"Cost of a million completion tokens (decrease user budget)"},"providers":{"type":"integer","title":"Providers","description":"Number of providers in the router.","default":0},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"updated":{"type":"integer","title":"Updated","description":"Time of last update, as Unix timestamp."}},"additionalProperties":true,"type":"object","required":["id","name","user_id","type","aliases","load_balancing_strategy","cost_prompt_tokens","cost_completion_tokens","created","updated"],"title":"RouterResponse"},"RouterType":{"type":"string","enum":["automatic-speech-recognition","image-to-text","text-classification","text-embeddings-inference","text-generation"],"title":"RouterType"},"RoutersResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of routers."},"offset":{"type":"integer","title":"Offset","description":"Offset of the routers list."},"limit":{"type":"integer","title":"Limit","description":"Limit of the routers list."},"data":{"items":{"$ref":"#/components/schemas/RouterResponse"},"type":"array","title":"Data","description":"List of routers."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"RoutersResponse"},"Segment":{"properties":{"id":{"type":"integer","title":"Id","description":"A unique identifier for the segment."},"type":{"type":"string","title":"Type","description":"The type of the segment.","default":"transcript.text.segment"},"text":{"type":"string","title":"Text","description":"The segment text."},"start":{"type":"number","title":"Start","description":"Start time of the segment in seconds."},"end":{"type":"number","title":"End","description":"End time of the segment in seconds."},"speaker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker","description":"Speaker label assigned by diarization, if available."}},"additionalProperties":true,"type":"object","required":["id","text","start","end"],"title":"Segment"},"SortField":{"type":"string","enum":["id","name","created"],"title":"SortField"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder"},"TopLogprob":{"properties":{"token":{"type":"string","title":"Token"},"bytes":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bytes"},"logprob":{"type":"number","title":"Logprob"}},"additionalProperties":true,"type":"object","required":["token","logprob"],"title":"TopLogprob"},"UpdateKeyBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the key.","examples":["key-1"]}},"additionalProperties":true,"type":"object","required":["name"],"title":"UpdateKeyBody"},"UpdateMeBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The user name."},"email":{"type":"string","maxLength":254,"minLength":1,"title":"Email","description":"The user email."},"current_password":{"anyOf":[{"type":"string","maxLength":72,"minLength":6},{"type":"null"}],"title":"Current Password","description":"The current user password. If None, the password is not changed and `password` is ignored."},"password":{"anyOf":[{"type":"string","maxLength":72,"minLength":6},{"type":"null"}],"title":"Password","description":"The new user password. Required when `current_password` is provided. Ignored when `current_password` is None."}},"additionalProperties":true,"type":"object","required":["name","email"],"title":"UpdateMeBody"},"UpdateOrganizationBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the organization.","examples":["my-org"]}},"additionalProperties":true,"type":"object","required":["name"],"title":"UpdateOrganizationBody"},"UpdateProviderBody":{"properties":{"router_id":{"type":"integer","title":"Router Id","description":"The ID of the router to assign to the provider."},"timeout":{"type":"integer","maximum":3600.0,"minimum":1.0,"title":"Timeout","description":"Timeout for the model provider requests, after user receive an 500 error (model is too busy)."},"model_hosting_zone":{"$ref":"#/components/schemas/HostingZone","description":"Model hosting zone using ISO 3166-1 alpha-3 code format (e.g., `WOR` for World, `FRA` for France, `USA` for United States). This determines the electricity mix used for carbon intensity calculations. For more information, see https://ecologits.ai"},"model_total_params":{"type":"integer","minimum":0.0,"title":"Model Total Params","description":"Total params of the model in billions of parameters for carbon footprint computation. If 0, the active params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai"},"model_active_params":{"type":"integer","minimum":0.0,"title":"Model Active Params","description":"Active params of the model in billions of parameters for carbon footprint computation. If 0, the total params will be used if provided, else carbon footprint will not be computed. For more information, see https://ecologits.ai"}},"additionalProperties":true,"type":"object","required":["router_id","timeout","model_hosting_zone","model_total_params","model_active_params"],"title":"UpdateProviderBody"},"UpdateRoleBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the role.","examples":["my-role"]},"permissions":{"items":{"$ref":"#/components/schemas/PermissionType"},"type":"array","title":"Permissions","description":"List of permissions replacing the current ones. An empty list removes all the permissions."},"limits":{"items":{"$ref":"#/components/schemas/Limit"},"type":"array","title":"Limits","description":"List of limits replacing the current ones. An empty list removes all the limits."}},"additionalProperties":true,"type":"object","required":["name","permissions","limits"],"title":"UpdateRoleBody"},"UpdateRouterBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the model router.","examples":["model-router-1"]},"type":{"$ref":"#/components/schemas/RouterType","description":"Type of the model router. It will be used to identify the model router type.","examples":["text-generation"]},"aliases":{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","title":"Aliases","description":"Aliases of the model replacing the current ones. It will be used to identify the model by users. An empty list removes all the aliases.","examples":[["model-alias","model-alias-2"]]},"load_balancing_strategy":{"$ref":"#/components/schemas/RouterLoadBalancingStrategy","description":"Routing strategy for load balancing between providers of the model. It will be used to identify the model type.","examples":["least_busy"]},"cost_prompt_tokens":{"type":"number","minimum":0.0,"title":"Cost Prompt Tokens","description":"Cost of a million prompt tokens (decrease user budget)"},"cost_completion_tokens":{"type":"number","minimum":0.0,"title":"Cost Completion Tokens","description":"Cost of a million completion tokens (decrease user budget)"}},"additionalProperties":true,"type":"object","required":["name","type","aliases","load_balancing_strategy","cost_prompt_tokens","cost_completion_tokens"],"title":"UpdateRouterBody"},"Usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"prompt_tokens_details":{"$ref":"#/components/schemas/PromptTokensDetails","default":{"cached_tokens":0}},"cost":{"type":"number","title":"Cost","default":0.0},"impacts":{"$ref":"#/components/schemas/api__domain__usage__entities__EnvironmentalImpacts","default":{"kWh":0.0,"kgCO2eq":0.0}}},"additionalProperties":true,"type":"object","title":"Usage"},"UsageBucketResponse":{"properties":{"object":{"type":"string","const":"usage.bucket","title":"Object","description":"Type of the object.","default":"usage.bucket"},"start_time":{"type":"integer","title":"Start Time","description":"UTC start of the day bucket, as Unix timestamp."},"end_time":{"type":"integer","title":"End Time","description":"UTC exclusive end of the day bucket, as Unix timestamp."},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Sum of prompt tokens in the bucket."},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"Sum of completion tokens in the bucket."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Sum of total tokens in the bucket."},"cost":{"type":"number","title":"Cost","description":"Sum of request costs in the bucket."},"requests":{"type":"integer","title":"Requests","description":"Number of successful requests in the bucket."},"impacts":{"$ref":"#/components/schemas/api__infrastructure__fastapi__schemas__usage__EnvironmentalImpacts"}},"additionalProperties":true,"type":"object","required":["start_time","end_time","prompt_tokens","completion_tokens","total_tokens","cost","requests"],"title":"UsageBucketResponse"},"UsagesResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of usage buckets."},"offset":{"type":"integer","title":"Offset","description":"Offset of the usage buckets list."},"limit":{"type":"integer","title":"Limit","description":"Limit of the usage buckets list."},"data":{"items":{"$ref":"#/components/schemas/UsageBucketResponse"},"type":"array","title":"Data","description":"List of daily usage buckets."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"UsagesResponse"},"UserResponse":{"properties":{"object":{"type":"string","const":"user","title":"Object","description":"Type of the object.","default":"user"},"id":{"type":"integer","title":"Id","description":"ID of the user."},"email":{"type":"string","title":"Email","description":"Email of the user."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the user."},"sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub","description":"Subject identifier for SSO."},"iss":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iss","description":"Issuer identifier for SSO."},"role_id":{"type":"integer","title":"Role Id","description":"ID of the role assigned to the user."},"organization_id":{"type":"integer","title":"Organization Id","description":"ID of the organization the user belongs to."},"budget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget","description":"Budget allocated to the user."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"Expiration time of the user, as Unix timestamp."},"created":{"type":"integer","title":"Created","description":"Time of creation, as Unix timestamp."},"updated":{"type":"integer","title":"Updated","description":"Time of last update, as Unix timestamp."},"priority":{"type":"integer","title":"Priority","description":"Priority of the user. Higher value means higher priority."}},"additionalProperties":false,"type":"object","required":["id","email","role_id","organization_id","created","updated","priority"],"title":"UserResponse"},"UserSortField":{"type":"string","enum":["id","email","created","updated"],"title":"UserSortField"},"UserUpdateRequest":{"properties":{"email":{"type":"string","maxLength":254,"minLength":1,"title":"Email","description":"The new user email."},"name":{"anyOf":[{"type":"string","maxLength":254,"minLength":1},{"type":"null"}],"title":"Name","description":"The new user name. If null, the user name is removed."},"current_password":{"anyOf":[{"type":"string","maxLength":72,"minLength":6},{"type":"null"}],"title":"Current Password","description":"The current user password. Only required to change the password."},"password":{"anyOf":[{"type":"string","maxLength":72,"minLength":6},{"type":"null"}],"title":"Password","description":"The new user password. If omitted, the user password is not changed."},"role_id":{"type":"integer","title":"Role Id","description":"The new role ID."},"organization_id":{"type":"integer","title":"Organization Id","description":"The new organization ID."},"budget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget","description":"The new budget. If null, the user will have no budget."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"The new expiration timestamp. If null, the user will never expire."},"priority":{"type":"integer","minimum":0.0,"title":"Priority","description":"The new user priority. Higher value means higher priority."}},"additionalProperties":true,"type":"object","required":["email","name","role_id","organization_id","budget","expires","priority"],"title":"UserUpdateRequest"},"UsersResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Type of the object.","default":"list"},"total":{"type":"integer","title":"Total","description":"Total number of users matching the query."},"offset":{"type":"integer","title":"Offset","description":"Number of users skipped."},"limit":{"type":"integer","title":"Limit","description":"Maximum number of users returned."},"data":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Data","description":"List of users."}},"additionalProperties":true,"type":"object","required":["total","offset","limit","data"],"title":"UsersResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"api__domain__usage__entities__EnvironmentalImpacts":{"properties":{"kWh":{"type":"number","title":"Kwh","default":0.0},"kgCO2eq":{"type":"number","title":"Kgco2Eq","default":0.0}},"additionalProperties":true,"type":"object","title":"EnvironmentalImpacts"},"api__infrastructure__fastapi__schemas__admin__keys__CreateKeyBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the key.","examples":["key-1"]},"user":{"type":"integer","title":"User","description":"User ID to create the token for another user (by default, the current user). Required CREATE_USER permission."},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"Expiration time, as Unix timestamp. If None, the key never expires."}},"additionalProperties":true,"type":"object","required":["name","user"],"title":"CreateKeyBody"},"api__infrastructure__fastapi__schemas__keys__CreateKeyBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the key.","examples":["key-1"]},"expires":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires","description":"Expiration time, as Unix timestamp. If None, uses the configured maximum key lifetime when set, otherwise the key never expires."}},"additionalProperties":true,"type":"object","required":["name"],"title":"CreateKeyBody"},"api__infrastructure__fastapi__schemas__usage__EnvironmentalImpacts":{"properties":{"kWh":{"type":"number","title":"Kwh","description":"Energy consumption in kWh.","default":0.0},"kgCO2eq":{"type":"number","title":"Kgco2Eq","description":"Carbon footprint in kgCO2eq (global warming potential).","default":0.0}},"additionalProperties":true,"type":"object","title":"EnvironmentalImpacts"},"openai__types__chat__chat_completion__Choice":{"properties":{"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"],"title":"Finish Reason"},"index":{"type":"integer","title":"Index"},"logprobs":{"anyOf":[{"$ref":"#/components/schemas/ChoiceLogprobs"},{"type":"null"}]},"message":{"$ref":"#/components/schemas/ChatCompletionMessage"}},"additionalProperties":true,"type":"object","required":["finish_reason","index","message"],"title":"Choice"},"openai__types__chat__chat_completion_chunk__Choice":{"properties":{"delta":{"$ref":"#/components/schemas/ChoiceDelta"},"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"null"}],"title":"Finish Reason"},"index":{"type":"integer","title":"Index"},"logprobs":{"anyOf":[{"$ref":"#/components/schemas/ChoiceLogprobs"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["delta","index"],"title":"Choice"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}