OpenMindAI Developers
OPENMINDAI API REFERENCE

Start building with OpenMindAI

Connect your application, desktop IDE or backend service through the OpenMindAI Developer Portal API. All developer API requests are authenticated with a private Bearer key.

Developer keys are private. Store them in an environment variable, encrypted credential vault or desktop OS secret store. Never embed keys in browser JavaScript, public repositories or distributed apps.

1. Create your developer account

Use developer registration or sign in with an existing OpenMindAI account. Registration, password policy, optional email verification, two-factor authentication and unfamiliar-IP verification follow the Laravel server settings. After signing in, open API keys, enter a label, confirm your password and supply a 2FA code if enabled.

The secret appears only once. A key expires after 90 days, and each account can hold at most 10 developer keys. Revocation is immediate.

Header: Authorization: Bearer YOUR_DEVELOPER_KEY

2. Your first API request

Base URL: /api/v1/openmindai. This URL belongs to the Next.js Developer Portal, not Laravel. When self-hosting, use your own portal domain. Set OPENMINDAI_BASE_URL and OPENMINDAI_API_KEY on your server before running the example.

export OPENMINDAI_BASE_URL="/api/v1/openmindai"
export OPENMINDAI_API_KEY="your-developer-key"

curl "$OPENMINDAI_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $OPENMINDAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openmindai-lite","messages":[{"role":"user","content":"Write a Python function"}],"stream":false}'

Chat accepts model, messages, optional tools, stream, max_tokens and temperature. The response follows a chat-completions shape with choices and optional usage.

3. Choose a model

Use GET /models to discover available identifiers. The coding assistants include openmindai-super, openmindai-ultra and openmindai-lite. Additional specialist models appear in GET /catalog. A listed model may not be ready for inference or verified against the hosting provider's access entitlement.

For a desktop assistant, set the server URL, paste the generated key into the app's encrypted settings, and select a supported model. Send tool definitions and tool responses using the chat format shown below.

4. Endpoint reference

GET/models

Discover registered models and their integration readiness.

GET/catalog

Retrieve model descriptions, categories and capability metadata.

POST/chat/completions

OpenAI-style chat completion with optional streaming and function tools.

POST/models/{slug}/invoke

Send JSON input to an administrator-configured specialist model.

POST/cosmos/generations

Queue supported Cosmos image and video generation.

GET/cosmos/{id}

Inspect a generation job belonging to your account.

GET/cosmos/{id}/download

Download your completed generation output.

Specialist invoke expects a JSON object with an input property. Cosmos generation expects model_mode (text2image or text2video), prompt and an optional seed. Some media and document workflows are not available under developer-key endpoints; see the backend's hosted-media documentation.

5. Coding assistants and tool calls

Use the chat completion endpoint with tools containing function schemas. Supported requests allow up to 64 declared tools and 64 calls in one assistant message. Returned tool calls have function names, JSON arguments and identifiers. Execute approved tools inside your own application, then send results back as tool messages referencing tool_call_id.

{"model":"openmindai-lite","messages":[{"role":"user","content":"Read README.md"}],"tools":[{"type":"function","function":{"name":"read_file","description":"Read an approved workspace file","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"]}}}],"stream":false}

The model suggests tool calls but does not execute code on your machine. Your desktop integration must enforce file permissions, user approval and safe tool execution.

6. Streaming completions

Send "stream": true to receive Server-Sent Events. Read the stream incrementally and stop when the data: [DONE] frame arrives. Reconstruct choices[].delta fields; streaming responses may also contain tool call deltas. Treat an interrupted stream as incomplete.

7. Usage and allowances

The developer dashboard tracks successful, completed API requests by model and by month. One call equals one application credit. These are not provider tokens, prepaid balances or NVIDIA billing credits. Limits are administrator-configured; when no monthly allocation is configured the portal displays “Not set”. Your existing rate limits apply separately.

8. Errors and security

401Invalid, missing or expired bearer token
403Inactive account or insufficient token scope
404Model unavailable or unknown endpoint
422Invalid input or provider schema rejection
429Rate limit, concurrent request or exhausted allowance
502/503Provider or backend not available

Use TLS for all production traffic. Keep the Laravel NVIDIA_API_KEY private and never pass it to a client. Renew developer keys before expiry, revoke lost keys immediately and avoid retrying streamed writes without checking their completion status.

Ready to connect your project?

Generate a developer key and send your first request.

Go to API keys