VICECITYAI API

Developer documentation

Connect supported text and media models through one OpenAI-compatible API. This guide takes you from the first request to streaming, integrations, billing and error handling.

Base URLhttps://vicecityai.shop/v1
ProtocolOpenAI-compatible
BillingPay as you go
01

Quickstart

  1. Create an accountSign up and verify your email.
  2. Create an API keyOpen Dashboard → API keys. The full key is shown once.
  3. Make a requestUse the base URL and a model ID returned by /v1/models.
curl https://vicecityai.shop/v1/chat/completions \
  -H "Authorization: Bearer vc_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": false
  }'
02

Authentication

Send your ViceCityAI key as a Bearer token on every API request. Keep it on the server and never expose it in browser code or public repositories.

Authorization: Bearer vc_your_api_key_here
SecurityIf a key is exposed, revoke it in Dashboard and create a new one.
03

Models

Use the live models endpoint as the source of truth. The catalog may change when upstream availability changes. Prices and observed uptime are shown on the Pricing page.

curl https://vicecityai.shop/v1/models \
  -H "Authorization: Bearer vc_your_api_key_here"
04

Chat and streaming

POST /v1/chat/completions

The request format follows OpenAI Chat Completions. Set stream to true for Server-Sent Events; the stream ends with data: [DONE].

curl -N https://vicecityai.shop/v1/chat/completions \
  -H "Authorization: Bearer vc_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5",
    "messages": [
      {"role": "system", "content": "Be concise."},
      {"role": "user", "content": "Explain SSE."}
    ],
    "stream": true
  }'

Common fields

FieldRequiredDescription
modelYesFull provider/model ID
messagesYesConversation messages
streamNoReturn SSE chunks when true
max_tokensNoMaximum generated tokens
05

Vision

For vision-capable models, send message content as an array containing text and an image_url. ViceCityAI currently accepts PNG, JPEG and WebP data URLs through this endpoint.

{
  "model": "openai/gpt-5",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "Describe this image"},
      {"type": "image_url", "image_url": {
        "url": "data:image/png;base64,..."
      }}
    ]
  }]
}
06

Images and video

POST /v1/images/generationsGenerate images with a supported media model.
POST /v1/videos/generationsGenerate video when the selected model supports it.

Check the live model catalog before use. Media availability and accepted parameters differ by model.

07

SDK examples

Python

from openai import OpenAI

client = OpenAI(
    api_key="vc_your_api_key_here",
    base_url="https://vicecityai.shop/v1"
)

response = client.chat.completions.create(
    model="openai/gpt-5",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "vc_your_api_key_here",
  baseURL: "https://vicecityai.shop/v1"
});

const response = await client.chat.completions.create({
  model: "openai/gpt-5",
  messages: [{ role: "user", content: "Hello!" }]
});
console.log(response.choices[0].message.content);
08

Integrations

Use the OpenAI-compatible option in tools that allow a custom base URL. Exact settings and supported features depend on the client.

SillyTavern

Custom endpoint: https://vicecityai.shop/v1

Select Chat Completion, enter your key and a current model ID, then enable streaming if desired.

n8n / bots

POST /v1/chat/completions

Use an HTTP Request node or an OpenAI-compatible connector with a configurable base URL.

Compatibility noteSome clients hard-code their official provider endpoint or require provider-specific APIs. Test your client before relying on it in production.
09

Billing

Usage is charged from your prepaid balance after a successful request. Text-model cost is calculated from input and output token usage at the prices shown on the Pricing page.

cost = (input_tokens × input_price + output_tokens × output_price) / 1,000,000
10

Errors

HTTPMeaningAction
400Invalid requestCheck the body and model ID
401Invalid API keyCheck or rotate the key
402Insufficient balanceTop up the account
403Account restrictionVerify email or contact support
429Rate limit or concurrent requestRetry with backoff
502–504Upstream unavailableRetry safely or choose another model
11

Limits and behavior

  • Request body: up to 2 MB.
  • Maximum requested output: 32,768 tokens; a model may enforce a lower limit.
  • Model context windows and availability depend on the active upstream route.
  • Do not automatically retry validation, authentication or billing errors.