Skip to content

Справочник API

C ABI для большинства вызовов возвращает allocated JSON strings. Каждая возвращённая строка содержит:

json
{"ok":true,"data":{}}

или:

json
{"ok":false,"error":{"code":"config_error","message":"..."}}

Освобождайте каждую возвращённую строку через ai_core_string_free.

Общие типы

  • AiCoreFfiHandle
  • UTF-8 JSON char * inputs
  • возвращаемые UTF-8 JSON char *
  • package byte pointers plus lengths
  • Unix timestamps для valid_at checks

Lifecycle

  • ai_core_ffi_abi_version
  • ai_core_version_json
  • ai_core_handle_new
  • ai_core_handle_free
  • ai_core_string_free

Config и catalog

  • ai_core_apply_config_json
  • ai_core_settings_catalog_json

License material

Normal marketplace builds export:

  • ai_core_add_core_license_document
  • ai_core_add_core_license_key_material
  • ai_core_clear_core_license_documents

no-marketplace builds не содержат этих функций и устанавливают plaintext packages.

Packages

  • ai_core_install_package_bytes

Pipelines

  • ai_core_pipeline_start_json
  • ai_core_pipeline_resume_json

Direct calls

  • ai_core_wasm_run_action_json
  • ai_core_model_chat_json

Читайте дальше

AI Core documentation site.