English

Text generation API

Use Chat Completions, Responses, or Anthropic Messages for text and tool calls.

Text generation API

Chat Completions

curl "https://api.apimodel.store/v1/chat/completions" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
  -H "Content-Type: application/json" \
  --data '{"model":"gpt-6-sol","messages":[{"role":"user","content":"Reply with one short sentence."}],"max_tokens":128}'

Responses

curl "https://api.apimodel.store/v1/responses" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
  -H "Content-Type: application/json" \
  --data '{"model":"gpt-6-sol","input":"Reply in one short sentence.","max_output_tokens":128,"store":false}'

Anthropic Messages

curl "https://api.apimodel.store/v1/messages" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  --data '{"model":"gpt-6-sol","messages":[{"role":"user","content":"Reply with one short sentence."}],"max_tokens":128}'

Choose an available model. Set stream: true for SSE. Responses is stateless: pass prior output items in the next input. Function tools run in your client. POST /v1/chat/quotes returns the hold estimate, while final billing uses actual token usage.