Start here
The machine contract for one model address
/v1/models/{id}/{document}on https://api.auray.ai/v1ONE DOCUMENT PER ADDRESS, because a single spec cannot describe 625 addresses: OpenAPI has no path parameter that may contain slashes, so the /{model} template this spec used to carry stood for eve…
ONE DOCUMENT PER ADDRESS, because a single spec cannot describe 625 addresses: OpenAPI has no path parameter that may contain slashes, so the /{model} template this spec used to carry stood for every address and generated a usable client for none. document picks the form: openapi.json is a complete 3.1.0 document for that one address — four queue paths, the model's own input schema nested the way the body is read, the scope a key needs as info.x-auray-scope, the price rule in credits as info.x-auray-price (a catalogue model's bands under its rule, and metered, true where the price is a hold: the job is charged what it cost, never above the quote) — and llms.txt is the same contract written for a reader that pays by the token: fields, response keys, price, paths and one request to paste.
NO KEY IS NEEDED. A contract you need a key to read is a contract nobody can generate a client from. A key that is sent is still checked, so a revoked or throttled key is told so here as everywhere else. id is the address (auray-ai/krea-2-turbo/text-to-image) or, as one segment, the catalogue slug (hitem3d-hi3d-split). The index of every address is at https://api.auray.ai/llms.txt.
#Authentication
No key needed — this document is public.
#Request
#Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The model address, slashes and all. |
document | string | yes | Which form of the contract to return. One of "openapi.json", "llms.txt". |
#Example request
curl https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.jsonimport { createClient } from "@auray/client";
const auray = createClient(); // this route needs no key
const doc = await auray.platform.models.document("auray-ai/krea-2-turbo/text-to-image", "openapi.json");
console.dir(doc, { depth: null });from auray_client import Client
auray = Client() # this route needs no key
doc = auray.platform.models.document("auray-ai/krea-2-turbo/text-to-image", "openapi.json")
print(doc)const res = await fetch("https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json", {
method: "GET",
});
console.log(await res.json());import requests
r = requests.get(
"https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json",
)
r.raise_for_status()
print(r.json())package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json", nil)
if err != nil {
panic(err)
}
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}<?php
$ch = curl_init("https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
uri = URI("https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json")
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, res.bodyimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.auray.ai/v1/models/auray-ai/krea-2-turbo/text-to-image/openapi.json");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");#Responses
#200 OK
The contract for that address.
#404 Not Found
No such model address.
#Status codes
| Status | Meaning |
|---|---|
200 | The contract for that address. |
404 | No such model address. |
Every refusal names its code, and every code is explained at Errors.