# Manna API guide OpenAI-compatible chat completions for agents, scripts, and SDKs. Connect your existing client to the base URL below. No account or provider API key is required. Base URL: https://manna.quest/v1 ## Connect your client For direct HTTP requests, omit the Authorization header. If your SDK requires a key, use the placeholder "manna_anonymous". Choose a model ID from the model listing. If omitted, the model defaults to "openai/gpt-6.1-sol". Model IDs are served through the configured upstream provider; availability depends on that provider and the service's daily capacity. ## Endpoints POST https://manna.quest/v1/chat/completions GET https://manna.quest/v1/models ## Chat completions POST https://manna.quest/v1/chat/completions Content-Type: application/json Send a JSON object containing: - messages (required): a nonempty conversation array of { role, content }. - model (optional): an ID from the model listing; defaults to "openai/gpt-6.1-sol". - stream (optional): set to true for server-sent events. - max_tokens (optional): desired output length. - temperature, top_p, stop, seed (optional): standard sampling options. - tools, tool_choice, parallel_tool_calls (optional): OpenAI-style function calling. - response_format (optional): text, json_object, or json_schema. Text input only. Message roles are system, developer, user, assistant, and tool. Content may be a string or an array of text parts. An assistant making a tool call may have null content; a tool result must include its tool_call_id. Basic HTTP request: curl https://manna.quest/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"openai/gpt-6.1-sol","messages":[{"role":"user","content":"Hello!"}],"max_tokens":512}' The response is a chat.completion object. Its model field contains the selected public alias. Read choices[0].message.content for the answer and choices[0].finish_reason for how generation ended. Check for an error object before reading choices. ### Python Install: pip install openai from openai import OpenAI client = OpenAI( base_url="https://manna.quest/v1", api_key="manna_anonymous", ) reply = client.chat.completions.create( model="openai/gpt-6.1-sol", messages=[{"role": "user", "content": "Hello!"}], max_tokens=512, ) print(reply.choices[0].message.content) ### JavaScript Install: npm i openai import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://manna.quest/v1", apiKey: "manna_anonymous", }); const reply = await client.chat.completions.create({ model: "openai/gpt-6.1-sol", messages: [{ role: "user", content: "Hello!" }], max_tokens: 512, }); console.log(reply.choices[0].message.content); ### Streaming Use the same chat endpoint with "stream": true. The response is text/event-stream: data lines containing chat.completion.chunk objects, ending with data: [DONE]. Read choices[0].delta.content when present. SSE comment lines are keepalives, not answer text. curl -N https://manna.quest/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"openai/gpt-6.1-sol","stream":true,"messages":[{"role":"user","content":"Hello!"}],"max_tokens":512}' ### Tool calls and JSON Tool calls arrive in choices[0].message.tool_calls with finish_reason "tool_calls". Each call includes an id and function.name / function.arguments; arguments is a JSON string. Your application executes the function, appends the assistant message and a tool message containing tool_call_id and content, then calls the same endpoint again. For JSON output, send response_format { "type": "json_object" } and describe the JSON you want in the prompt. For a fixed shape, use { "type": "json_schema", "json_schema": { "name": "result", "schema": { ... } } }. Parse the returned message content as JSON. Feature availability depends on the configured model. ## Models GET https://manna.quest/v1/models Returns an OpenAI-style list of the public model aliases accepted by this deployment. Pass one of these IDs in a chat request. Unknown IDs return model_not_found. curl https://manna.quest/v1/models Response: { "object": "list", "data": [ { "id": "openai/gpt-6.1-sol", "name": "OpenAI: GPT-6.1 Sol", "object": "model", "created": 1795026543, "owned_by": "manna" }, { "id": "anthropic/claude-opus-5.5", "name": "Anthropic: Claude Opus 5.5", "object": "model", "created": 1795026543, "owned_by": "manna" }, { "id": "google/gemini-4-hydrogen", "name": "Google: Gemini 4 Hydrogen", "object": "model", "created": 1795026543, "owned_by": "manna" }, { "id": "deepseek/deepseek-v4.1-flash-1017", "name": "DeepSeek: DeepSeek V4.1 Flash 1017", "object": "model", "created": 1795026543, "owned_by": "manna" } ] } With the clients configured above: - Python: client.models.list() - JavaScript: await client.models.list()