POST
/
v1
/
projects
from retab import Retab

client = Retab()
response = client.projects.create(
    name="Invoices",
    json_schema={
        "type": "object",
        "properties": {
            "sender_name": {"type": "string"},
            "receiver_name": {"type": "string"}
        }
    },
    default_inference_settings=InferenceSettings(
        model="gpt-4.1-mini",
        temperature=0,
        modality="native",
        reasoning_effort="medium",
        image_resolution_dpi=96,
        browser_canvas="A4",
        n_consensus=1,
    ),
)
{
  "id": "<string>",
  "name": "",
  "json_schema": {},
  "default_inference_settings": {
    "model": "gpt-4.1-mini",
    "temperature": 0,
    "modality": "native",
    "reasoning_effort": "medium",
    "image_resolution_dpi": 96,
    "browser_canvas": "A4",
    "n_consensus": 1
  },
  "updated_at": "2023-11-07T05:31:56Z",
  "documents": [
    {
      "mime_data": {
        "filename": "file.pdf",
        "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..."
      },
      "annotation": {},
      "annotation_metadata": {
        "extraction_id": "<string>",
        "likelihoods": {},
        "field_locations": {},
        "agentic_field_locations": {},
        "consensus_details": [
          {}
        ],
        "api_cost": {
          "value": 123,
          "currency": "<string>"
        }
      },
      "id": "<string>",
      "ocr_file_id": "<string>"
    }
  ],
  "iterations": [
    {
      "id": "<string>",
      "inference_settings": {
        "model": "<string>",
        "temperature": 123,
        "modality": "text",
        "reasoning_effort": "low",
        "image_resolution_dpi": 123,
        "browser_canvas": "A3",
        "n_consensus": 123
      },
      "json_schema": {},
      "updated_at": "2023-11-07T05:31:56Z",
      "predictions": {}
    }
  ],
  "schema_data_id": "<string>",
  "schema_id": "<string>"
}
from retab import Retab

client = Retab()
response = client.projects.create(
    name="Invoices",
    json_schema={
        "type": "object",
        "properties": {
            "sender_name": {"type": "string"},
            "receiver_name": {"type": "string"}
        }
    },
    default_inference_settings=InferenceSettings(
        model="gpt-4.1-mini",
        temperature=0,
        modality="native",
        reasoning_effort="medium",
        image_resolution_dpi=96,
        browser_canvas="A4",
        n_consensus=1,
    ),
)

Authorizations

Api-Key
string
header
required

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.