Skip to content

API reference

Responses and images

OpenAI's Responses API, and image generation.

Beyond chat completions, Odyssey serves OpenAI's Responses API, which newer SDKs and agents default to, and image generation. Both use the same key, billing and rate limits.

Responses

POSThttps://odysseyapi.tech/v1/responses

Any chat model works here, not only OpenAI's: requests are translated for models that don't speak Responses natively. Streaming uses the standard event names, from response.created through response.completed, and function tools stream as response.function_call_arguments.delta events.

import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://odysseyapi.tech/v1", apiKey: process.env.ODYSSEY_API_KEY }); const response = await client.responses.create({  model: "anthropic/claude-sonnet-5",  input: "Write a haiku about routing tables.",}); console.log(response.output_text);

Continuing a response

previous_response_id continues a stored response where the model supports stored responses. For the most reliable long conversations, send the full input each turn with store: false, which is what Codex does, and set prompt_cache_key so turns share a prompt cache.

Image generation

POSThttps://odysseyapi.tech/v1/images/generations

Image models are listed in GET /models with kind: "image" and a per_image price. Each generated image is billed at that price. Images are returned in one response; partial-image streaming isn't supported.

curl https://odysseyapi.tech/v1/images/generations \  -H "Authorization: Bearer $ODYSSEY_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "openai/gpt-image-1",    "prompt": "A lighthouse on a cliff at dusk, oil painting",    "size": "1024x1024",    "n": 1  }'

Calling an image model on a chat endpoint, or a chat model here, returns 400 with model_not_supported.

Image editing

POSThttps://odysseyapi.tech/v1/images/edits

Whole-image edits on models flagged for them: send one to four sources (PNG, JPEG or WebP, up to 10 MB each) as repeated image fields with a prompt, and get repaints back in the same images shape. Billed per image out, like generation. There is no mask painting — the whole images are the canvas.

curl https://odysseyapi.tech/v1/images/edits \  -H "Authorization: Bearer $ODYSSEY_API_KEY" \  -F [email protected] \  -F prompt="Put sunglasses on the cat" \  -F model="openai/gpt-image-2" \  -F n=1