AISBF Logo AISBF

AI Service Broker Framework — AI Should Be Free

CoderAI documentation · source-backed from Nexlab/coderai

CoderAI API reference

Practical CoderAI HTTP API reference: authentication, OpenAI-compatible routes, multimodal endpoints, generated files, archives, profiles, and pipelines.

Base URL and authentication

export CODERAI_URL="http://127.0.0.1:8776"
export CODERAI_TOKEN="your-api-token"

curl -s "$CODERAI_URL/v1/models" \
  -H "Authorization: Bearer $CODERAI_TOKEN" | jq

CoderAI supports web sessions and API bearer tokens. Token management is available in the admin UI and via GET /admin/api/tokens and POST /admin/api/tokens. Interactive OpenAPI docs are served by a running instance at /docs, with raw schema at /openapi.json.

Core endpoints

MethodPathPurpose
GET/v1/modelsList configured models and metadata.
GET/coderai/capabilitiesReturn broker/studio capability metadata and hardware summary.
GET/v1/files/{filename}Serve generated or uploaded files from the configured output directory.
GET/v1/archiveList generated media in the output/archive directory.
DELETE/v1/archive/{filename}Delete one archived file.

OpenAI-style text

curl -s "$CODERAI_URL/v1/chat/completions" \
  -H "Authorization: Bearer $CODERAI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"Qwen/Qwen3-8B","messages":[{"role":"user","content":"Explain VRAM offloading."}],"temperature":0.4,"max_tokens":300}' | jq
  • POST /v1/chat/completions supports common OpenAI fields, streaming, tools, tool_choice, repeat penalty, and thinking templates where supported.
  • POST /v1/completions supports legacy text completion clients.
  • POST /v1/embeddings serves embeddings where a configured model supports them.

Multimodal routes

Images

  • /v1/images/generations
  • /v1/images/edits
  • /v1/images/inpaint
  • /v1/images/upscale
  • /v1/images/depth
  • /v1/images/segment
  • /v1/images/faceswap

Video

  • /v1/video/generations
  • /v1/video/upscale
  • /v1/video/subtitle
  • /v1/video/interpolate
  • /v1/video/dub

Audio

  • /v1/audio/transcriptions
  • /v1/audio/speech
  • /v1/audio/clone
  • /v1/audio/convert
  • /v1/audio/stems

Pipelines and profiles

  • /v1/pipelines/image-to-video
  • /v1/pipelines/video-dub
  • /v1/pipelines/story
  • Character, environment, voice profile CRUD APIs.

Data conventions

Media inputs generally accept HTTP URLs, CoderAI file URLs, raw base64, or data URLs such as data:image/png;base64,.... Generated media usually returns a data array with a url, or base64 keys such as b64_json, b64_mp4, b64_wav, or b64_mp3 when requested.

{"created":1781090000,"data":[{"url":"/v1/files/generated.png"}]}

OCR

A dedicated document-transcription subsystem built on real OCR engines. Full guide →

RoutePurpose
POST /v1/ocrTranscribe an image or PDF. Fields: engine, dpi, structured, schema, detect.
POST /v1/ocr/batchMany files in one call; per-file errors reported inline.
GET | POST /v1/ocr/schemasList or create structured-extraction schemas.
GET | PUT | DELETE /v1/ocr/schemas/{name}Read, replace or delete one schema.

Speech, speakers and audio

Full guide →

RoutePurpose
POST /v1/audio/transcriptionsSpeech to text. language, target_language, timestamp_granularities, diarize, response_format (json/verbose_json/text/srt/vtt).
POST /v1/audio/diarizationWho spoke when; identify=true relabels turns with enrolled names.
POST /v1/audio/speakers · GET · DELETE /{name}Enrol, list and remove named voiceprints.
POST /v1/audio/speaker-identify · speaker-verifyBest match among the enrolled, or a yes/no against one of them.
POST /v1/audio/speaker-embeddingsRaw voiceprint vectors, optionally windowed.
POST /v1/audio/stems · cleanupDemucs stem separation; DeepFilterNet denoise/normalise/de-hum/de-click.
GET /v1/audio/progressAudio-generation progress.

Embeddings and reranking

Full guide →

RoutePurpose
POST /v1/embeddingsText and image embeddings. Extras: image, embedding_types (dense/sparse/colbert), dimensions, quantization, encoding_format.
POST /v1/rerankCross-encoder reranking: query + documentsrelevance_score per document.

LoRA training

RoutePurpose
POST /v1/loras/trainTrain a LoRA against an image or video base. wait=false returns a job id.
GET /v1/loras/progressProgress by job, by session, or a global snapshot.
POST /v1/loras/upload · GET /v1/loras/blob/{hash}Content-addressed blob store, so a client can skip re-uploading.
GET /v1/loras · GET | DELETE /v1/loras/{name}List, read and delete registered LoRAs.