Skip to content
Docs

API Reference

All public cURL request examples for the OpenAI-compatible API surface.

Base URL and key

The examples below assume the Base URL includes /v1. Create an API key in the Console, then export it before running the requests.

bash
1export UNI_API_BASE_URL="https://api.0-0.pro/v1"2export UNI_API_KEY="<YOUR_API_KEY>"

cURL requests

GET
/v1/models

List enabled models

Returns the OpenAI-compatible model list available to your API key.

bash
1curl "$UNI_API_BASE_URL/models" \2  -H "Authorization: Bearer $UNI_API_KEY"
GET
/v1/models/{model}

Retrieve a model

Checks whether a single model is available for the current workspace and group.

bash
1curl "$UNI_API_BASE_URL/models/gpt-5.5" \2  -H "Authorization: Bearer $UNI_API_KEY"
POST
/v1/chat/completions

Create a chat completion

OpenAI-compatible chat generation with normal and streaming responses.

bash
1curl "$UNI_API_BASE_URL/chat/completions" \2  -H "Authorization: Bearer $UNI_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "model": "gpt-5.5",6    "messages": [{"role":"user","content":"Hello"}]7  }'
POST
/v1/responses

Create a response

Passes a Responses API request upstream while Uni API records usage and latency.

bash
1curl "$UNI_API_BASE_URL/responses" \2  -H "Authorization: Bearer $UNI_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "model": "gpt-5.5",6    "input": "Summarize request observability in one sentence."7  }'
POST
/v1/responses/compact

Compact a response context

Pass-through endpoint for upstream context compaction flows.

bash
1curl "$UNI_API_BASE_URL/responses/compact" \2  -H "Authorization: Bearer $UNI_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "model": "gpt-5.5",6    "input": "Compress the previous conversation into durable context."7  }'
POST
/v1/images/generations

Generate an image

Forwards an image generation request to the selected upstream model.

bash
1curl "$UNI_API_BASE_URL/images/generations" \2  -H "Authorization: Bearer $UNI_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "model": "gpt-image-2",6    "prompt": "A precise product render of a translucent API gateway cube",7    "size": "1024x1024",8    "n": 19  }'
POST
/v1/images/edits

Edit an image

Multipart image editing request; JSON and multipart bodies are forwarded upstream.

bash
1curl -X POST "$UNI_API_BASE_URL/images/edits" \2  -H "Authorization: Bearer $UNI_API_KEY" \3  -F model=gpt-image-2 \4  -F prompt="Make the product render brighter" \5  -F [email protected]