{"openapi":"3.1.0","info":{"title":"NeuroForge public model API","version":"2026-09-30","description":"Discover /models before requesting chat. Native buffered text shares the World owner; legacy hybrid/dense also accept SSE. No preflight, tools or media. Quality, sparse savings and paid readiness remain unqualified.","contact":{"url":"https://neuroforge.io/contact/"}},"servers":[{"url":"https://neuroforge.io/v1"}],"externalDocs":{"url":"https://neuroforge.io/api.md"},"security":[{},{"DeveloperKey":[]}],"paths":{"/search":{"post":{"operationId":"searchPublicWeb","summary":"Search public web snippets","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string","minLength":1,"maxLength":500,"description":"Raw string envelope only: JSON Schema counts Unicode code points, while the server limits the raw string to 500 UTF-16 code units. NFKC normalization and cleanup then apply the normalized query limits; passing this schema does not guarantee admission."}}}}}},"responses":{"200":{"description":"Up to three public HTTPS search snippets; may be empty","content":{"application/json":{"schema":{"type":"object","required":["object","retrieved_at","evidence","results","source_status"],"properties":{"object":{"const":"web.search"},"retrieved_at":{"type":"string","format":"date-time"},"evidence":{"const":"search_snippets"},"results":{"type":"array","maxItems":3,"items":{"type":"object","required":["title","url","content"],"properties":{"title":{"type":"string","maxLength":160},"url":{"type":"string","format":"uri","maxLength":1600},"content":{"type":"string","maxLength":900}},"additionalProperties":false}},"source_status":{"type":"string","enum":["results","partial","no_results","filtered_empty"]},"notice":{"type":"string"},"raw_result_count":{"type":"integer","minimum":0,"maximum":10000},"considered_result_count":{"type":"integer","minimum":0,"maximum":10000},"ranked_result_count":{"type":"integer","minimum":0,"maximum":10000},"filtered_result_count":{"type":"integer","minimum":0,"maximum":10000},"returned_result_count":{"type":"integer","minimum":0,"maximum":10000},"unresponsive_engine_count":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"},"502":{"description":"Search unavailable. Source status and bounded diagnostic counts are included only when available.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"message":{"type":"string"},"type":{"const":"server_error"},"param":{"type":"null"},"code":{"const":"search_unavailable"}},"additionalProperties":false},"source_status":{"const":"unavailable"},"raw_result_count":{"type":"integer","minimum":0,"maximum":10000},"considered_result_count":{"type":"integer","minimum":0,"maximum":10000},"ranked_result_count":{"type":"integer","minimum":0,"maximum":10000},"filtered_result_count":{"type":"integer","minimum":0,"maximum":10000},"returned_result_count":{"type":"integer","minimum":0,"maximum":10000},"unresponsive_engine_count":{"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false}}}}},"description":"The raw query must be at most 500 UTF-16 code units. After NFKC normalization and cleanup, it must be 3–160 UTF-16 code units and at most 24 words; the UTF-8 JSON body must be at most 2048 bytes. Queries containing URL-like or private-looking text may be rejected. Screening is a bounded heuristic, not a guarantee that private information will be detected. Up to three untrusted snippets, not full pages. 22s edge deadline; independent anonymous quotas and credential-free CORS."}},"/models":{"get":{"operationId":"listNeuroForgeModels","summary":"Discover the selected backend","responses":{"200":{"description":"The approved model only","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"properties":{"object":{"const":"list"},"data":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["id","object","created","owned_by"],"properties":{"id":{"type":"string","enum":["erais-fracture-gemma","erais-dense-gemma4-e4b","erais-native-qwen3"]},"object":{"const":"model"},"created":{"type":"integer","minimum":0},"owned_by":{"const":"neuroforge"},"erais":{"$ref":"#/components/schemas/BackendIdentity"}},"allOf":[{"if":{"properties":{"id":{"const":"erais-fracture-gemma"}}},"then":{"properties":{"erais":{"$ref":"#/components/schemas/BackendIdentity/oneOf/0"}}}},{"if":{"properties":{"id":{"const":"erais-dense-gemma4-e4b"}}},"then":{"required":["erais"],"properties":{"erais":{"$ref":"#/components/schemas/BackendIdentity/oneOf/1"}}}},{"if":{"properties":{"id":{"const":"erais-native-qwen3"}}},"then":{"required":["erais"],"properties":{"erais":{"$ref":"#/components/schemas/NativeBackendIdentity"}}}}],"additionalProperties":false}}},"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/Error"}},"description":"Selected public profile only. Choose request limits by the returned model ID and use erais metadata when present. Metadata may be absent for the legacy hybrid profile; dense and native discovery require it. Native returns text even if World perception includes images; runtime_id identifies the owner. Check availability live."}},"/chat/completions":{"post":{"operationId":"createNeuroForgeChatCompletion","summary":"Generate text","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"},"example":{"model":"erais-native-qwen3","messages":[{"role":"user","content":"Explain how a rainbow forms in two sentences."}],"max_tokens":64,"stream":false}}}},"responses":{"200":{"description":"Buffered text and token usage. Native requires stream=false; legacy hybrid/dense may use SSE. Disconnect cancels; never auto-replay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/Error"}},"description":"The example shows the native profile. Discover the selected model with GET /models before reusing it, and follow that profile’s request limits. No model fallback. Native instructions/sampling are deployment-owned; unsupported fields are rejected. No token preflight. Never auto-replay interrupted work."}}},"components":{"securitySchemes":{"DeveloperKey":{"type":"http","scheme":"bearer","bearerFormat":"issued developer key"}},"responses":{"Error":{"description":"400 invalid;401 key;403 origin;404 route;405 method;413 size;415 type;429 busy;502 upstream;503 unavailable;504 timeout. Respect Retry-After.","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"ChatRequest":{"description":"Use the single model ID returned by GET /models. Native and legacy profiles have distinct limits; no model fallback.","oneOf":[{"$ref":"#/components/schemas/LegacyChatRequest"},{"$ref":"#/components/schemas/NativeChatRequest"}]},"ChatCompletion":{"type":"object","required":["id","object","created","model","choices","usage"],"properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"created":{"type":"integer","minimum":0},"model":{"type":"string","enum":["erais-fracture-gemma","erais-dense-gemma4-e4b","erais-native-qwen3"]},"choices":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["index","message","finish_reason"],"properties":{"index":{"const":0},"message":{"type":"object","required":["role","content"],"properties":{"role":{"const":"assistant"},"content":{"type":"string"}},"additionalProperties":false},"finish_reason":{"enum":["stop","length"]}},"additionalProperties":false}},"usage":{"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","minimum":0},"completion_tokens":{"type":"integer","minimum":0,"maximum":2048},"total_tokens":{"type":"integer","minimum":0}},"additionalProperties":false}},"allOf":[{"if":{"properties":{"model":{"const":"erais-native-qwen3"}}},"then":{"properties":{"usage":{"properties":{"prompt_tokens":{"minimum":1,"maximum":512},"completion_tokens":{"minimum":1,"maximum":128}}}}}}],"description":"Native returns model and usage, no runtime_id. Rediscover on identity/unavailable errors. length is terminal. No private metadata.","additionalProperties":false},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","param","code"],"properties":{"message":{"type":"string"},"type":{"enum":["invalid_request_error","server_error"]},"param":{"type":"null"},"code":{"type":"string"}}}}},"BackendIdentity":{"oneOf":[{"type":"object","additionalProperties":false,"required":["training","modalities","fully_native","sparse_savings_verified","architecture","backend_kind","fractured_mlp","externally_resident"],"properties":{"training":{"const":false},"modalities":{"const":["text"]},"fully_native":{"const":false},"sparse_savings_verified":{"const":false},"architecture":{"const":"hybrid fracture"},"backend_kind":{"const":"hybrid_gemma4_fractured_mlp_donor_attention"},"fractured_mlp":{"const":true},"externally_resident":{"const":false}}},{"type":"object","additionalProperties":false,"required":["training","modalities","fully_native","sparse_savings_verified","architecture","backend_kind","fractured_mlp","externally_resident"],"properties":{"training":{"const":false},"modalities":{"const":["text"]},"fully_native":{"const":false},"sparse_savings_verified":{"const":false},"architecture":{"const":"dense donor"},"backend_kind":{"const":"dense_llama_gemma4_e4b"},"fractured_mlp":{"const":false},"externally_resident":{"const":true}}},{"$ref":"#/components/schemas/NativeBackendIdentity"}]},"LegacyChatRequest":{"type":"object","additionalProperties":false,"required":["model","messages"],"properties":{"model":{"type":"string","enum":["erais-fracture-gemma","erais-dense-gemma4-e4b"],"description":"Use discovered model ID; no remapping."},"messages":{"type":"array","minItems":1,"maxItems":64,"items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"]},"content":{"type":"string","minLength":1}}},"oneOf":[{"prefixItems":[{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}}],"items":false,"anyOf":[{"minItems":1,"maxItems":1},{"minItems":3,"maxItems":3},{"minItems":5,"maxItems":5},{"minItems":7,"maxItems":7},{"minItems":9,"maxItems":9},{"minItems":11,"maxItems":11},{"minItems":13,"maxItems":13},{"minItems":15,"maxItems":15},{"minItems":17,"maxItems":17},{"minItems":19,"maxItems":19},{"minItems":21,"maxItems":21},{"minItems":23,"maxItems":23},{"minItems":25,"maxItems":25},{"minItems":27,"maxItems":27},{"minItems":29,"maxItems":29},{"minItems":31,"maxItems":31},{"minItems":33,"maxItems":33},{"minItems":35,"maxItems":35},{"minItems":37,"maxItems":37},{"minItems":39,"maxItems":39},{"minItems":41,"maxItems":41},{"minItems":43,"maxItems":43},{"minItems":45,"maxItems":45},{"minItems":47,"maxItems":47},{"minItems":49,"maxItems":49},{"minItems":51,"maxItems":51},{"minItems":53,"maxItems":53},{"minItems":55,"maxItems":55},{"minItems":57,"maxItems":57},{"minItems":59,"maxItems":59},{"minItems":61,"maxItems":61},{"minItems":63,"maxItems":63}]},{"prefixItems":[{"properties":{"role":{"const":"system"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}}],"items":false,"anyOf":[{"minItems":2,"maxItems":2},{"minItems":4,"maxItems":4},{"minItems":6,"maxItems":6},{"minItems":8,"maxItems":8},{"minItems":10,"maxItems":10},{"minItems":12,"maxItems":12},{"minItems":14,"maxItems":14},{"minItems":16,"maxItems":16},{"minItems":18,"maxItems":18},{"minItems":20,"maxItems":20},{"minItems":22,"maxItems":22},{"minItems":24,"maxItems":24},{"minItems":26,"maxItems":26},{"minItems":28,"maxItems":28},{"minItems":30,"maxItems":30},{"minItems":32,"maxItems":32},{"minItems":34,"maxItems":34},{"minItems":36,"maxItems":36},{"minItems":38,"maxItems":38},{"minItems":40,"maxItems":40},{"minItems":42,"maxItems":42},{"minItems":44,"maxItems":44},{"minItems":46,"maxItems":46},{"minItems":48,"maxItems":48},{"minItems":50,"maxItems":50},{"minItems":52,"maxItems":52},{"minItems":54,"maxItems":54},{"minItems":56,"maxItems":56},{"minItems":58,"maxItems":58},{"minItems":60,"maxItems":60},{"minItems":62,"maxItems":62},{"minItems":64,"maxItems":64}]}]},"max_tokens":{"type":"integer","minimum":32,"maximum":2048,"default":512,"description":"Requested cap; dense generation clamps to 512."},"stream":{"type":"boolean","default":false},"temperature":{"type":"number","const":0,"default":0},"n":{"type":"integer","const":1,"default":1}}},"NativeChatRequest":{"type":"object","additionalProperties":false,"required":["model","messages"],"description":"JSON <=32768 bytes; final user <=2048 UTF-8 bytes; prior text <=4096 bytes/3 exchanges. Deployment-owned instructions/sampling. Composed prompt <=512 tokens; oldest exchanges may be retired. No preflight.","properties":{"model":{"const":"erais-native-qwen3"},"messages":{"type":"array","minItems":1,"maxItems":7,"description":"1,3,5 or7 messages: alternate user/assistant, ending user. No system. Enforced UTF-8 byte limits.","items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":4096,"description":"Nonempty valid UTF-8 without NUL; final <=2048 bytes; prior combined <=4096 bytes."}}},"allOf":[{"prefixItems":[{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}},{"properties":{"role":{"const":"assistant"}}},{"properties":{"role":{"const":"user"}}}]},{"anyOf":[{"minItems":1,"maxItems":1},{"minItems":3,"maxItems":3},{"minItems":5,"maxItems":5},{"minItems":7,"maxItems":7}]}]},"max_tokens":{"type":"integer","minimum":1,"maximum":128,"default":128},"stream":{"type":"boolean","const":false,"default":false},"n":{"type":"integer","const":1,"default":1}}},"NativeBackendIdentity":{"type":"object","additionalProperties":false,"required":["model_id","architecture","backend_kind","fully_native","source_family","tokenizer_dependency","dynamic_adaptive_patching","native_learned_breadth","native_learned_recurrence","training","retained_session_learning","externally_resident","sparse_savings_verified","quality_scope","request_state","streaming","max_output_tokens","max_prompt_bytes","max_history_bytes","max_history_exchanges","system_prompt","sampling","assistant_quality","account_billing_complete","modalities","runtime_id"],"properties":{"model_id":{"const":"erais-native-qwen3"},"architecture":{"const":"ERAIS native adaptive decoder"},"backend_kind":{"const":"erais_native_adaptive_decoder"},"fully_native":{"const":true},"source_family":{"const":"Qwen3"},"tokenizer_dependency":{"const":true},"dynamic_adaptive_patching":{"const":false},"native_learned_breadth":{"const":true},"native_learned_recurrence":{"const":true},"training":{"const":false},"retained_session_learning":{"const":false},"externally_resident":{"const":false},"sparse_savings_verified":{"const":false},"quality_scope":{"const":"unqualified_for_general_chat"},"request_state":{"const":"ephemeral_same_world_lease"},"streaming":{"const":false},"max_output_tokens":{"const":128},"max_prompt_bytes":{"const":2048},"max_history_bytes":{"const":4096},"max_history_exchanges":{"const":3},"system_prompt":{"const":"deployment_owned"},"sampling":{"const":"deployment_owned"},"assistant_quality":{"const":false},"account_billing_complete":{"const":false},"modalities":{"const":["text"]},"runtime_id":{"type":"string","pattern":"^[a-f0-9]{32}$"}}}}}}
