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"}]}