NextGenDeepAIBETA

API Documentation

Welcome to the NextGenDeepAI API documentation. Our API allows you to integrate state-of-the-art language models directly into your applications with ease.


Authentication

All API requests require a valid API key. You can generate and manage your API keys from the Dashboard.

How to get an API Key

  1. Sign up for a free account.
  2. Log in and navigate to the Dashboard.
  3. Click the "Generate New Key" button.
  4. Copy your new API key immediately. It will be shown in the list.

Generate Text

POSThttps://nextgendeepai.com/api/llm/v1/generate

Headers

NameValueDescription
Content-Typeapplication/jsonRequired
X-API-Key<your_api_key>Your unique API key

Body Parameters

ParameterTypeDescription
promptstringThe input text for the model.
modelstringModel ID (default: "qwen:0.5b").
streambooleanWhether to stream the response.

Available Models

We support a variety of open-source small language models optimized for different use cases.

Model NameParametersContext LengthBest For
qwen:0.5b0.5B32kGeneral purpose, extremely fast inference, low latency.
llama38B8kHigh quality reasoning, creative writing, complex tasks.
mistral7B8kBalanced performance, strong instruction following, coding.
gemma2B / 7B8kLightweight, efficient, Google's open model family.

Code Examples

Curl

curl -X POST https://nextgendeepai.com/api/llm/v1/generate \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "model": "qwen:0.5b", "prompt": "Explain quantum computing", "stream": false }'

Python

import requests url = "https://nextgendeepai.com/api/llm/v1/generate" headers = { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY" } data = { "model": "qwen:0.5b", "prompt": "Explain quantum computing", "stream": False } response = requests.post(url, json=data, headers=headers) print(response.json())

Java

import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class Main { public static void main(String[] args) throws Exception { String apiKey = "YOUR_API_KEY"; String jsonBody = "{\"model\":\"qwen:0.5b\",\"prompt\":\"Explain quantum computing\",\"stream\":false}"; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://nextgendeepai.com/api/llm/v1/generate")) .header("Content-Type", "application/json") .header("X-API-Key", apiKey) .POST(HttpRequest.BodyPublishers.ofString(jsonBody)) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } }