apyhub
ARTIFICIAL INTELLIGENCE · SMART GENERATION

Simple Chat Prompt API

What it does

Simple Chat sends a prompt to an LLM and returns the model’s reply along with token usage. It is designed for straightforward text generation, lightweight assistants, and quick prompt experiments.

Send a prompt in the request body. You can also set model, max_tokens, temperature, and system_prompt to control the response, with sensible defaults provided for each. The endpoint accepts a x-rapidapi-proxy-secret header and returns a response object that includes id, model, usage, and content. The raw field exposes the underlying model response, including choices and usage details.

Use Simple Chat when you need to generate short answers, draft copy, summarize text, or power a basic conversational feature without building a full chat orchestration layer. Because the schema is minimal, it is easy to wire into internal tools, prototypes, and production workflows where you only need one prompt in and one completion back.

▣ ENDPOINT 01 / 02
GET
List available chat models
http://localhost:8080/dosvak/simple-chat
QUICKSTARTGUIDE

Quickstart

Fetch the available chat models with the required secret header.

curl -X GET "http://localhost:8080/dosvak/simple-chat" \
  -H "apy-token: $APY_TOKEN" \
  -H "x-rapidapi-proxy-secret: YOUR_SECRET"

What you'll get back

Returns a JSON object with a data array of model objects and an object string. Each model object can include fields like id, root, object, parent, owned_by, permission, and max_model_len.

{
  "data": [
    {
      "id": "gpt-4o-mini",
      "root": "gpt-4o-mini",
      "object": "model",
      "parent": null,
      "owned_by": "openai",
      "permission": [],
      "max_model_len": 128000
    }
  ],
  "object": "list"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Lists the available chat models and returns them in a JSON object.

Response

Returns a JSON object with a data array field and an object string field. Each item in data is an object that may include model metadata such as id, root, object, parent, owned_by, permission, and max_model_len.

ParameterTypeMandatoryDescription
dataObject ArrayYesArray of model objects. Each item may include id (String), root (String), object (String), parent (nullable), owned_by (String), permission (Object Array), and max_model_len (Integer). The permission array items include id (String) and object (String); additional properties may also be present.
objectStringYesString identifier for the response object.

Parameters

No parameters.
▣ ENDPOINT 02 / 02
POST
Send a simple prompt
http://localhost:8080/dosvak/simple-chat
QUICKSTARTGUIDE

Quickstart

Send a simple chat prompt with the required prompt field.

curl -X POST "http://localhost:8080/dosvak/simple-chat" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a one-sentence welcome message for a new user."
  }'

What you'll get back

Returns a JSON object with top-level fields such as id (string), model (string), usage (object with token counts), and content (string or null). The response also includes a raw object with the upstream chat-completion payload, including its own id, model, usage, object, choices, and created fields.

{
  "id": "chatcmpl-123",
  "model": "Qwen/Qwen3-0.6B",
  "usage": {
    "total_tokens": 42,
    "prompt_tokens": 12,
    "completion_tokens": 30
  },
  "content": "Welcome! We're glad you're here."
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Sends a prompt to the chat service and returns a JSON object containing the generated response metadata and content. The request body includes the prompt and optional generation settings such as model, max tokens, temperature, and system prompt.

Request Body

ParameterTypeMandatoryDescription
modelStringNoModel name to use. Default: Qwen/Qwen3-0.6B.
promptStringYesThe prompt to send to the chat service.
max_tokensIntegerNoMaximum number of tokens to generate. Default: 256. Minimum: 1. Maximum: 8192.
temperatureNumberNoSampling temperature. Default: 0.7. Minimum: 0. Maximum: 2.
system_promptStringNoSystem prompt to guide the assistant. Default: You are a helpful assistant.

Response

Returns a JSON object with top-level id and model string fields, an optional usage object, an optional content string field, and an optional raw object that contains the underlying provider response. The schema does not declare a specific success status code.

ParameterTypeMandatoryDescription
idStringNoResponse identifier.
rawObjectNoUnderlying raw response object. It may include id, model, usage, object, choices, and created.
modelStringNoModel used for the response.
usageObjectNoToken usage summary. It may include total_tokens, prompt_tokens, and completion_tokens.
contentStringNoGenerated content. This field is nullable.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.